Run Trigger
Links two workspaces so that an apply in the source queues a run in the destination. See Run Triggers.
Entity fields:
data.type
string
Should be "runTrigger"
data.attributes.enabled
boolean
Disabled triggers are kept but never fire (default true)
data.relationships.sourceWorkspace.data
object
Workspace whose apply fires the trigger. Cannot be changed after creation
data.relationships.destinationWorkspace.data
object
Workspace that receives the run. Cannot be changed after creation
data.relationships.template.data
object
Template to run in the destination (OPTIONAL, defaults to the workspace's default template)
Example:
{
"data": {
"type": "runTrigger",
"attributes": { "enabled": true },
"relationships": {
"sourceWorkspace": { "data": { "type": "workspace", "id": "{{sourceWorkspaceId}}" } },
"destinationWorkspace": { "data": { "type": "workspace", "id": "{{destinationWorkspaceId}}" } }
}
}
}A trigger that would create a loop is rejected with the offending path in the error. To list both directions for a workspace, filter with sourceWorkspace.id==X,destinationWorkspace.id==X (a comma is OR).
Supported Operations
Returns the collection of type runTrigger
Filters the collection of runTrigger using a 'disjoint' RSQL expression
Filters the collection of runTrigger using a 'joined' RSQL expression
Number of pages to return. Can be used with page[size]
Number of elements per page. Can be used with page[number]
Offset from 0 to start paginating. Can be used with page[limit]
Maximum number of items to return. Can be used with page[offset]
For requesting total pages/records be included in the response page meta data
Successful response
GET /api/v1/runTrigger HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
{
"data": [
{
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"enabled": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"destinationWorkspace": {
"data": [
null
]
},
"sourceWorkspace": {
"data": [
null
]
},
"template": {
"data": [
null
]
}
}
}
],
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Creates an item of type runTrigger
Successful response
POST /api/v1/runTrigger HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 332
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"enabled": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"destinationWorkspace": {
"data": [
null
]
},
"sourceWorkspace": {
"data": [
null
]
},
"template": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"enabled": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"destinationWorkspace": {
"data": [
null
]
},
"sourceWorkspace": {
"data": [
null
]
},
"template": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Returns an instance of type runTrigger
runTrigger Identifier
Successful response
GET /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"enabled": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"destinationWorkspace": {
"data": [
null
]
},
"sourceWorkspace": {
"data": [
null
]
},
"template": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Modifies an instance of type runTrigger
runTrigger Identifier
Successful response
No content
PATCH /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 332
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"createdBy": null,
"createdDate": null,
"enabled": null,
"updatedBy": null,
"updatedDate": null
},
"relationships": {
"destinationWorkspace": {
"data": [
null
]
},
"sourceWorkspace": {
"data": [
null
]
},
"template": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}Successful response
No content
Deletes an instance of type runTrigger
runTrigger Identifier
Successful response
No content
DELETE /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Last updated
Was this helpful?