APINHI

Add an NHI source

Add a source. The credentials are checked against the provider first; a failure returns 400 and stores nothing.

POST/nhi/sources

Add a source. The credentials are checked against the provider first; a failure returns 400 and stores nothing.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating a source. The provider is the config's provider tag. Credentials are validated before the source is stored; a source that cannot authenticate is never created.

Response Body

application/json

application/json

curl -X POST "https://example.com/nhi/sources" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "config": {      "provider": "microsoft_entra",      "tenant_id": "string",      "client_id": "string",      "client_secret": "string"    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "provider": "microsoft_entra",  "name": "string",  "external_id": "string",  "status": "connected",  "last_checked_at": "2019-08-24T14:15:22Z",  "config": {    "provider": "microsoft_entra",    "tenant_id": "string",    "client_id": "string",    "has_client_secret": true  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}