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
Related Resources

Endpoints

GET /v2/connections/paths

      Returns an object that includes a list of "entries". Each entry is a connection path object.
      Learn more.
      Try it in Swagger

POST /v2/connection/{connectionId}/lookup

      Returns the connection inode object associated with the requested warehouse connection path. Learn more.

      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

Try it in Swagger

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

Try it in Swagger

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}}'

What's my connectionId?

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"
}

 

Related Resources

API Documentation

Get Started with Sigma's API
Create an API Token and Client ID
Identify Unique IDs in Sigma

Product Documentation

Creating a Connection


Was this page helpful?
Yes No