Skip to main content

Cambrion API (1.0)

Download OpenAPI specification:Download

The official Cambrion API specification. To receive a free API key reach out at info@cambrion.de with brief description of your use-case.

Executions

Execution environment that store results.

Creates an execution

Create an execution from an ID (optional). If an execution ID is given that ID will be used, otherwise a new one is created. If the execution already exists, it will be ignored and 204 will be returned. If a new execution was created, 200 is returned with the execution ID as body.

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Execution is the context which holds data related to a specific execution

executionId
string

ID of the execution

tag
string

Tag to identify the execution

createdAt
string

Creation time

object

Responses

Request samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "createdAt": "string",
  • "metaData": { }
}

Response samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "createdAt": "string",
  • "metaData": { }
}

Gets all executions

Authorizations:
ApiKeyAuth
query Parameters
tag
string

Filter executions by tag

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Gets execution

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Responses

Response samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "createdAt": "string",
  • "metaData": { }
}

Add media to an observation

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Request Body schema:
string <base64>

Responses

Response samples

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

Retrieve a specific media

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

mediaId
required
string

ID of uploaded media

Responses

Merge a raw observation into the current observation

The raw observation is merged into the current observation context.

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Request Body schema: application/json

Observation request

executionId
required
string
Array of objects (Image Content)

Responses

Request samples

Content type
application/json
{
  • "executionId": "execution-1",
  • "mediaContents": [
    ]
}

Response samples

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

Get observation

Get a full observation of the execution.

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Responses

Response samples

Content type
application/json
{
  • "executionId": "execution-1",
  • "mediaContents": [
    ]
}

Transform an observation

Transform a raw observation into an object using a JSONata statement. JSONata is a transformation language for JSON data. It can be used to transform . For more information see http://docs.jsonata.org/overview.html

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Request Body schema: text/plain
string

Responses

Response samples

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

Transform an observation into JSON

Transform a raw observation into the corresponding JSON object. The values in the JSON object correspond to the data values in the observation. If data values are not available, the raw text is used.

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Responses

Response samples

Content type
application/json
{ }

Link results of an execution

Link contents of observation to documents in an index.

Authorizations:
ApiKeyAuth
path Parameters
executionId
required
string

ID of an execution

Request Body schema: application/json

Linker request

Array of objects (Match Group)
object
Array of objects (Top K Index Filter)

Responses

Request samples

Content type
application/json
{
  • "group": [
    ],
  • "document": { },
  • "topk": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Pipelines

Machine learning pipelines.

Get all deployed pipelines

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new pipeline

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Pipeline request

pipelineId
string
name
string
deploy
boolean
Default: true

Whether to deploy the pipeline when creating/updating it

description
string
version
integer
object (PipelineDefinition)

Responses

Request samples

Content type
application/json
{
  • "pipelineId": "receipt-pipeline",
  • "name": "receipt-pipeline",
  • "deploy": true,
  • "description": "A pipeline to extract contents from a receipt",
  • "version": 1,
  • "pipelineDefinition": {
    }
}

Response samples

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

Get a specific pipeline

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Responses

Response samples

Content type
application/json
{
  • "pipeline": {
    },
  • "pipelineDefinition": {
    }
}

Update an existing pipeline

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Request Body schema: application/json

Pipeline request

pipelineId
string
name
string
deploy
boolean
Default: true

Whether to deploy the pipeline when creating/updating it

description
string
version
integer
object (PipelineDefinition)

Responses

Request samples

Content type
application/json
{
  • "pipelineId": "receipt-pipeline",
  • "name": "receipt-pipeline",
  • "deploy": true,
  • "description": "A pipeline to extract contents from a receipt",
  • "version": 1,
  • "pipelineDefinition": {
    }
}

Response samples

Content type
application/json
{
  • "pipeline": {
    },
  • "pipelineDefinition": {
    }
}

Delete a specific pipeline

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Responses

Response samples

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

Get graph representation (definition) of a pipeline

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Responses

Response samples

Content type
application/json
{
  • "pipelineDefinitionId": "receipt-pipeline-definition",
  • "nodes": [
    ],
  • "edges": [
    ]
}

Execute pipeline synchronously

Execute a pipeline synchronously and return the corresponding observation

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Request Body schema: application/json

Execution request for a pipeline

executionId
string

ID of the execution

tag
string

Tag used to identify the resulting execution. Ignored if transient is true.

transient
boolean

Whether to delete all execution data after pipeline completion

transform
string

JSONata instruction to transform the result observation into a desired object. JSONata is a transformation language for JSON data. It can be used to transform . For more information see http://docs.jsonata.org/overview.html

tryImageConversion
boolean
Default: true

Tries to convert the provided content to an image (e.g. PDF)

trySimpleText
boolean
Default: false

Tries to extract readable text from input media (e.g. Word doc). A number of different file formats is supported. Internally Apache Tika is used for text extraction. A full list of supported file formats can be found here: https://tika.apache.org/2.9.1/formats.html

idempotent
boolean
Default: false

Whether to update the existing observation with the results from pipeline run (always true if executionId is null)

media
Array of strings <base64>

Array of base 64 encoded media files. Content type will be detected automatically. For PDF, Docx, PPTX files the files will be rendered as images. The images can then be processed within a pipeline.

text
string

Raw text that can be used as input in pipelines

Responses

Request samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "transient": true,
  • "transform": "string",
  • "tryImageConversion": true,
  • "trySimpleText": false,
  • "idempotent": false,
  • "media": [
    ],
  • "text": "string"
}

