Create or update principal
Creates or updates a principal identified by the principal query parameter. The body sets type (1 — application, 2 — user) and a display name. On success the API returns 204 No Content with an empty body.
{{host}}/v1/principal?principal={{principal}}- principalstringRequired
Unique identifier of the principal in the URL.
example: tram_client
- x-api-keyRequired
Your BigState API key.
*provide api key here* - Content-TypeRequired
MIME type of the request body.
application/json - AcceptRequired
MIME types the client can understand in the response.
application/json
See authentication headers here.
- Application principal (type 1){"type": 1,"name": "Client for tram app"}
- typenumberRequired
Principal kind: application (integration) or user.
Values
- 1 — application
- 2 — user
- namestringRequired
Human-readable name for this principal.
- 204Response body · no content
Principal was created or updated. No response body.
- 401
Unauthorized.
- 403
Access denied. The caller does not have sufficient rights to perform this operation.
- 400Response body · object
Bad request.
{"error": 6,"desc": "Invalid request"}- errornumber
Numeric error code. See the error codes reference for the full list.
- descstring
Human-readable description of the error.
Create application principal
Create or replace a principal (type 1 = application, 2 = user). Success: 204, no body.
curl https://api.bigstate.dev/v1/principal?principal=tram_client \
--request POST \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"type": 1,
"name": "Client for tram app"
}'