Download OpenAPI specification:
Coding-Service-API
{- "id": "ExampleCodingService1",
- "type": "example-coding-service",
- "version": "1.0.2",
- "apiVersion": "0.0.1",
- "instructionsText": "string",
- "mode": "train+code"
}
label | string |
type | string (TaskType) Enum: "train" "code" "unknown" |
instructions | object (TaskInstructions) This should be overwritten in a concrete implementation of the API |
coder | string (CoderId) |
{- "type": "train"
}
{- "id": "123456",
- "type": "train",
- "label": "example task",
- "events": [
- {
- "status": "create",
- "message": "task created",
- "timestamp": 1749644764948627
}
], - "data": [
- {
- "id": "chunk1",
- "type": "input"
}
]
}
{- "id": "123456",
- "type": "train",
- "label": "example task",
- "events": [
- {
- "status": "create",
- "message": "task created",
- "timestamp": 1749644764948627
}
], - "data": [
- {
- "id": "chunk1",
- "type": "input"
}
]
}
task_id required | string (TaskId) Example: task#1234569 |
label | string |
type | string (TaskType) Enum: "train" "code" "unknown" |
instructions | object (TaskInstructions) This should be overwritten in a concrete implementation of the API |
coder | string (CoderId) |
{- "label": "string",
- "type": "train",
- "instructions": { },
- "coder": "coder#123"
}
{- "id": "123456",
- "type": "train",
- "label": "example task",
- "events": [
- {
- "status": "create",
- "message": "task created",
- "timestamp": 1749644764948627
}
], - "data": [
- {
- "id": "chunk1",
- "type": "input"
}
]
}
perform an action on task | common actions are abort
and commit
action required | string (TaskAction) Enum: "commit" "abort" Example: commit action name, usually |
task_id required | string (TaskId) Example: task#1234569 |
{- "id": "123456",
- "type": "train",
- "label": "example task",
- "events": [
- {
- "status": "create",
- "message": "task created",
- "timestamp": 1749644764948627
}
], - "data": [
- {
- "id": "chunk1",
- "type": "input"
}
]
}
task_id required | string (TaskId) Example: task#1234569 |
setId required | string Identifier of the set. Typically a user-id. |
id required | string^[0-9a-zA-Z_-]+$ Identifier for the data source (variable) |
status required | string Enum: "UNSET" "NOT_REACHED" "DISPLAYED" "VALUE_CHANGED" "DERIVE_ERROR" "CODING_COMPLETE" "NO_CODING" "INVALID" "CODING_INCOMPLETE" "CODING_ERROR" "PARTLY_DISPLAYED" "DERIVE_PENDING" "INTENDED_INCOMPLETE" "CODE_SELECTION_PENDING" Status as stage in the workflow of creating and coding a variable's value |
required | Array of strings or Array of numbers or Array of booleans or number or string or boolean |
subform | string If variables i. e. data source ids are not unique in the unit, 'subform' can specify the sub object related to the specific variable. |
code | integer Code representing the category of the value after coding process. |
score | integer This value represents the result evaluation of the code after coding process. |
Array of objects (Code) List of possible codes if status is CODE_SELECTION_PENDING. |
[- {
- "setId": "user1",
- "id": "a",
- "value": "some answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user1",
- "id": "b",
- "value": "some other answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user2",
- "id": "a",
- "value": "some answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user2",
- "id": "b",
- "value": "trash answer",
- "status": "VALUE_CHANGED"
}
]
{- "id": "chunk#13346",
- "type": "input"
}
task_id required | string (TaskId) Example: task#1234569 |
chunk_id required | string (ChunkId) Example: chunk#13346 |
[- {
- "setId": "user1",
- "id": "a",
- "value": "some answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user1",
- "id": "b",
- "value": "some other answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user2",
- "id": "a",
- "value": "some answer",
- "status": "VALUE_CHANGED"
}, - {
- "setId": "user2",
- "id": "b",
- "value": "trash answer",
- "status": "VALUE_CHANGED"
}
]
Returns a list of available coders. What a coder is depends to the implementation of the api. In most cases it will be a pretrained model. It also could be a specific set of instructions.
[- {
- "id": "coder#123",
- "label": "string"
}
]