Response samples

Content type
application/json
{
  • "executionId": "string",
  • "observation": {
    }
}

Transform an observation

Execute a pipeline synchronously and return the transformed observation

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Request Body schema: application/json

Execution request for a pipeline

executionId
string

ID of the execution

tag
string

Tag used to identify the resulting execution. Ignored if transient is true.

transient
boolean

Whether to delete all execution data after pipeline completion

transform
string

JSONata instruction to transform the result observation into a desired object. JSONata is a transformation language for JSON data. It can be used to transform . For more information see http://docs.jsonata.org/overview.html

tryImageConversion
boolean
Default: true

Tries to convert the provided content to an image (e.g. PDF)

trySimpleText
boolean
Default: false

Tries to extract readable text from input media (e.g. Word doc). A number of different file formats is supported. Internally Apache Tika is used for text extraction. A full list of supported file formats can be found here: https://tika.apache.org/2.9.1/formats.html

idempotent
boolean
Default: false

Whether to update the existing observation with the results from pipeline run (always true if executionId is null)

media
Array of strings <base64>

Array of base 64 encoded media files. Content type will be detected automatically. For PDF, Docx, PPTX files the files will be rendered as images. The images can then be processed within a pipeline.

text
string

Raw text that can be used as input in pipelines

Responses

Request samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "transient": true,
  • "transform": "string",
  • "tryImageConversion": true,
  • "trySimpleText": false,
  • "idempotent": false,
  • "media": [
    ],
  • "text": "string"
}

Response samples

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

Transform an observation

Execute a pipeline synchronously and return the corresponding JSON object.

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Request Body schema: application/json

Execution request for a pipeline

executionId
string

ID of the execution

tag
string

Tag used to identify the resulting execution. Ignored if transient is true.

transient
boolean

Whether to delete all execution data after pipeline completion

transform
string

JSONata instruction to transform the result observation into a desired object. JSONata is a transformation language for JSON data. It can be used to transform . For more information see http://docs.jsonata.org/overview.html

tryImageConversion
boolean
Default: true

Tries to convert the provided content to an image (e.g. PDF)

trySimpleText
boolean
Default: false

Tries to extract readable text from input media (e.g. Word doc). A number of different file formats is supported. Internally Apache Tika is used for text extraction. A full list of supported file formats can be found here: https://tika.apache.org/2.9.1/formats.html

idempotent
boolean
Default: false

Whether to update the existing observation with the results from pipeline run (always true if executionId is null)

media
Array of strings <base64>

Array of base 64 encoded media files. Content type will be detected automatically. For PDF, Docx, PPTX files the files will be rendered as images. The images can then be processed within a pipeline.

text
string

