REST API reference
Application definitions
Read and manage reusable application structures.
Get the standalone config JSON Schema
GET/application-definition-config-schema/
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definition-config-schema/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
401 |
The request was not completed. |
403 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Get the default client or deal application
GET/application-definition-defaults/{context}/
Parameters
| Name |
Location |
Type |
Required |
context |
path |
string |
Yes |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definition-defaults/{context}/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Set the default client or deal application
PUT/application-definition-defaults/{context}/
Parameters
| Name |
Location |
Type |
Required |
context |
path |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"definition_id": {
"pattern": "^appdef_[a-z0-9]+$",
"type": "string"
}
},
"required": [
"definition_id"
],
"type": "object"
}
Request
curl --request PUT \
--url 'https://api.staging.levr.ai/api/external/v1/application-definition-defaults/{context}/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
List application definitions
GET/application-definitions/
Parameters
| Name |
Location |
Type |
Required |
search |
query |
string |
No |
ordering |
query |
string |
No |
published |
query |
boolean |
No |
is_shared |
query |
boolean |
No |
created_after |
query |
string |
No |
created_before |
query |
string |
No |
updated_after |
query |
string |
No |
updated_before |
query |
string |
No |
page_size |
query |
integer |
No |
cursor |
query |
string |
No |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Create an application definition from a complete config
POST/application-definitions/
Parameters
| Name |
Location |
Type |
Required |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"config": {
"$ref": "#/components/schemas/ApplicationDefinitionConfig"
}
},
"required": [
"config"
],
"type": "object"
}
Request
curl --request POST \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
201 |
Created |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
409 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Get an application definition
GET/application-definitions/{definition_slug}/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
PATCH/application-definitions/{definition_slug}/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
If-Match |
header |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
}
},
"type": "object"
}
Request
curl --request PATCH \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'If-Match: $IF_MATCH' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
412 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Download a block attachment
GET/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
stable_block_id |
path |
string |
Yes |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Attachment bytes |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Upload a block attachment
PUT/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
stable_block_id |
path |
string |
Yes |
If-Match |
header |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"attachment": {
"format": "binary",
"type": "string"
}
},
"required": [
"attachment"
],
"type": "object"
}
Request
curl --request PUT \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'If-Match: $IF_MATCH' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: multipart/form-data' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Updated |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
412 |
The request was not completed. |
413 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Delete a block attachment
DELETE/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
stable_block_id |
path |
string |
Yes |
If-Match |
header |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request
curl --request DELETE \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/blocks/{stable_block_id}/attachment/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'If-Match: $IF_MATCH' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
412 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Validate a complete config without changing data
POST/application-definitions/{definition_slug}/config-validation/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"config": {
"$ref": "#/components/schemas/ApplicationDefinitionConfig"
}
},
"required": [
"config"
],
"type": "object"
}
Request
curl --request POST \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/config-validation/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Get draft or published config
GET/application-definitions/{definition_slug}/config/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
state |
query |
string |
No |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/config/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Replace the complete draft config
PUT/application-definitions/{definition_slug}/config/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
If-Match |
header |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"config": {
"$ref": "#/components/schemas/ApplicationDefinitionConfig"
}
},
"required": [
"config"
],
"type": "object"
}
Request
curl --request PUT \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/config/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'If-Match: $IF_MATCH' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
412 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Review the exact draft before publishing
GET/application-definitions/{definition_slug}/publish-review/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
Request
curl --request GET \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/publish-review/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN'
Responses
| Status |
Description |
200 |
Success |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Publish the reviewed draft
POST/application-definitions/{definition_slug}/publish/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
If-Match |
header |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"review_digest": {
"maxLength": 64,
"minLength": 64,
"type": "string"
}
},
"required": [
"review_digest"
],
"type": "object"
}
Request
curl --request POST \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/publish/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'If-Match: $IF_MATCH' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
412 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Review a sharing or privacy change
POST/application-definitions/{definition_slug}/sharing/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"is_shared": {
"type": "boolean"
}
},
"required": [
"is_shared"
],
"type": "object"
}
Request
curl --request POST \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/sharing/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |
Apply a reviewed sharing or privacy change
PUT/application-definitions/{definition_slug}/sharing/
Parameters
| Name |
Location |
Type |
Required |
definition_slug |
path |
string |
Yes |
Idempotency-Key |
header |
string |
Yes |
Request body
Send a body that matches the published schema.
View request schema
{
"additionalProperties": false,
"properties": {
"expected_impact_version": {
"type": "string"
},
"is_shared": {
"type": "boolean"
}
},
"required": [
"is_shared",
"expected_impact_version"
],
"type": "object"
}
Request
curl --request PUT \
--url 'https://api.staging.levr.ai/api/external/v1/application-definitions/{definition_slug}/sharing/' \
--header 'Authorization: Bearer $LEVR_API_TOKEN' \
--header 'Idempotency-Key: $IDEMPOTENCY_KEY' \
--header 'Content-Type: application/json' \
--data '@request.json'
Responses
| Status |
Description |
200 |
Success |
400 |
The request was not completed. |
401 |
The request was not completed. |
403 |
The request was not completed. |
404 |
The request was not completed. |
409 |
The request was not completed. |
422 |
The request was not completed. |
429 |
The request was not completed. |
500 |
The request was not completed. |