cURL
curl --request POST \
--url http://localhost:4100/v1/agents/{code}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('http://localhost:4100/v1/agents/{code}/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"address": "<string>",
"publicKey": "<string>",
"fingerprint": "<string>",
"name": "<string>",
"client": "<string>",
"profile": "<string>",
"enabled": true,
"connectedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"disconnectedAt": "2023-11-07T05:31:56Z",
"origin": "local_key",
"oauthClientId": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}Agents
Post v1agents claim
Owner session required.
cURL
curl --request POST \
--url http://localhost:4100/v1/agents/{code}/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('http://localhost:4100/v1/agents/{code}/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"address": "<string>",
"publicKey": "<string>",
"fingerprint": "<string>",
"name": "<string>",
"client": "<string>",
"profile": "<string>",
"enabled": true,
"connectedAt": "2023-11-07T05:31:56Z",
"lastSeenAt": "2023-11-07T05:31:56Z",
"disconnectedAt": "2023-11-07T05:31:56Z",
"origin": "local_key",
"oauthClientId": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"correlationId": "<string>"
}
}Authorizations
Response
Success.