Prerequisites
Before you begin, make sure you have the following:- A account.
- Valid API credentials for Matillion API access.
- An access token with the required privileges. For more information, read Obtaining an API access token.
- A project. The examples in this article use the project ID
3dda0acf-e646-4f4b-b4f6-e00449b69427; you should substitute your own project ID. For how to get the project ID through the API, see below. - A that has been deployed to your cloud infrastructure. The examples in this article use the ID
2734aa6f-0c64-4d2b-9406-f44dc8f1f3b6; you should substitute your own ID. For how to get the ID through the API, see below. - Any secrets used in the Streaming pipeline must be added to the secrets manager accessible to the . The examples in this article use the secrets
sqlserver-password,snowflake-private-key, andsnowflake-private-key-passphraseadded to the Azure Key Vaultstreaming-key-vaultthat the has permissions to read; you should substitute your own secrets.
Get the project ID
Retrieve the list of projects using the Project API. Base URL:GET /v1/projects
Example response:
3dda0acf-e646-4f4b-b4f6-e00449b69427.
Get the ID
Once you have the project ID, use the Environment API to obtain details about the environment in which the project is running. These details include the ID (defaultAgentID).
Base URL: GET /v1/projects/{projectId}/environments
Example response:
2734aa6f-0c64-4d2b-9406-f44dc8f1f3b6.
Create a Streaming pipeline
Use an API endpoint to create a new Streaming pipeline in a specified project. The pipeline configuration must be defined in a JSON object, which you will send in the body of a POST request. The POST request used to create the pipeline is: Base URL:POST /v1/projects/{projectId}/streaming-pipelines
This requires the following headers to be specified:
| Header | Value |
|---|---|
| content-type | application/json |
| authorization | bearer <api token> |
streaming-pipeline.json and the API token is set as the environment variable DPC_TOKEN.
A successful request should return a 201 status code and a response body containing the newly created Streaming pipeline definition. For example:
streamingPipelineId field is a UUID value that’s generated for the pipeline when it’s created and acts as a unique identifier for the pipeline. You will need this identifier to perform management of the pipeline through the API, such as viewing, starting and stopping, or checking the status of the pipeline.
If the streaming pipeline definition sent in the POST body is incomplete or invalid, the response code will be 400 and the response body will contain a list of the issues and the path to the relevant fields from the request.
For example, using the same request body as above but removing the streamingSource.connection.username and streamingTarget.connection.authentication fields to make the request invalid, the response body would be:
View a Streaming pipeline
The Streaming pipeline ID can be used to view the Streaming pipeline definition, using the following GET call: Base URL:GET /v1/projects/{projectId}/streaming-pipelines/{streamingPipelineId}
An example of this request in cURL is:
Start or stop a Streaming pipeline
The Streaming pipeline ID can be used to start or stop the pipeline, using the following POST call: Base URL:POST /v1/projects/{projectId}/streaming-pipelines/{streamingPipelineId}/commands
The request body must contain the start or stop commands:
200 status code, indicating that the has received the request and initiated the pipeline start or stop process.
An example of this request in cURL is:
Check the Streaming pipeline status
The Streaming pipeline ID can be used to check the status of the pipeline, using the following GET call: Base URL:GET /v1/projects/{projectId}/streaming-pipelines/{streamingPipelineId}/status
This will return a response body with a status field value. If the pipeline has just been started, this may return a value of starting or streaming.
An example of this request in cURL is:

