Coding-Service-API (0.2.0-alpha)

Download OpenAPI specification:

Coding-Service-API

return conding service identification

Responses

Response samples

Content type
application/json
{
  • "id": "ExampleCodingService1",
  • "type": "example-coding-service",
  • "version": "1.0.2",
  • "apiVersion": "0.0.1",
  • "instructionsText": "string",
  • "instructionsSchema": {},
  • "mode": "train+code"
}

add a task

Request Body schema: application/json
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)

Responses

Request samples

Content type
application/json
{
  • "type": "train"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "type": "train",
  • "label": "example task",
  • "events": [
    ],
  • "data": [
    ]
}

get list of all tasks

Responses

Response samples

Content type
application/json
[
  • {
    }
]

get specific task

path Parameters
task_id
required
string (TaskId)
Example: task#1234569

Responses

Response samples

Content type
application/json
{
  • "id": "123456",
  • "type": "train",
  • "label": "example task",
  • "events": [
    ],
  • "data": [
    ]
}

update task

path Parameters
task_id
required
string (TaskId)
Example: task#1234569
Request Body schema: application/json
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)

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "type": "train",
  • "instructions": { },
  • "coder": "coder#123"
}

Response samples

Content type
application/json
{
  • "id": "123456",
  • "type": "train",
  • "label": "example task",
  • "events": [
    ],
  • "data": [
    ]
}

/tasks/{task_id}

path Parameters
task_id
required
string (TaskId)
Example: task#1234569

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

perform action on task

perform an action on task | common actions are abort and commit

path Parameters
action
required
string (TaskAction)
Enum: "commit" "abort"
Example: commit

action name, usually abort or commit

task_id
required
string (TaskId)
Example: task#1234569

Responses

Response samples

Content type
application/json
{
  • "id": "123456",
  • "type": "train",
  • "label": "example task",
  • "events": [
    ],
  • "data": [
    ]
}

add a chunk of data for a specific task

path Parameters
task_id
required
string (TaskId)
Example: task#1234569
Request Body schema: application/json
Array
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.

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "id": "chunk#13346",
  • "type": "input"
}

retrieve a chunk of data from a specific task

path Parameters
task_id
required
string (TaskId)
Example: task#1234569
chunk_id
required
string (ChunkId)
Example: chunk#13346

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

delete a chunk of data from a specific task

path Parameters
task_id
required
string (TaskId)
Example: task#1234569
chunk_id
required
string (ChunkId)
Example: chunk#13346

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

list as available coders

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.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

delete coder

path Parameters
coder_id
required
string (CoderId)
Example: coder#123

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}