Contracts

Soda Cloud API Contract Endpoints

List contracts

get
/api/v1/contracts

This endpoint allows you to list contracts in your organization.

This GET is a paginated API that uses the following parameters to request specific details:

  • size: Supply an integer value between 10 and 1000, inclusive. The default value is 10.

  • page: Supply an integer value. The default value is 0.

  • datasetId: Optionally, use this parameter to list only the contracts for a specific dataset.

  • datasetQualifiedName: Optionally, use this parameter instead of datasetId to identify the dataset by its qualified name. Do not supply both datasetId and datasetQualifiedName.

Authorization

When filtering by dataset, only users with View dataset permission on the specified dataset can list its contracts. When no dataset filter is supplied, all contracts in the organization are returned.

Authentication

User authentication required: true

This endpoint enforces authentication using the API keys you provide in the Basic authentication header.

Tags

Contracts

Rate limiting

60 requests/60 seconds

Authorizations
AuthorizationstringRequired
Query parameters
datasetIdstringOptional
datasetQualifiedNamestringOptional
pageinteger · int32Optional
sizeinteger · int32Optional
Responses
chevron-right
200

Successful response

application/json
firstbooleanRequired
lastbooleanRequired
numberinteger · int32Required
sizeinteger · int32Required
totalElementsinteger · int32Required
totalPagesinteger · int32Required
get
/api/v1/contracts

Create a contract

post
/api/v1/contracts

This endpoint allows you to create a new contract on a dataset. The contract is initialized with a template containing the dataset identifier and an empty columns list. Use the publish endpoint to replace this with your full contract YAML.

Provide either datasetId or datasetQualifiedName in the request body to identify the target dataset. Exactly one must be supplied. If both are supplied, the request is rejected with a 400 error.

Authorization

Only users with Manage contracts permission can create contracts.

Authentication

User authentication required: true

This endpoint enforces authentication using the API keys you provide in the Basic authentication header.

Tags

Contracts

Rate limiting

100 requests/60 seconds

Authorizations
AuthorizationstringRequired
Body
contentsstringRequired
datasetIdstringOptional
datasetQualifiedNamestringOptional
Responses
chevron-right
200

Successful response

application/json
post
/api/v1/contracts

Get a contract

get
/api/v1/contracts/{contractId}

This endpoint allows you to retrieve a specific contract, including its YAML content.

Authorization

Only users with View dataset permission can view contracts.

Authentication

User authentication required: true

This endpoint enforces authentication using the API keys you provide in the Basic authentication header.

Tags

Contracts

Rate limiting

1000 requests/60 seconds

Authorizations
AuthorizationstringRequired
Path parameters
contractIdstringRequired
Responses
chevron-right
200

Successful response

application/json
get
/api/v1/contracts/{contractId}

Publish a contract

post
/api/v1/contracts/{contractId}

This endpoint allows you to publish new YAML content for an existing contract.

The contents field must contain valid Soda contract YAML. If the YAML is malformed or does not conform to the contract schema, the request is rejected with a 400 error.

Authorization

Only users with Manage contracts permission can publish contracts.

Authentication

User authentication required: true

This endpoint enforces authentication using the API keys you provide in the Basic authentication header.

Tags

Contracts

Rate limiting

100 requests/60 seconds

Authorizations
AuthorizationstringRequired
Path parameters
contractIdstringRequired
Body
contentsstringRequired
Responses
chevron-right
200

Successful response

application/json
post
/api/v1/contracts/{contractId}

Last updated

Was this helpful?