Jobs
This endpoint is used to create, update, search or delete jobs for a particular Terrakube workspace.
To use this endpoint you need to create a Terrakube workspace.
Entity fields:
data.type
string
Should be "job"
data.attributes.overrideBranch
string
Branch that will be use to execute the job
data.attributes.templateReference
string
Terrakube template id to use when running the job
data.relationships.workspace.data.type
string
Should be "workspace"
data.relationships.workspace.data.Id
string
Should be the VCS Workspace Id (OPTIONAL)
Example:
{
"data": {
"type": "job",
"attributes": {
"overrideBranch": "main"
"templateReference": "XXXXXXXXX"
},
"relationships":{
"workspace":{
"data":{
"type": "workspace",
"id": "{{workspaceId}}"
}
}
}
}
}
Supported Operations
Creates an item of type job and adds it to job
organization Identifier
Successful response
POST /api/v1/organization/{organizationId}/job HTTP/1.1
Host:
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 548
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"approvalTeam": null,
"comments": null,
"commitId": null,
"createdBy": null,
"createdDate": null,
"output": null,
"overrideBranch": null,
"planChanges": null,
"refresh": null,
"refreshOnly": null,
"status": null,
"tcl": null,
"templateReference": null,
"terraformPlan": null,
"updatedBy": null,
"updatedDate": null,
"via": null
},
"relationships": {
"address": {
"data": [
null
]
},
"organization": {
"data": [
null
]
},
"step": {
"data": [
null
]
},
"workspace": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"approvalTeam": null,
"comments": null,
"commitId": null,
"createdBy": null,
"createdDate": null,
"output": null,
"overrideBranch": null,
"planChanges": null,
"refresh": null,
"refreshOnly": null,
"status": null,
"tcl": null,
"templateReference": null,
"terraformPlan": null,
"updatedBy": null,
"updatedDate": null,
"via": null
},
"relationships": {
"address": {
"data": [
null
]
},
"organization": {
"data": [
null
]
},
"step": {
"data": [
null
]
},
"workspace": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Returns an instance of type job
organization Identifier
job Identifier
Successful response
GET /api/v1/organization/{organizationId}/job/{jobId} HTTP/1.1
Host:
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"approvalTeam": null,
"comments": null,
"commitId": null,
"createdBy": null,
"createdDate": null,
"output": null,
"overrideBranch": null,
"planChanges": null,
"refresh": null,
"refreshOnly": null,
"status": null,
"tcl": null,
"templateReference": null,
"terraformPlan": null,
"updatedBy": null,
"updatedDate": null,
"via": null
},
"relationships": {
"address": {
"data": [
null
]
},
"organization": {
"data": [
null
]
},
"step": {
"data": [
null
]
},
"workspace": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Modifies an instance of type job
organization Identifier
job Identifier
Successful response
PATCH /api/v1/organization/{organizationId}/job/{jobId} HTTP/1.1
Host:
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 548
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"approvalTeam": null,
"comments": null,
"commitId": null,
"createdBy": null,
"createdDate": null,
"output": null,
"overrideBranch": null,
"planChanges": null,
"refresh": null,
"refreshOnly": null,
"status": null,
"tcl": null,
"templateReference": null,
"terraformPlan": null,
"updatedBy": null,
"updatedDate": null,
"via": null
},
"relationships": {
"address": {
"data": [
null
]
},
"organization": {
"data": [
null
]
},
"step": {
"data": [
null
]
},
"workspace": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Successful response
No content
Deletes an instance of type job
organization Identifier
job Identifier
Successful response
DELETE /api/v1/organization/{organizationId}/job/{jobId} HTTP/1.1
Host:
Accept: */*
Successful response
No content
Last updated
Was this helpful?