Connection Path API
The following article covers Sigma’s developer API for organizations’ cloud data warehouse (CDW) connection paths.
Summary of Content
Endpoints
The Connection Path Object
Attributes
The Connection Inode Object
Attributes
List All Connection Paths
Look up a Connection Path
Create or Update Connection Path Grant
List Connection Path Grants
Delete Connection Path Grant
Related Resources
Endpoints
GET /v2/connections/paths
Returns an object that includes a list of "entries". Each entry is a connection path object.
Try it in Swagger
POST /v2/connection/{connectionId}/lookup
Returns the connection inode object associated with the requested warehouse connection path.
POST /v2/connections/paths/{connectionPathId}/grants
This endpoint creates a grant to the connection path for users or teams.
GET /v2/connections/paths/{connectionPathId}/grants
This endpoint returns a list of connection path grants.
DELETE /v2/connections/paths/{connectionPathId}/grants/{grantId}
This endpoint deletes a connection path grant.
Try it in Swagger.
The Connection Path Object
Attributes
connectionId string
The connection's unique identifier
path Array<string>
The path to a database (if applicable to your CDW provider), schema, or table in the connection.
hasMore boolean
True if additional connection paths are available (accessible but not included in the current list).
total number
That total number of available connection paths, including those on other pages.
Connection paths in the organization that are not accessible by the user are excluded from this count.
nextPage string | null
The next page in the list of connection paths. Used for pagination.
{
entries: [
{
"connectionId": "48726c98-8495-4488-bb6e-108a115b732df",
"path": [
"EXAMPLES",
"CENSUS",
"NATALITY"
]
}
],
"hasMore": true,
"total": 139,
"nextPage": "2"
}
The Connection Inode Object
Attributes
inodeId string
The unique identifier associated with the scope or table object belonging to the requested connection path.
kind string
The object’s type: “scope” or “table”.
url string
A direct link to the connection in Sigma.
{
"kind": "scope",
"inodeId": "48726c98-8495-4488-bb6e-108a115b732df",
"url": "https://app.sigmacomputing.com/my-company/s/Connection-Root-4SFd7UTAvfOtR00hg9r73t"
}
List All Connection Paths
Returns an object that includes a list of "entries". Each entry is a connection path object.
GET /v2/connections/paths
Permissions
-
The response will only include connection paths that the user account associated with the API access token has access to. Admins can access all paths.
Admin accounts automatically have access to all connections.
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
page string [optional]
An identifier used for pagination.
limit number [optional]
The number of entries to be returned.
cURL Request
curl --location --request GET 'https://api.sigmacomputing.com/v2/connections/paths?page={page}&limit={limit}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
Response
{
"entries": [{
"connectionId": string,
"entries": Array<{
"connectionId": string,
"path": Array<string>
}>
}],
"hasMore": boolean,
"total": number,
"nextPage": string
}
Example
Example Request:
curl --location --request GET 'https://api.sigmacomputing.com/v2/connections/paths?page=2&limit=25' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
Example Response:
{
"entries": [
{
"connectionId": "1e8e9947-c9f5-41ce-93b0-b80d0ddf2177",
"path": [
"EXAMPLES"
]
},
{
"connectionId": "1e8e9947-c9f5-41ce-93b0-b80d0ddf2177",
"path": [
"EXAMPLES",
"BIKES"
]
},
{
"connectionId": "1e8e9947-c9f5-41ce-93b0-b80d0ddf2177",
"path": [
"EXAMPLES",
"BITCOIN",
"PRICES"
]
}
],
"hasMore": true,
"total": 139,
"nextPage": "3"
}
Look up a Connection Path
Returns the Connection Inode Object associated with the requested warehouse connection path.
POST /v2/connection/{connectionId}/lookup
Permissions
-
The user account associated with the API access token must have access to the connection schema being requested.
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
path array<string>
The path to look up in the connection. Your path should include the database name (if applicable to your CDW provider), the schema, and a table.
Max array length: 3
cURL Request
curl --location --request POST 'https://api.sigmacomputing.com/v2/connection/{connectionId}/lookup' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{"path": {path}}'
Response
{
"kind": "scope" | "table",
"inodeId": string,
"url": string
}
Example
Example Request:
curl --location --request POST 'https://api.sigmacomputing.com/v2/connection/48726c98-8495-4488-bb6e-108a115b732df/lookup' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{"path": [
"plugs_data" // database name; only if applicable to your CDW provider
"plugs_electronics", // scope
"d_product" // table located within the above scope
]}'
Example Response:
{
"kind": "table",
"inodeId": "48726c98-8495-4488-bb6e-108a115b732df",
"url": "https://app.sigmacomputing.com/my-company/t/6gwySjidOrmByoqcLetqNU"
}
Create or Update Connection Path Grants
This endpoint creates a grant to the connection path for users or teams.
POST /v2/connections/paths/{connectionPathId}/grants
Permissions
- You must be an admin to use this endpoint.
Path Parameters
connectionPathId | string (required)
The connection path's unique identifier.
Request Parameters
grants | array <{grantee, permission}>
A list of one or more objects describing the grant(s) to be added.
Example — Single Grant
{
grantee: {memberId: string} |{teamId: string}
permission: string// 'edit', 'organize', 'explore', 'view'
}
cURL Request
curl --location --request POST 'https://api.sigmacomputing.com/v2/paths/{connectionPathId}/grants \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"grants": [
{
"grantee": {
"memberId": "MK56SY1jeAy3EcRYeqlzHJectzy60"
},
"permission": "annotate"
}
]
}'
Response
200 OK
{}
List Connection Path Grants
This endpoint returns a list of connection path grants.
GET /v2/connections/paths/{connectionPathId}/grants
Permissions
- You must be an admin to use this endpoint.
Path Parameters
connectionPathId | string (required)
The connection path's unique identifier.
Query Parameters
page | string [optional]
An identifier used for pagination.
limit | number [optional]
The number of connections to return.
cURL Request
curl --location --request GET 'https://api.sigmacomputing.com/v2/paths/{connectionPathId}/grants?limit=<number>&page=<page-string> \
--header 'Authorization: Bearer {access_token}' \
Response
{
"entries": [
{
"grantId": "string",
"organizationId": "string",
"memberId": "string",
"teamId": "string",
"permission": "string",
"createdBy": "string",
"updatedBy": "string",
"createdAt": "2023-01-19T03:07:05.688Z",
"updatedAt": "2023-01-19T03:07:05.688Z"
}
],
"hasMore": true,
"nextPage": "string"
}
Delete Connection Path Grant
This endpoint deletes a connection path grant.
DELETE /v2/connections/paths/{connectionPathId}/grants/{grantId}
Permissions
- You must be an admin to use this endpoint.
Path Parameters
connectionPathId | string (required)
The connection path's unique identifier.
grantId | string (required)
The unique identifier associated with the grant.
cURL Request
curl --location --request DELETE 'https://api.sigmacomputing.com/v2/paths/{connectionPathId}/grants/{grantId} \
--header 'Authorization: Bearer {access_token}' \
Response
{}
Related Resources
API Documentation
Get Started with Sigma's API
Create an API Token and Client ID
Identify Unique IDs in Sigma