Skip to main content
POST
/
api
/
v1
/
agents
Create agent
curl --request POST \
  --url https://api.logfleet.io/api/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "hostname": "<string>",
  "labels": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "hostname": "<string>",
  "ip_address": "<string>",
  "version": "<string>",
  "status": "pending",
  "labels": {},
  "last_heartbeat_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login

Body

application/json
name
string
required
hostname
string
labels
object

Response

Agent created

id
string<uuid>
organization_id
string<uuid>
name
string
hostname
string
ip_address
string
version
string
status
enum<string>
Available options:
pending,
online,
offline,
error
labels
object
last_heartbeat_at
string<date-time>
created_at
string<date-time>
updated_at
string<date-time>