Programs
Lint a program definition and return the normalized document
POST /v1/programs/lint: Lint a program definition and return the normalized document
POST /v1/programs/lint
| Operation id | lintProgram |
| Key scope | read: every key |
| Section | Programs |
#Request body
| Field | Type | Required | Description |
|---|---|---|---|
definition | any |
#Example request
curl -X POST "https://api.kaab.ist/v1/programs/lint" \
-H "Authorization: Bearer $KAAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"definition":{"kaab":"1","steps":[{"goto":"https://shop.example.com/p/1"},{"extract":{"title":"h1"}}]}}'
#Responses
#200
Lint result
| Field | Type | Required | Description |
|---|---|---|---|
errors | object | yes | |
errors[].code | enum (24 values) | yes | one of "E001", "E002", "E003", "E004", "E005", "E006", "E007", "E008", "E009", "E010", "E011", "E012", "E013", "E014", "W001", "W002", "W003", "W004", "W005", "W006", "W007", "W008", "W009", "W010" |
errors[].path | string | yes | |
errors[].message | string | yes | |
warnings | object | yes | |
warnings[].code | enum (24 values) | yes | one of "E001", "E002", "E003", "E004", "E005", "E006", "E007", "E008", "E009", "E010", "E011", "E012", "E013", "E014", "W001", "W002", "W003", "W004", "W005", "W006", "W007", "W008", "W009", "W010" |
warnings[].path | string | yes | |
warnings[].message | string | yes | |
normalized | object or null | yes |
#Errors
Every error answers with the error envelope; its code is one of the error codes.
| Status | When |
|---|---|
| 400 | request_invalid: request validation failed |
| 401 | Missing or invalid API key |
| 403 | The key's scope does not cover this operation |
| 429 | Rate limited; see Retry-After |
| 500 | internal: unexpected server error |