Records
Create a Record
API Reference
Collections
Records
Workflows
- GETDiscover Workflows
- GETGet Discoverable Workflow
- GETGet Discoverable Workflow Version
- POSTRun Discoverable Workflow
- POSTCancel a Discoverable Workflow Run
- GETGet Workflows
- GETGet a Workflow
- GETGet Workflow Runs
- POSTRun a Workflow
- POSTReplay a Workflow Run
- GETGet a Workflow Run
- POSTCancel a Workflow Run
- GETGet Workflow Versions
- GETGet a Workflow Version
Tests
Variables
Records
Create a Record
Create a new record in the specified collection.
POST
/
apps
/
{app_id}
/
collections
/
{collection_id}
/
records
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/collections/{collection_id}/records \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"tags_ids": [
"<string>"
]
}'
{
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"rules_count": 123,
"rules_pass_count": 123,
"rules_fail_count": 123,
"rules_warn_count": 123,
"config": {
"id": "<string>",
"mappings": [
{
"source_path": "<string>",
"destination_paths": [
"<string>"
]
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"rules": [
{
"name": "<string>",
"key": "<string>",
"execution_order": "<string>",
"on_success": "PASS",
"on_fail": "PASS",
"workflow_id": "<string>",
"workflow_version_id": "<string>",
"workflow_use_latest": true,
"workflow_input_default": {},
"disabled": true,
"workflow": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"verified": true
},
"visibility": "PUBLIC",
"version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
}
}
]
},
"collection_name": "<string>",
"collection_id": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"record_rules": [
{
"status": "DRAFT",
"rule_key": "<string>",
"input": {},
"run": {
"id": "<string>",
"input": {},
"output": [
{
"status": "RUNNING",
"key": "<string>",
"output": "<any>",
"start": 123
}
],
"status": "PENDING",
"origin": "WORKFLOW",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
Response
200 - application/json
Available options:
DRAFT
, QUEUED
, RUNNING
, CANCELLED
, COMPLETED
, FAILED
Available options:
PASS
, FAIL
, WARN
Available options:
PASS
, FAIL
, WARN
Available options:
PUBLIC
, PRIVATE
Available options:
code
Maximum length:
128
Available options:
DRAFT
, RUNNING
, PASSED
, FAILED
, WARN
Available options:
PENDING
, RUNNING
, COMPLETED
, SKIPPED
, FAILED
Available options:
WORKFLOW
, RECORD
, TEST
Available options:
code
Maximum length:
128
Available options:
code
Maximum length:
128
Was this page helpful?
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/collections/{collection_id}/records \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"tags_ids": [
"<string>"
]
}'
{
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"rules_count": 123,
"rules_pass_count": 123,
"rules_fail_count": 123,
"rules_warn_count": 123,
"config": {
"id": "<string>",
"mappings": [
{
"source_path": "<string>",
"destination_paths": [
"<string>"
]
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"rules": [
{
"name": "<string>",
"key": "<string>",
"execution_order": "<string>",
"on_success": "PASS",
"on_fail": "PASS",
"workflow_id": "<string>",
"workflow_version_id": "<string>",
"workflow_use_latest": true,
"workflow_input_default": {},
"disabled": true,
"workflow": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"app": {
"id": "<string>",
"name": "<string>",
"verified": true
},
"visibility": "PUBLIC",
"version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
}
}
]
},
"collection_name": "<string>",
"collection_id": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"app_id": "<string>",
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"record_rules": [
{
"status": "DRAFT",
"rule_key": "<string>",
"input": {},
"run": {
"id": "<string>",
"input": {},
"output": [
{
"status": "RUNNING",
"key": "<string>",
"output": "<any>",
"start": 123
}
],
"status": "PENDING",
"origin": "WORKFLOW",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"description": "<string>",
"version": 123,
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"steps": [
{
"type": "code",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"code": "<string>"
}
]
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}