Create connection
import requests
url = "https://api.datagrid.com/v1/connections"
payload = {
"connector_id": "<string>",
"connection_provider_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connector_id: '<string>', connection_provider_id: '<string>'})
};
fetch('https://api.datagrid.com/v1/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connector_id": "<string>",
"connection_provider_id": "<string>"
}
'{
"object": "redirect_url",
"redirect_url": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Connections
Create connection
Creates a new connection to authenticate with a third-party service (like Google Drive, Hubspot, Dropbox, etc.) and returns a redirect URL for the connection authentication flow.
POST
/
connections
Create connection
import requests
url = "https://api.datagrid.com/v1/connections"
payload = {
"connector_id": "<string>",
"connection_provider_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({connector_id: '<string>', connection_provider_id: '<string>'})
};
fetch('https://api.datagrid.com/v1/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connector_id": "<string>",
"connection_provider_id": "<string>"
}
'{
"object": "redirect_url",
"redirect_url": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json