Connection API
The following article relates to Sigma’s developer API for organizations’ connections.
Summary of Content
Endpoints
The Connection Object
Attributes
Look Up a Connection
Update a Connection
Related Resources
Endpoints
GET /v2/connections/{connectionId}
Returns a connection object based on the input connectionId. Learn more.
Try it in Swagger
PATCH /v2/connections/{connectionId}
Returns the updated connection object. Learn more.
Try it in Swagger
The Connection Object
Attributes
organizationId string
The unique identifier associated with the connections' organization.
connectionId string
The unique identifier associated with the individual connection.
isSample boolean
True if the connection contains Sigma sample data.
lastActiveAt string
The timestamp at which a query was last run against the connection.
name string
The connection's name, as is listed in Sigma.
type string
The connection's Cloud Data Warehouse (CDW) provider.
useOauth boolean | undefined
True if access to the connection is authenticated with OAuth through your Identity Provider (IdP).
Note: Only applicable to Snowflake connections.
createdBy string
The unique identifier, memberId, of the organization member who created the connection.
updatedBy string
The unique identifier, memberId, of the organization member who last updated the connection.
createdAt string
The timestamp at which the connection was created.
updatedAt string
The timestamp at which the connection was last updated.
isArchived boolean | undefined
True if the connection is archived.
{
"organizationId": "cf2de26e-9a2c-4c58-ba1c-91a0955df7ez",
"connectionId": "48726c98-8495-4488-bb6e-108a115b732df",
"isSample": false,
"lastActiveAt": "2022-02-28T21:26:52.033Z",
"name": "My First Connection",
"type": "snowflake",
"useOauth": false,
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-08T21:38:25.044Z"
isArchived: false
}
Look Up a Connection
Returns a connection object based on the input connectionId.
GET /v2/connections/{connectionId}
Permissions
- The user account associated with the API access token must have permission to access the requested connection.
Note: If you encounter a permission error for the given endpoint, check with your organization Admin to verify your account type and permissions associated with your API token.
Parameters
None
cURL Request
curl --location --request GET 'https://api.sigmacomputing.com/v2/connections/{connectionId}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
Response
{
"organizationId": string,
"connectionId": string,
"isSample": boolean,
"lastActiveAt": string,
"name": string,
"type": string,
"useOauth": boolean,
"createdBy": string,
"updatedBy": string,
"createdAt": string,
"updatedAt": string,
"isArchived": boolean
}
Example
Example Request:
curl --location --request GET 'https://api.sigmacomputing.com/v2/connections/48726c98-8495-4488-bb6e-108a115b732df' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
Example Response:
{
"organizationId": "cf2de26e-9a2c-4c58-ba1c-91a0955df7ez",
"connectionId": "65726g36-8495-4588-er6e-194a115b734kf",
"isSample": false,
"lastActiveAt": "2022-01-08T21:16:42.053Z",
"name": "My First Connection",
"type": "snowflake",
"useOauth": false,
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-08-09T20:33:41.044Z",
"updatedAt": "2021-10-08T21:28:25.044Z",
"isArchived": false
}
Update a Connection
Returns the updated connection object.
PATCH /v2/connections/{connectionId}
Permissions
- The user account associated with the API access token must have permission to updated the requested connection.
Note: If you encounter a permission error for the given endpoint, check with your organization Admin to verify your account type and permissions associated with your API token.
Parameters
name string | undefined
The new name to be assigned to the connection.
useOauth boolean | undefined
True if access to the connection is authenticated with OAuth through your Identity Provider (IdP).
Note: Only applicable to Snowflake connections.
cURL Request
curl --location --request PATCH 'https://api.sigmacomputing.com/v2/connections/{connectionId}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": string, // or undefined
"useOauth": boolean // or undefined
}'
Response
{
"organizationId": string,
"connectionId": string,
"isSample": boolean,
"lastActiveAt": string,
"name": string,
"type": string,
"useOauth": boolean,
"createdBy": string,
"updatedBy": string,
"createdAt": string,
"updatedAt": string,
"isArchived": boolean
}
Example
Example Request:
curl --location --request PATCH 'https://api.sigmacomputing.com/v2/connections/48726c98-8495-4488-bb6e-108a115b732df' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": “The Best Connection”
"useOauth": true
}'
Example Response:
{
"organizationId": "cf2de26e-9a2c-4c58-ba1c-91a0955df7ez",
"connectionId": "48726c98-8495-4488-bb6e-108a115b732df",
"isSample": false,
"lastActiveAt": "2022-02-28T21:26:52.033Z",
"name": "The Best Connection",
"type": "snowflake",
"useOauth": true,
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-08T21:38:25.044Z",
"isArchived": false
}
Related Resources
API Documentation
Get an API Token and Client ID
Identify Unique IDs in Sigma
Identify Unique IDs in Sigma