Skip to main content

Scorer API

API endpoints, version 0 (version not set)

Download OpenAPI specification:Download

Endpoints previously implemented in docai-scorer.

Scorer

Place a request to score a document

Authorizations:
access_token
path Parameters
id
required
string

Model ID. Currently only 1 model with ID "main" is supported

Request Body schema: multipart/form-data
documentGuid
string

Document guid

document
required
string <binary>

Document to score

Responses

Response samples

Content type
application/json
{}

Score a document stored in a remote location

Authorizations:
access_token
path Parameters
id
required
string

Model ID

Request Body schema: application/json
inputKey
required
string
inputBucket
required
string
outputKey
required
string
outputBucket
required
string
imageKey
required
string
imageBucket
required
string
logKey
required
string
logBucket
required
string
extra
string
documentGuid
string

Responses

Request samples

Content type
application/json
{
  • "inputKey": "string",
  • "inputBucket": "string",
  • "outputKey": "string",
  • "outputBucket": "string",
  • "imageKey": "string",
  • "imageBucket": "string",
  • "logKey": "string",
  • "logBucket": "string",
  • "extra": "string",
  • "documentGuid": "string"
}

Job

Information about a job

Authorizations:
access_token
path Parameters
id
required
string

Job ID obtained from an async call

Responses

Response samples

Content type
application/json
{}

Information about a finished job

Authorizations:
access_token
path Parameters
id
required
string

Job ID obtained from an async call

Responses

Response samples

Content type
application/json
{
  • "documentGuid": "file_8f00870c-6ed8-4cd7-5864-08d7dc0e99e2",
  • "entities": [
    ],
  • "pages": {
    },
  • "entityConfidences": [
    ]
}

Obtain logs from scoring

Authorizations:
access_token
path Parameters
id
required
string

Job ID obtained from an async call

Responses

Response samples

Content type
application/json
"string"

Pipeline

Return list of registered pipelines in given project

Authorizations:
access_token
query Parameters
projectId
required
string
includeDeleted
boolean

Responses

Response samples

Content type
application/json
[]

Publishes a pipeline

Authorizations:
access_token
Request Body schema: application/json
required

Pipeline configuration

any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{}

Get a config of a pipeline

Authorizations:
access_token
path Parameters
id
required
string

Pipeline ID

Responses

Response samples

Content type
No sample

Updates an existing pipeline

Authorizations:
access_token
path Parameters
id
required
string

Pipeline ID

Request Body schema: application/json

Pipeline definition

affinity
object
required
object (Autoscaler)
customPostProcessor
required
string
customPipeline
required
boolean
muteOutput
required
boolean
name
required
string
nodeSelector
object
pipelineConfig
required
string
required
object (Resources)
Array of objects (Tolerations)
workspaceId
required
string
builtinPostProcessor
string
Enum: "generic" "supply-chain"

Responses

Request samples

Content type
application/json
{
  • "affinity": { },
  • "autoscaler": {
    },
  • "customPostProcessor": "",
  • "customPipeline": false,
  • "muteOutput": false,
  • "name": "pipe-99",
  • "nodeSelector": { },
  • "pipelineConfig": "spec:\n pipeline:\n steps:\n - tasks:\n - name: Intake\n type: PipelineTask\n class: argus.processors.ocr_processors.Intake\n parameters:\n root_docs_path: /input_files\n follow_symlinks: true\n - tasks:\n - name: PdfExtract\n type: PipelineTask\n class: argus.processors.ocr_processors.PdfTextExtract\n - tasks:\n - name: ImageNormalize\n class: argus.processors.ocr_processors.NormalizeImages\n parameters:\n resample_to_dpi: 300\n normalize_image_format: .jpg\n - tasks:\n - name: OCR\n class: argus.processors.ocr_processors.GenericOcr\n parameters:\n ocr_style: BestTextExtract\n - tasks:\n - name: Predict\n class: argus.processors.train_eval_processors.TrainEvalProcessor\n parameters:\n artifacts:\n base_model_name_or_path: {{ .labellingModelName }}\n - tasks:\n - name: Predict\n class: argus.processors.train_eval_processors.TrainEvalProcessor\n parameters:\n artifacts:\n base_model_name_or_path: {{ .classificationModelName }}\n - tasks:\n - name: PostProcess\n class: argus.processors.post_processors.generic_post_processor.PostProcessor\n parameters:\n output_format: json\n labeling_threshold: 0.8\n output_annoset_format:\n options: { }\n write_all_steps: false\n cache_processors: true\n artifacts:\n - version: \"\"\n source: http://mock-model-registry-service.default.svc.cluster.local:8080/{{ .labellingModelName }}:download\n name: {{ .labellingModelName }}\n - version: \"\"\n source: http://mock-model-registry-service.default.svc.cluster.local:8080/{{ .classificationModelName }}:download\n name: {{ .classificationModelName }}\n",
  • "resources": {
    },
  • "tolerations": [
    ],
  • "workspaceId": "string",
  • "builtinPostProcessor": "generic"
}

Response samples

Content type
application/json
{}

Deletes a published pipeline

Authorizations:
access_token
path Parameters
id
required
string

Pipeline ID

Responses

Get logs of a failing pipeline

Authorizations:
access_token
path Parameters
id
required
string

Pipeline ID

query Parameters
lines
number

number of lines to return from log tail

Responses

Telemetry

Total number of scored pages

Authorizations:
access_token

Responses

Response samples

Content type
application/json
{
  • "total": 12,
  • "lastScoringEventTime": "2023-04-12T23:20:50.52Z"
}

Number of scored pages by given pipeline

Authorizations:
access_token
path Parameters
id
required
string

Pipeline ID

Responses

Response samples

Content type
application/json
{
  • "total": 12,
  • "lastScoringEventTime": "2023-04-12T23:20:50.52Z"
}

Feedback