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.
Create a secret reference
Use this API endpoint to create a new secret reference in a specified project. Currently, the only supportedsecretReferenceType is PASSWORD. If you use a Hybrid SaaS setup, you can create secret references that point to your cloud provider’s secret manager. If you use a Full SaaS setup, you can create secret references hosted by Matillion.
To create a secret reference in any project, you first need to find and note your project ID and ID.
Find your project ID
Retrieve the list of projects using the Project API and copy theid value–this is your project ID.
Base URL: GET /v1/projects
Example response:
Find your ID
Click the menu button in the top left of any screen, then click Manage → Agents. If you use a Hybrid SaaS setup (customer-hosted s), in the row for the , click the three dots … → Agent details. Scroll down to Agent environment variables and copy the AGENT_ID value. Alternatively, if you use a Full SaaS setup (Matillion-hosted s), hover over the and click Copy to clipboard next to the ID.Create a secret reference for an AWS customer-hosted project
To create a secret reference for a project connected to the AWS Secrets Manager, you will need your project ID, ID, and AWS Secrets Manager secret key and secret name. Base URL:POST /v1/projects/{projectId}/secret-references/{secretReferenceName}
Configure the following variables:
projectId: Enter the target project ID.secretReferenceName: Enter a name for the new secret reference.
Create a secret reference for an Azure customer-hosted project
To create a secret reference for a project connected to an Azure Key Vault, you will need your project ID, ID, and Azure Key Vault secret key and secret name. Base URL:POST /v1/projects/{projectId}/secret-references/{secretReferenceName}
Configure the following variables:
projectId: Enter the target project ID.secretReferenceName: Enter a name for the new secret reference.
Create a secret reference for a Matillion-hosted project
To create a secret reference that is hosted and managed by Matillion, you will need your project ID and the ID of your Matillion-hosted . Base URL:POST /v1/projects/{projectId}/secret-references/{secretReferenceName}
Configure the following variables:
projectId: Enter the target project ID.secretReferenceName: Enter a name for the new secret reference.
List secret references
Use this API endpoint to retrieve a list of secret references within a specific project. It supports pagination for large result sets and optional filtering by secret reference type and providers. If no value is provided forsecretReferenceTypes, only PASSWORD types will be returned.
To retrieve a list of secret references, you will need your project ID—see Find your project ID for how to find this—and any secret reference types that you want to use to filter the results.
List secret references for an AWS or Azure customer-hosted project
To list secret references for an AWS or Azure customer-hosted project, you will need your project ID. The response body will vary based on where the used in the project is hosted, e.g. AWS or Azure. Base URL:GET /v1/projects/{projectId}/secret-reference
Configure the following variables:
projectId: Enter the target project ID.
vaultSecretKey and vaultSecretName will be your Azure secret key and secret name. The vaultType value will be Azure.
List secret references for a Matillion-hosted project
To list secret references for a Matillion-hosted project, you will need your project ID. Base URL:GET /v1/projects/{projectId}/secret-reference
Configure the following variables:
projectId: Enter the target project ID.
Copy secret references from one project to another
Use this API endpoint to list the secret references in one project (the source project). A post-response import script will then build the request body to create these secret references in another project (the destination project). Before you begin, make sure you have the following:- Postman to enter environment variables and the post-response import script.
- The project IDs for the source project and destination project—see Find your project ID for how to find these project IDs.
- The ID for the destination project–see Find your ID for how to find this.
- Make a request using the following base URL, entering the destination project ID as the
projectIdvariable:GET /v1/projects/{projectId}/secret-references. - Add the post-response import script shown below in the Scripts → Post-response section and configure the following variables:
agentId: Enter the ID for the destination project.projectId: Enter the destination project ID.secretsData: Leave this empty—this will be populated by the post-response import script.
- Click Send.
Delete a secret reference
Use this API endpoint to delete an existing secret reference. To delete a secret reference, you will need the ID of the project containing the secret reference and the name of the secret reference. Base URL:DELETE /v1/projects/{projectId}/secret-references/{secretReferenceName}
Configure the following variables:
projectId: Enter the target project ID.secretReferenceName: Enter the name of the secret reference to delete.