Raw text that can be used as input in pipelines

Responses

Request samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "transient": true,
  • "transform": "string",
  • "tryImageConversion": true,
  • "trySimpleText": false,
  • "idempotent": false,
  • "media": [
    ],
  • "text": "string"
}

Response samples

Content type
application/json
{ }

Execute pipeline asynchronously

Authorizations:
ApiKeyAuth
path Parameters
pipelineId
required
string

ID of the pipeline to execute

Request Body schema: application/json

Execution request for a pipeline

executionId
string

ID of the execution

tag
string

Tag used to identify the resulting execution. Ignored if transient is true.

transient
boolean

Whether to delete all execution data after pipeline completion

transform
string

JSONata instruction to transform the result observation into a desired object. JSONata is a transformation language for JSON data. It can be used to transform . For more information see http://docs.jsonata.org/overview.html

tryImageConversion
boolean
Default: true

Tries to convert the provided content to an image (e.g. PDF)

trySimpleText
boolean
Default: false

Tries to extract readable text from input media (e.g. Word doc). A number of different file formats is supported. Internally Apache Tika is used for text extraction. A full list of supported file formats can be found here: https://tika.apache.org/2.9.1/formats.html

idempotent
boolean
Default: false

Whether to update the existing observation with the results from pipeline run (always true if executionId is null)

media
Array of strings <base64>

Array of base 64 encoded media files. Content type will be detected automatically. For PDF, Docx, PPTX files the files will be rendered as images. The images can then be processed within a pipeline.

text
string

Raw text that can be used as input in pipelines

Responses

Request samples

Content type
application/json
{
  • "executionId": "string",
  • "tag": "string",
  • "transient": true,
  • "transform": "string",
  • "tryImageConversion": true,
  • "trySimpleText": false,
  • "idempotent": false,
  • "media": [
    ],
  • "text": "string"
}

Response samples

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

Deployments

(TODO) Deployed Pipelines.

Get all indices

Get a list of all indices.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer

Limits the number of indices on a page

offset
integer

Specifies the page number of the indices to be displayed

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create index

Create a new index with an optional schema.

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Index creation request

indexId
string

Unique ID of the index.

semanticSearchField
string

This field is used to encode semantic information

object

An object that describe the data types of the document fields. This is equivalent to the Elasticsearch mappings object. For more information see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html

Responses

Request samples

Content type
application/json
{
  • "indexId": "string",
  • "semanticSearchField": "string",
  • "indexSchema": { }
}

Response samples

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

Get index description

Get the description of an index. Including the data model if present.

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

Responses

Response samples

Content type
application/json
{
  • "indexId": "string",
  • "semanticSearchField": "string",
  • "indexSchema": { }
}

Delete index

Delete an index.

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

Responses

Response samples

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

Query an index with a search string

Query an index with a search string

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

Request Body schema: application/json

Query request

searchString
string

The string that is used for the search

k
integer

The number of results to return that are similar to the search string

Responses

Request samples

Content type
application/json
{
  • "searchString": "string",
  • "k": 0
}

Response samples

Content type
application/json
[
  • {
    }
]

Get all documents

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

query Parameters
limit
integer

Limits the number of documents on a page

offset
integer

Specifies the page number of the documents to be displayed

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create document

Create a JSON document in an index. If the index does not exist it will be created automatically.

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

Request Body schema: application/json

Document request

indexId
string
object

Responses

Request samples

Content type
application/json
{
  • "indexId": "string",
  • "source": { }
}

Response samples

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

Get document

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

documentId
required
string

ID of a document

Responses

Response samples

Content type
application/json
{
  • "indexId": "string",
  • "source": { }
}

Delete document

Authorizations:
ApiKeyAuth
path Parameters
indexId
required
string
Example: Warehouse-Index

ID of the index

documentId
required
string

ID of a document

Responses

Response samples

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

Models

Get all registered models

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register an uploaded model (currently internal only)

Authorizations:
ApiKeyAuth
Request Body schema: application/json

Model request

name
string
description
string
version
integer
resourceTag
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "version": 0,
  • "resourceTag": "string"
}

Response samples

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