Skip to main content
Services API
Updated over a week ago

Overview

The Services API enables capturing service catalog data and team ownership from any data source.

API methods

services.sync

Sync a service with DX.

Required arguments

Name

Description

reference_id

string - Unique identifier for the service to support idempotent updates.

Example:

36b1f37a-e60f-4ccd-b0c4-878a6d1175fe

name

string - The name of the service.

Example:
​auth-service

Optional arguments

Name

Description

dx_team_id

string - The ID of the dx team who owns the service. See Finding DX Team ID for locating your team's ID's.

Example:

MjI2Mjc

Example

 curl --request POST \
--url 'https://yourinstance.getdx.net/api/services.sync' \
--header 'Accepts: application/json' \
--header 'Authorization: Bearer your_bearer_token_here' \
--header 'Content-Type: application/json' \
--data '{
"reference_id": "36b1f37a-e60f-4ccd-b0c4-878a6d1175fe",
"name": "auth-service",
"dx_team_id": "MjI2Mjc"
}'

Error codes

Error Code

Description

not_authed

This error occurs if the API request does not include a valid API key for authentication.

invalid_arguments

The provided arguments are invalid. Ensure you're passing a reference_id.

Finding DX Team IDs

The easiest way to find a DX Team ID is in Data Studio with the following SQL:
​

SELECT name, source_id FROM dx_teams;

The source_id is the DX Team ID you'll need use as your dx_team_id argument. Below is an example of running the SQL query in Data Studio:
​

Did this answer your question?