Create sentry

Registers a new sentry agent. Returns an installation script after the sentry is created.

HTTP Request

POST /api/sonar/sentries
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d '{"sentry_guid":"sentry-001","auth_token":"a1b2c3d4e5f6","os":"linux_x64","base":"https://198.51.100.1:8443"}' \
     -X POST https://HOSTNAME/api/sonar/sentries
Request Parameters
Request Body Parameters
KeyRequiredTypeDescriptionNote
sentry_guidYesStringSentry identifier
auth_tokenYesStringAuthentication token
osYesStringOS type
baseYesStringConnection address

Success Response

{
  "script": "curl -sL https://198.51.100.1:8443/sentry/install | bash -s -- sentry-001 a1b2c3d4e5f6"
}

Error Responses

Required argument is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "sentry_guid should be not null"
}