Datasets
Associate datasets with jobs and configure snapshot settings.
GET /api/jobs/{id}/datasets
List dataset associations for a job.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
Response:
{
"_links": {
"self": { "href": "/api/jobs/{id}/datasets" }
},
"_embedded": {
"inf:dataset": [
{
"alias": "sales",
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"datasetId": "sales-2024",
"index": 0,
"snapshots": {
"when": "before",
"snapshotDatasets": [
{ "datasetId": "sales-2024" }
]
}
}
]
},
"start": 0,
"count": 1,
"total": 1
}
POST /api/jobs/{id}/datasets
Add a dataset association to a job.
Authentication: Required
Permissions: Requires job:edit permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
alias | string | Yes | Short name for dataset reference |
datasetId | string | Yes | Dataset ID or natural ID |
snapshots | object | No | Snapshot configuration |
Example:
{
"alias": "sales",
"datasetId": "sales-2024",
"snapshots": {
"when": "before",
"snapshotDatasets": ["sales-2024"]
}
}
Response:
201 Created
GET /api/jobs/{id}/datasets/{alias}
Get a specific dataset association.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
alias | string | Dataset alias |
Response:
{
"alias": "sales",
"datasetId": "sales-2024",
"index": 0,
"snapshots": {
"when": "before",
"snapshotDatasets": [
{ "datasetId": "sales-2024" }
]
}
}
PUT /api/jobs/{id}/datasets/{alias}
Update a dataset association.
Authentication: Required
Permissions: Requires job:edit permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
alias | string | Dataset alias |
Request Body:
{
"datasetId": "sales-2024-updated",
"snapshots": {
"when": "after",
"snapshotDatasets": ["sales-2024-updated"]
}
}
Response:
200 OK
DELETE /api/jobs/{id}/datasets/{alias}
Remove a dataset association from a job.
Authentication: Required
Permissions: Requires job:edit permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
alias | string | Dataset alias |
Response:
204 No Content
PUT /api/jobs/{id}/datasets/{alias}/change-ownership
Change the owner of a job dataset.
Authentication: Required
Permissions: Requires job:edit permission
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
alias | string | Dataset alias |
Request Body:
{
"ownerId": "team:data-science"
}
Response:
200 OK
GET /api/jobs/{id}/datasets/{alias}/permissions
Check user's permissions for a job dataset.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
id | string | Job ID or natural ID |
alias | string | Dataset alias |
Response:
{
"permissions": {
"read": true,
"write": false,
"refresh": true
}
}