Agent
1. Create
POST api/v1/agents/
For example, a k8s has been started in advance, and an agent is configured to connect to it. Then we register the agent's API URL to Cello.
Body Parameters | Type | Note |
|---|---|---|
name | string |
|
type | string |
|
urls | string |
|
Example Request Body
{
"name": "cello-agent-docker",
"type": "docker",
"urls": "http://cello.docker.agent:5001"
}
Example Response Body
{
"data": {
"id": "64b4b978-03e7-4bcc-b0f7-4601eed71e47"
},
"msg": null,
"status": "successful"
}2. List
GET api/v1/agents/
List all agents with criteria
Body Parameters | Type | Note |
|---|---|---|
id | UUID |
|
name | string |
|
status | string |
|
create_at | date |
|
type | string |
|
urls | string |
|
organization | UUID |
|
Example Response Body
{
"data": {
"total": 1,
"data": [
{
"id": "fe910cd9-e8fe-4af1-a184-077da69f36e0",
"name": "cello-agent-docker",
"status": "active",
"created_at": "2021-12-17T02:44:48.006079Z",
"type": "docker",
"urls": "http://cello.docker.agent:5001",
"organization": "c09e3be4-3bd4-4ae3-8b27-7e8e56c853de"
}
]
},
"msg": null,
"status": "successful"
}
3. Retrieve
GET api/v1/agents/{id}/
Retrieve an message of the agent with id
Path Parameters | Type | Note |
|---|---|---|
id | UUID | agent id |
Example Respone Body
{
"data": {
"id": "64b4b978-03e7-4bcc-b0f7-4601eed71e47",
"name": "cello-agent-docker",
"status": "active",
"created_at": "2021-12-10T05:51:01.420669Z",
"type": "docker",
"organization_id": "76ebf68b-019f-45ff-abef-67e3a3d1752f"
},
"msg": null,
"status": "successful"
}
4. Update
PUT api/v1/agents/{id}/
Update an agent with the id
Path Parameters | Type | Note |
|---|---|---|
id | UUID | agent id |
Body Parameters | Type | Note |
|---|---|---|
name | string |
|
Example Requet Body
{
"name": "test"
}Example Response Body
{
"data": null,
"msg": null,
"status": "successful"
}
5. Delete
DELETE api/v1/agents/{id}/
Delete the agent with the given id.
Path Parameters | Type | Note |
|---|---|---|
id | UUID | agent id |