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 collection of agent
organization Identifier
Successful response
GET /api/v1/organization/{organizationId}/agent HTTP/1.1
Accept: */*
Successful response
{
"data": []
}Creates an item of type agent
organization Identifier
Successful response
POST /api/v1/organization/{organizationId}/agent HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 168
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text",
"url": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
}
}
}
}Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text",
"url": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
}
}
}
}Returns an instance of type agent
organization Identifier
agent Identifier
Successful response
GET /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Accept: */*
Successful response
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text",
"url": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
}
}
}
}Deletes an instance of type agent
organization Identifier
agent Identifier
Successful response
No content
DELETE /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Accept: */*
Successful response
No content
Modifies an instance of type agent
organization Identifier
agent Identifier
Successful response
No content
PATCH /api/v1/organization/{organizationId}/agent/{agentId} HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 168
{
"data": {
"type": "text",
"id": "text",
"attributes": {
"name": "text",
"description": "text",
"url": "text"
},
"relationships": {
"organization": {
"id": "text",
"type": "organization"
}
}
}
}Successful response
No content
Last updated
Was this helpful?