Appearance
Create Training Instance
Create a new training instance based on a given training schema within an organization or tenant. The user making the request requires ADMIN permissions to create training instances.
Parameters
| name * are required parameter | data type | description |
|---|---|---|
data* | object | The data payload for the training instance |
ownerIds* | array | Array of owner IDs (currently limited to 1 ID, and defaults to the creator's ID) |
assigneeIdsByState | object | Object mapping training states to assignees |
Return Value
An object representing the created training instance with a status code of 201, indicating successful creation.
json
{
"statusCode": 201,
"message": "Training instance created",
"data": {TrainingInstance},
}Error Codes
400 Bad Request: Returned when required parameters are missing or invalid.401 Unauthorized: Returned when permissions are insufficient.
Examples
bash
curl "https://app.wombat.software/api/{targetPath}/training/:trainingId/instance" \
-X POST \
-H "Content-Type: application/json" \
-H "Authentication: Bearer ..." \
-d '{"data": {"your": "training schema"}, "ownerIds": ["ownerId1"], "assigneeIdsByState": {"stateA": ["userId1"], "stateB": ["userId2"]}}'ENDPOINTS
post
/api/{targetPath}/training/:trainingId/instance