Agent
This endpoint is used to create, update, search or delete job agents for a Terrakube organization.
Entity fields:
data.type
string
Should be "agent"
data.attributes.name
string
Agent pool name
data.attributes.description
string
agent pool description
data.attributes.url
string
URL where the executor component will be available. Example: http://terrakube-executor-service.self-hosted-executor
Example:
POST {{terrakubeApi}}/api/v1/organization/{{organizationId}}/agent
{
"data": {
"type": "agent",
"attributes": {
"name": "sample-agent",
"url": "http://localhost:8090",
"description": "This is a sample agent"
}
}
}
Supported Operations:
Returns the relationship agent
organization Identifier
Filters the collection of agent using a 'disjoint' 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/organization/{organizationId}/agent HTTP/1.1
Host:
Accept: */*
Successful response
{
"data": [
{
"type": "text",
"id": "text",
"attributes": {
"description": null,
"name": null,
"url": null
},
"relationships": {
"organization": {
"data": [
null
]
}
}
}
],
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Creates an item of type agent and adds it to agent
organization Identifier
Successful response
POST /api/v1/organization/{organizationId}/agent HTTP/1.1
Host:
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 218
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"description": null,
"name": null,
"url": null
},
"relationships": {
"organization": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"description": null,
"name": null,
"url": null
},
"relationships": {
"organization": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Returns an instance of type agent
organization Identifier
agent Identifier
Successful response
GET /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Host:
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"description": null,
"name": null,
"url": null
},
"relationships": {
"organization": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Deletes an instance of type agent
organization Identifier
agent Identifier
Successful response
DELETE /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Host:
Accept: */*
Successful response
No content
Modifies an instance of type agent
organization Identifier
agent Identifier
Successful response
PATCH /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Host:
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 218
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"description": null,
"name": null,
"url": null
},
"relationships": {
"organization": {
"data": [
null
]
}
}
},
"included": [
{
"type": "text",
"id": "text",
"attributes": {},
"relationships": {}
}
]
}
Successful response
No content
Last updated
Was this helpful?