Profiles API

Run your Profiles project programmatically and check its run status.
Available Plans
  • enterprise

You can use the Profiles API to programmatically run your Profiles project and check its run status.

Prerequisites

info
For production use cases, RudderStack recommends using a service access token instead of personal access token.

Authentication

The Profiles API uses Bearer authentication in the following format:

Authorization: Bearer <SERVICE_ACCESS_TOKEN>

Base URL

Use the base URL for your API requests depending on your region:

Run project

You can trigger the run of a Profiles project using the below endpoint:

POST
/sources/<profilesID>/start
info
  • Your Service Access Token must have the required permissions for authenticating the API to run this endpoint.
  • To obtain the Profiles project ID, go to your project in the RudderStack dashboard and note it down from the URL:

Path parameters

profilesID
Required
String
ID of the Profiles project for which you want to trigger a run.

Request body

parameters
Optional
Array
Specify the parameters and their associated values to be passed for running the project. Multiple parameters can be passed. Each parameter and its associated value is a single string. Allowed parameters:

  • --model_refs
  • --begin_time
  • --end_time
  • --rebase_incremental

Example request

Example response

{
  "runId": "<run_id>"
}

Response codes

CodeDescription
200Run started for the Profiles project. RudderStack also returns a run ID for the project.
409Profiles project is already running for the specified source ID.

Get run status

You can get the run status of your Profiles project using the below endpoint:

GET
/sources/{profilesID}/runs/{runId}/status

Path parameters

profilesID
Required
String
ID of the Profiles project for which you want to trigger a run.
runId
Required
String
ID of the Profiles project’s run.

info
You can obtain the runId as the response of the above API endpoint (/sources/<profilesID>/start).

Example request

Example response

{
  "jobId": "string",
  "jobRunId": "string",
  "status": "string",
  "startedAt": "2024-05-31T06:48:08.228Z",
  "finishedAt": "2024-05-31T06:48:08.228Z",
  "tasks": [{
    "taskId": "string",
    "taskRunId": "string",
    "startedAt": "2024-05-31T06:48:08.228Z",
    "finishedAt": "2024-05-31T06:48:08.228Z"
  }]
}

Response codes

CodeDescription
200Successfully retrieved the run status of the project.

Questions? Contact us by email or on Slack