@talonic/docs 0.21.65 → 0.21.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content.js +253 -43
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/seo.js +793 -9
- package/openapi.json +788 -9
- package/package.json +1 -1
- package/dist/tailwind-preset.d.cts +0 -45
- package/dist/tailwind-preset.d.ts +0 -45
package/dist/seo.js
CHANGED
|
@@ -106,6 +106,10 @@ var openapi_default = {
|
|
|
106
106
|
name: "DB Snapshots",
|
|
107
107
|
description: "Periodic point-in-time captures of a connected database (or a folder of CSV exports) and the row-level deltas between consecutive captures: what was added, modified and removed, with before/after values and per-record history. Read-only \u2014 captures are scheduled from the app.\n\nTwo fields carry meaning that the counts alone cannot, and reading past them produces confident wrong answers. A delta's `status` is `partial` while the capture writing it is still running, so its counts are a floor (a partial delta commonly reads all-zero while hundreds of thousands of rows are in fact changing) \u2014 follow `last_complete_delta_id` for a final number. And within a delta, a table that was examined and found clean is ABSENT from `tables`, whereas a table present with `examined: false` was deferred by the scan cadence and not looked at at all.\n"
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
name: "Aggregate",
|
|
111
|
+
description: "Counts and statistics about your workspace in one request: documents received and failed, pipeline errors, app decisions, deliveries, model calls, what processing cost, and the work of the standard apps. Numbers only, never document contents. Start with `GET /v1/aggregate/catalog`, which lists every dataset and field you can ask for."
|
|
112
|
+
},
|
|
109
113
|
{
|
|
110
114
|
name: "Usage",
|
|
111
115
|
description: 'Aggregate, per-document, per-pipeline, and per-run API usage accounting (tokens, costs, operation types). Model and cost fields on the aggregate and per-document routes are redacted for organizations without the "Cost control endpoints" approval; the pipeline and run routes are hidden entirely (404) for such organizations and additionally require an API key carrying the `usage` scope.'
|
|
@@ -7798,6 +7802,593 @@ var openapi_default = {
|
|
|
7798
7802
|
}
|
|
7799
7803
|
}
|
|
7800
7804
|
},
|
|
7805
|
+
"/v1/aggregate": {
|
|
7806
|
+
post: {
|
|
7807
|
+
operationId: "aggregate",
|
|
7808
|
+
summary: "Several workspace metrics in one request",
|
|
7809
|
+
description: 'Ask several questions about your workspace in one request and get\nnumbers back, never rows. For example: how many documents arrived in\nthe last 12 hours, how many failed, and what a document cost on\naverage.\n\n**The window.** `from` and `to` are ISO-8601 timestamps with an offset\n(`2026-11-05T12:00:00Z`). The window includes `from` and excludes\n`to`, and is at most 31 days long.\n\n**The queries.** Up to 20, each with an `id` of your choice (the\nanswer is keyed by it), a `dataset` and a `measure`:\n- `count`: what the dataset counts (its description says whether\n that is rows or documents); `rows`: the number of rows.\n- `count_distinct`, `sum`, `avg`, `min`, `max`, `median`, `p1`\u2013`p99`:\n over the field named in `of` (a number field, except for\n `count_distinct`).\n- A list of measures (`["avg", "median"]`) answers `values` plus `n`,\n the number of rows they were computed over.\n\n`where` filters rows (`{ "field": "failed", "op": "eq", "value": true }`);\nwhich operators a field takes depends on its type. `group_by` splits\nthe answer by up to three fields, or by `hour` / `day` (UTC); it\nreturns at most 200 groups (largest first, or in time order when\ngrouped by `hour` / `day`), and `groups_total` says how many there\nwere. `sum`, `avg` and the other computed measures are `null` when\nthere were no rows; counts are 0.\n\n**Which datasets and fields exist:** `GET /v1/aggregate/catalog`\nlists every dataset with what one row is, its fields (type, whether\nit can be grouped, which operators it takes) and its default\nfilters. Most datasets count things *created* in the window and\nreport their status *now* (a document received yesterday that\nfailed today counts as failed). Accounts Payable bills and the Money\nFound ledger are not datasets; read them from `/v1/ap/overview` and\n`/v1/money-found/levers`.\n\n**Narrowing to documents.** `scope` restricts every query to some\ndocuments: `document_ids`, `tags` (`any` / `all`), `system_tags`,\n`source_connection_ids`, `document_types` (ids or names),\n`client_batch_ids`, `roots_only`, `attachments_only`. A dataset\nthat is not about documents refuses a scope (400). Rows tied to a\ndocument the key\'s owner may not see are left out; rows tied to no\ndocument (a model call outside any document, a check of a document\nset) still count unless a scope is set.\n\n**Limits.** One request runs at a time per workspace (per API process\nwhere the deployment does not share the limiter; the catalog\'s\n`limits.concurrency.per` says which). A second one gets 429 with\n`Retry-After: 5`: retry after that many seconds. The daily rate limit\nalso answers 429; it sends `X-RateLimit-Reset` instead. Each\nstatement may run `limits.statement_timeout_ms`; a request runs one\nstatement per dataset (plus one per grouped query), so a whole\nrequest can take longer. A statement that runs too long stops the\nrequest with 422 `aggregate_timeout`, naming the dataset; ask for a\nshorter window or fewer groups. Cost\nfields and the `model` dimension answer 403 `cost_not_visible` when\ncost visibility is off for your organization. A wrong name answers\n400 `invalid_aggregate` listing the names allowed there.\n',
|
|
7810
|
+
tags: [
|
|
7811
|
+
"Aggregate"
|
|
7812
|
+
],
|
|
7813
|
+
requestBody: {
|
|
7814
|
+
required: true,
|
|
7815
|
+
content: {
|
|
7816
|
+
"application/json": {
|
|
7817
|
+
schema: {
|
|
7818
|
+
type: "object",
|
|
7819
|
+
required: [
|
|
7820
|
+
"from",
|
|
7821
|
+
"to",
|
|
7822
|
+
"queries"
|
|
7823
|
+
],
|
|
7824
|
+
properties: {
|
|
7825
|
+
from: {
|
|
7826
|
+
type: "string",
|
|
7827
|
+
format: "date-time"
|
|
7828
|
+
},
|
|
7829
|
+
to: {
|
|
7830
|
+
type: "string",
|
|
7831
|
+
format: "date-time",
|
|
7832
|
+
description: "Exclusive."
|
|
7833
|
+
},
|
|
7834
|
+
scope: {
|
|
7835
|
+
type: "object",
|
|
7836
|
+
properties: {
|
|
7837
|
+
document_ids: {
|
|
7838
|
+
type: "array",
|
|
7839
|
+
items: {
|
|
7840
|
+
type: "string",
|
|
7841
|
+
format: "uuid"
|
|
7842
|
+
},
|
|
7843
|
+
maxItems: 1e3
|
|
7844
|
+
},
|
|
7845
|
+
tags: {
|
|
7846
|
+
type: "object",
|
|
7847
|
+
properties: {
|
|
7848
|
+
any: {
|
|
7849
|
+
type: "array",
|
|
7850
|
+
items: {
|
|
7851
|
+
type: "string"
|
|
7852
|
+
}
|
|
7853
|
+
},
|
|
7854
|
+
all: {
|
|
7855
|
+
type: "array",
|
|
7856
|
+
items: {
|
|
7857
|
+
type: "string"
|
|
7858
|
+
}
|
|
7859
|
+
}
|
|
7860
|
+
}
|
|
7861
|
+
},
|
|
7862
|
+
system_tags: {
|
|
7863
|
+
type: "object",
|
|
7864
|
+
properties: {
|
|
7865
|
+
any: {
|
|
7866
|
+
type: "array",
|
|
7867
|
+
items: {
|
|
7868
|
+
type: "string"
|
|
7869
|
+
}
|
|
7870
|
+
},
|
|
7871
|
+
all: {
|
|
7872
|
+
type: "array",
|
|
7873
|
+
items: {
|
|
7874
|
+
type: "string"
|
|
7875
|
+
}
|
|
7876
|
+
}
|
|
7877
|
+
}
|
|
7878
|
+
},
|
|
7879
|
+
source_connection_ids: {
|
|
7880
|
+
type: "array",
|
|
7881
|
+
items: {
|
|
7882
|
+
type: "string",
|
|
7883
|
+
format: "uuid"
|
|
7884
|
+
}
|
|
7885
|
+
},
|
|
7886
|
+
document_types: {
|
|
7887
|
+
type: "array",
|
|
7888
|
+
items: {
|
|
7889
|
+
type: "string"
|
|
7890
|
+
},
|
|
7891
|
+
description: "Document type ids or exact names."
|
|
7892
|
+
},
|
|
7893
|
+
client_batch_ids: {
|
|
7894
|
+
type: "array",
|
|
7895
|
+
items: {
|
|
7896
|
+
type: "string"
|
|
7897
|
+
}
|
|
7898
|
+
},
|
|
7899
|
+
roots_only: {
|
|
7900
|
+
type: "boolean"
|
|
7901
|
+
},
|
|
7902
|
+
attachments_only: {
|
|
7903
|
+
type: "boolean"
|
|
7904
|
+
}
|
|
7905
|
+
}
|
|
7906
|
+
},
|
|
7907
|
+
queries: {
|
|
7908
|
+
type: "array",
|
|
7909
|
+
minItems: 1,
|
|
7910
|
+
maxItems: 20,
|
|
7911
|
+
items: {
|
|
7912
|
+
type: "object",
|
|
7913
|
+
required: [
|
|
7914
|
+
"id",
|
|
7915
|
+
"dataset",
|
|
7916
|
+
"measure"
|
|
7917
|
+
],
|
|
7918
|
+
properties: {
|
|
7919
|
+
id: {
|
|
7920
|
+
type: "string",
|
|
7921
|
+
pattern: "^[a-z][a-z0-9_]{0,63}$"
|
|
7922
|
+
},
|
|
7923
|
+
dataset: {
|
|
7924
|
+
type: "string",
|
|
7925
|
+
enum: [
|
|
7926
|
+
"documents",
|
|
7927
|
+
"document_cost",
|
|
7928
|
+
"pipeline_documents",
|
|
7929
|
+
"app_verdicts",
|
|
7930
|
+
"app_runs",
|
|
7931
|
+
"deliveries",
|
|
7932
|
+
"llm_calls",
|
|
7933
|
+
"compliance_evaluations",
|
|
7934
|
+
"money_found_reviews",
|
|
7935
|
+
"contract_check_decisions",
|
|
7936
|
+
"doc_gen_jobs",
|
|
7937
|
+
"doc_gen_documents",
|
|
7938
|
+
"price_invoice_checks"
|
|
7939
|
+
]
|
|
7940
|
+
},
|
|
7941
|
+
measure: {
|
|
7942
|
+
oneOf: [
|
|
7943
|
+
{
|
|
7944
|
+
type: "string"
|
|
7945
|
+
},
|
|
7946
|
+
{
|
|
7947
|
+
type: "array",
|
|
7948
|
+
items: {
|
|
7949
|
+
type: "string"
|
|
7950
|
+
}
|
|
7951
|
+
}
|
|
7952
|
+
]
|
|
7953
|
+
},
|
|
7954
|
+
of: {
|
|
7955
|
+
type: "string"
|
|
7956
|
+
},
|
|
7957
|
+
where: {
|
|
7958
|
+
type: "array",
|
|
7959
|
+
items: {
|
|
7960
|
+
type: "object",
|
|
7961
|
+
required: [
|
|
7962
|
+
"field",
|
|
7963
|
+
"op"
|
|
7964
|
+
],
|
|
7965
|
+
properties: {
|
|
7966
|
+
field: {
|
|
7967
|
+
type: "string"
|
|
7968
|
+
},
|
|
7969
|
+
op: {
|
|
7970
|
+
type: "string",
|
|
7971
|
+
enum: [
|
|
7972
|
+
"eq",
|
|
7973
|
+
"neq",
|
|
7974
|
+
"in",
|
|
7975
|
+
"not_in",
|
|
7976
|
+
"is_null",
|
|
7977
|
+
"not_null",
|
|
7978
|
+
"gt",
|
|
7979
|
+
"gte",
|
|
7980
|
+
"lt",
|
|
7981
|
+
"lte",
|
|
7982
|
+
"contains_any",
|
|
7983
|
+
"contains_all"
|
|
7984
|
+
]
|
|
7985
|
+
},
|
|
7986
|
+
value: {}
|
|
7987
|
+
}
|
|
7988
|
+
}
|
|
7989
|
+
},
|
|
7990
|
+
group_by: {
|
|
7991
|
+
type: "array",
|
|
7992
|
+
items: {
|
|
7993
|
+
type: "string"
|
|
7994
|
+
},
|
|
7995
|
+
maxItems: 3
|
|
7996
|
+
}
|
|
7997
|
+
}
|
|
7998
|
+
}
|
|
7999
|
+
}
|
|
8000
|
+
}
|
|
8001
|
+
},
|
|
8002
|
+
example: {
|
|
8003
|
+
from: "2026-11-05T12:00:00Z",
|
|
8004
|
+
to: "2026-11-06T00:00:00Z",
|
|
8005
|
+
queries: [
|
|
8006
|
+
{
|
|
8007
|
+
id: "received",
|
|
8008
|
+
dataset: "documents",
|
|
8009
|
+
measure: "count",
|
|
8010
|
+
where: [
|
|
8011
|
+
{
|
|
8012
|
+
field: "duplicate",
|
|
8013
|
+
op: "eq",
|
|
8014
|
+
value: false
|
|
8015
|
+
}
|
|
8016
|
+
]
|
|
8017
|
+
},
|
|
8018
|
+
{
|
|
8019
|
+
id: "failed",
|
|
8020
|
+
dataset: "documents",
|
|
8021
|
+
measure: "count",
|
|
8022
|
+
where: [
|
|
8023
|
+
{
|
|
8024
|
+
field: "failed",
|
|
8025
|
+
op: "eq",
|
|
8026
|
+
value: true
|
|
8027
|
+
}
|
|
8028
|
+
]
|
|
8029
|
+
},
|
|
8030
|
+
{
|
|
8031
|
+
id: "by_type",
|
|
8032
|
+
dataset: "documents",
|
|
8033
|
+
measure: "count",
|
|
8034
|
+
group_by: [
|
|
8035
|
+
"document_type"
|
|
8036
|
+
]
|
|
8037
|
+
},
|
|
8038
|
+
{
|
|
8039
|
+
id: "cost",
|
|
8040
|
+
dataset: "document_cost",
|
|
8041
|
+
measure: [
|
|
8042
|
+
"avg",
|
|
8043
|
+
"median"
|
|
8044
|
+
],
|
|
8045
|
+
of: "cost_usd"
|
|
8046
|
+
}
|
|
8047
|
+
]
|
|
8048
|
+
}
|
|
8049
|
+
}
|
|
8050
|
+
}
|
|
8051
|
+
},
|
|
8052
|
+
responses: {
|
|
8053
|
+
"200": {
|
|
8054
|
+
description: "One result per query id.",
|
|
8055
|
+
content: {
|
|
8056
|
+
"application/json": {
|
|
8057
|
+
schema: {
|
|
8058
|
+
type: "object",
|
|
8059
|
+
properties: {
|
|
8060
|
+
window: {
|
|
8061
|
+
type: "object",
|
|
8062
|
+
properties: {
|
|
8063
|
+
from: {
|
|
8064
|
+
type: "string",
|
|
8065
|
+
format: "date-time"
|
|
8066
|
+
},
|
|
8067
|
+
to: {
|
|
8068
|
+
type: "string",
|
|
8069
|
+
format: "date-time"
|
|
8070
|
+
}
|
|
8071
|
+
}
|
|
8072
|
+
},
|
|
8073
|
+
as_of: {
|
|
8074
|
+
type: "string",
|
|
8075
|
+
format: "date-time"
|
|
8076
|
+
},
|
|
8077
|
+
results: {
|
|
8078
|
+
type: "object",
|
|
8079
|
+
additionalProperties: {
|
|
8080
|
+
type: "object",
|
|
8081
|
+
properties: {
|
|
8082
|
+
dataset: {
|
|
8083
|
+
type: "string"
|
|
8084
|
+
},
|
|
8085
|
+
kind: {
|
|
8086
|
+
type: "string",
|
|
8087
|
+
enum: [
|
|
8088
|
+
"event",
|
|
8089
|
+
"entity"
|
|
8090
|
+
]
|
|
8091
|
+
},
|
|
8092
|
+
value: {
|
|
8093
|
+
type: "number",
|
|
8094
|
+
nullable: true
|
|
8095
|
+
},
|
|
8096
|
+
values: {
|
|
8097
|
+
type: "object",
|
|
8098
|
+
additionalProperties: {
|
|
8099
|
+
type: "number",
|
|
8100
|
+
nullable: true
|
|
8101
|
+
}
|
|
8102
|
+
},
|
|
8103
|
+
groups: {
|
|
8104
|
+
type: "array",
|
|
8105
|
+
items: {
|
|
8106
|
+
type: "object",
|
|
8107
|
+
properties: {
|
|
8108
|
+
key: {
|
|
8109
|
+
type: "object",
|
|
8110
|
+
description: "Dimension values; null is a row without one."
|
|
8111
|
+
},
|
|
8112
|
+
value: {
|
|
8113
|
+
type: "number",
|
|
8114
|
+
nullable: true
|
|
8115
|
+
},
|
|
8116
|
+
values: {
|
|
8117
|
+
type: "object",
|
|
8118
|
+
additionalProperties: {
|
|
8119
|
+
type: "number",
|
|
8120
|
+
nullable: true
|
|
8121
|
+
}
|
|
8122
|
+
}
|
|
8123
|
+
}
|
|
8124
|
+
}
|
|
8125
|
+
},
|
|
8126
|
+
groups_total: {
|
|
8127
|
+
type: "integer",
|
|
8128
|
+
description: "Groups that existed; more than groups.length when the 200-group cap applied."
|
|
8129
|
+
}
|
|
8130
|
+
}
|
|
8131
|
+
}
|
|
8132
|
+
}
|
|
8133
|
+
}
|
|
8134
|
+
},
|
|
8135
|
+
example: {
|
|
8136
|
+
window: {
|
|
8137
|
+
from: "2026-11-05T12:00:00.000Z",
|
|
8138
|
+
to: "2026-11-06T00:00:00.000Z"
|
|
8139
|
+
},
|
|
8140
|
+
as_of: "2026-11-06T00:00:03.120Z",
|
|
8141
|
+
results: {
|
|
8142
|
+
received: {
|
|
8143
|
+
dataset: "documents",
|
|
8144
|
+
kind: "entity",
|
|
8145
|
+
value: 412
|
|
8146
|
+
},
|
|
8147
|
+
failed: {
|
|
8148
|
+
dataset: "documents",
|
|
8149
|
+
kind: "entity",
|
|
8150
|
+
value: 3
|
|
8151
|
+
},
|
|
8152
|
+
by_type: {
|
|
8153
|
+
dataset: "documents",
|
|
8154
|
+
kind: "entity",
|
|
8155
|
+
groups: [
|
|
8156
|
+
{
|
|
8157
|
+
key: {
|
|
8158
|
+
document_type: "Invoice"
|
|
8159
|
+
},
|
|
8160
|
+
value: 301
|
|
8161
|
+
},
|
|
8162
|
+
{
|
|
8163
|
+
key: {
|
|
8164
|
+
document_type: "Delivery Note"
|
|
8165
|
+
},
|
|
8166
|
+
value: 97
|
|
8167
|
+
},
|
|
8168
|
+
{
|
|
8169
|
+
key: {
|
|
8170
|
+
document_type: null
|
|
8171
|
+
},
|
|
8172
|
+
value: 14
|
|
8173
|
+
}
|
|
8174
|
+
],
|
|
8175
|
+
groups_total: 3
|
|
8176
|
+
},
|
|
8177
|
+
cost: {
|
|
8178
|
+
dataset: "document_cost",
|
|
8179
|
+
kind: "entity",
|
|
8180
|
+
values: {
|
|
8181
|
+
avg: 0.0108,
|
|
8182
|
+
median: 0.0104,
|
|
8183
|
+
n: 412
|
|
8184
|
+
}
|
|
8185
|
+
}
|
|
8186
|
+
}
|
|
8187
|
+
}
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8190
|
+
},
|
|
8191
|
+
"400": {
|
|
8192
|
+
$ref: "#/components/responses/BadRequest"
|
|
8193
|
+
},
|
|
8194
|
+
"401": {
|
|
8195
|
+
$ref: "#/components/responses/Unauthorized"
|
|
8196
|
+
},
|
|
8197
|
+
"403": {
|
|
8198
|
+
$ref: "#/components/responses/Forbidden"
|
|
8199
|
+
},
|
|
8200
|
+
"422": {
|
|
8201
|
+
description: "A statement ran past the timeout (`aggregate_timeout`); `details.dataset` names it."
|
|
8202
|
+
},
|
|
8203
|
+
"429": {
|
|
8204
|
+
$ref: "#/components/responses/RateLimitExceeded"
|
|
8205
|
+
}
|
|
8206
|
+
}
|
|
8207
|
+
}
|
|
8208
|
+
},
|
|
8209
|
+
"/v1/aggregate/catalog": {
|
|
8210
|
+
get: {
|
|
8211
|
+
operationId: "getAggregateCatalog",
|
|
8212
|
+
summary: "What you can ask /v1/aggregate",
|
|
8213
|
+
description: "Every dataset, field, measure and limit `POST /v1/aggregate` accepts,\nfrom the same definitions it checks requests against. Each dataset\nsays what one row is, whether a document `scope` applies, and the\nfilters it applies by default; each field its type, whether it can\nbe grouped, which `where` operators it takes and whether it needs\ncost visibility (`cost`). `cost_visible` says whether this workspace\nmay read those. Reads no workspace data.\n",
|
|
8214
|
+
tags: [
|
|
8215
|
+
"Aggregate"
|
|
8216
|
+
],
|
|
8217
|
+
responses: {
|
|
8218
|
+
"200": {
|
|
8219
|
+
description: "The catalog.",
|
|
8220
|
+
content: {
|
|
8221
|
+
"application/json": {
|
|
8222
|
+
schema: {
|
|
8223
|
+
type: "object",
|
|
8224
|
+
properties: {
|
|
8225
|
+
datasets: {
|
|
8226
|
+
type: "array",
|
|
8227
|
+
items: {
|
|
8228
|
+
type: "object",
|
|
8229
|
+
properties: {
|
|
8230
|
+
name: {
|
|
8231
|
+
type: "string"
|
|
8232
|
+
},
|
|
8233
|
+
description: {
|
|
8234
|
+
type: "string"
|
|
8235
|
+
},
|
|
8236
|
+
kind: {
|
|
8237
|
+
type: "string",
|
|
8238
|
+
enum: [
|
|
8239
|
+
"entity",
|
|
8240
|
+
"event"
|
|
8241
|
+
],
|
|
8242
|
+
description: "`entity`: created in the window, status now. `event`: written in the window."
|
|
8243
|
+
},
|
|
8244
|
+
document_scope: {
|
|
8245
|
+
type: "boolean"
|
|
8246
|
+
},
|
|
8247
|
+
defaults: {
|
|
8248
|
+
type: "array",
|
|
8249
|
+
items: {
|
|
8250
|
+
type: "object",
|
|
8251
|
+
properties: {
|
|
8252
|
+
field: {
|
|
8253
|
+
type: "string"
|
|
8254
|
+
},
|
|
8255
|
+
op: {
|
|
8256
|
+
type: "string"
|
|
8257
|
+
},
|
|
8258
|
+
value: {}
|
|
8259
|
+
}
|
|
8260
|
+
}
|
|
8261
|
+
},
|
|
8262
|
+
fields: {
|
|
8263
|
+
type: "array",
|
|
8264
|
+
items: {
|
|
8265
|
+
type: "object",
|
|
8266
|
+
properties: {
|
|
8267
|
+
name: {
|
|
8268
|
+
type: "string"
|
|
8269
|
+
},
|
|
8270
|
+
description: {
|
|
8271
|
+
type: "string"
|
|
8272
|
+
},
|
|
8273
|
+
type: {
|
|
8274
|
+
type: "string",
|
|
8275
|
+
enum: [
|
|
8276
|
+
"text",
|
|
8277
|
+
"uuid",
|
|
8278
|
+
"bool",
|
|
8279
|
+
"number",
|
|
8280
|
+
"text[]"
|
|
8281
|
+
]
|
|
8282
|
+
},
|
|
8283
|
+
groupable: {
|
|
8284
|
+
type: "boolean"
|
|
8285
|
+
},
|
|
8286
|
+
cost: {
|
|
8287
|
+
type: "boolean"
|
|
8288
|
+
},
|
|
8289
|
+
ops: {
|
|
8290
|
+
type: "array",
|
|
8291
|
+
items: {
|
|
8292
|
+
type: "string"
|
|
8293
|
+
}
|
|
8294
|
+
}
|
|
8295
|
+
}
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8298
|
+
}
|
|
8299
|
+
}
|
|
8300
|
+
},
|
|
8301
|
+
measures: {
|
|
8302
|
+
type: "array",
|
|
8303
|
+
items: {
|
|
8304
|
+
type: "object",
|
|
8305
|
+
properties: {
|
|
8306
|
+
name: {
|
|
8307
|
+
type: "string"
|
|
8308
|
+
},
|
|
8309
|
+
description: {
|
|
8310
|
+
type: "string"
|
|
8311
|
+
},
|
|
8312
|
+
needs_of: {
|
|
8313
|
+
type: "boolean"
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
},
|
|
8318
|
+
group_by: {
|
|
8319
|
+
type: "object",
|
|
8320
|
+
properties: {
|
|
8321
|
+
time: {
|
|
8322
|
+
type: "array",
|
|
8323
|
+
items: {
|
|
8324
|
+
type: "string"
|
|
8325
|
+
}
|
|
8326
|
+
},
|
|
8327
|
+
max: {
|
|
8328
|
+
type: "integer"
|
|
8329
|
+
},
|
|
8330
|
+
max_buckets: {
|
|
8331
|
+
type: "integer"
|
|
8332
|
+
}
|
|
8333
|
+
}
|
|
8334
|
+
},
|
|
8335
|
+
scope_keys: {
|
|
8336
|
+
type: "array",
|
|
8337
|
+
items: {
|
|
8338
|
+
type: "string"
|
|
8339
|
+
}
|
|
8340
|
+
},
|
|
8341
|
+
limits: {
|
|
8342
|
+
type: "object",
|
|
8343
|
+
properties: {
|
|
8344
|
+
max_window_days: {
|
|
8345
|
+
type: "integer"
|
|
8346
|
+
},
|
|
8347
|
+
max_queries: {
|
|
8348
|
+
type: "integer"
|
|
8349
|
+
},
|
|
8350
|
+
max_list_values: {
|
|
8351
|
+
type: "integer"
|
|
8352
|
+
},
|
|
8353
|
+
statement_timeout_ms: {
|
|
8354
|
+
type: "integer",
|
|
8355
|
+
description: "How long one statement may run; a request runs one per dataset plus one per grouped query."
|
|
8356
|
+
},
|
|
8357
|
+
concurrency: {
|
|
8358
|
+
type: "object",
|
|
8359
|
+
properties: {
|
|
8360
|
+
requests: {
|
|
8361
|
+
type: "integer"
|
|
8362
|
+
},
|
|
8363
|
+
per: {
|
|
8364
|
+
type: "string",
|
|
8365
|
+
enum: [
|
|
8366
|
+
"workspace",
|
|
8367
|
+
"api_process"
|
|
8368
|
+
],
|
|
8369
|
+
description: "`api_process` where the deployment does not share the limiter across API processes."
|
|
8370
|
+
}
|
|
8371
|
+
}
|
|
8372
|
+
}
|
|
8373
|
+
}
|
|
8374
|
+
},
|
|
8375
|
+
cost_visible: {
|
|
8376
|
+
type: "boolean"
|
|
8377
|
+
}
|
|
8378
|
+
}
|
|
8379
|
+
}
|
|
8380
|
+
}
|
|
8381
|
+
}
|
|
8382
|
+
},
|
|
8383
|
+
"401": {
|
|
8384
|
+
$ref: "#/components/responses/Unauthorized"
|
|
8385
|
+
},
|
|
8386
|
+
"429": {
|
|
8387
|
+
$ref: "#/components/responses/RateLimitExceeded"
|
|
8388
|
+
}
|
|
8389
|
+
}
|
|
8390
|
+
}
|
|
8391
|
+
},
|
|
7801
8392
|
"/v1/usage/documents/{id}": {
|
|
7802
8393
|
get: {
|
|
7803
8394
|
operationId: "getDocumentUsage",
|
|
@@ -11460,7 +12051,7 @@ var openapi_default = {
|
|
|
11460
12051
|
get: {
|
|
11461
12052
|
operationId: "getCreditsUsage",
|
|
11462
12053
|
summary: "Get usage statistics",
|
|
11463
|
-
description:
|
|
12054
|
+
description: 'Returns aggregated API usage stats grouped by operation type and model over the given period. For organizations without the "Cost control endpoints" approval, `model` and `total_cost_usd` are omitted, rows are grouped by operation type only and ordered by `call_count`, and the response carries `"cost_fields": "redacted"`. The same gate as `GET /v1/usage`.',
|
|
11464
12055
|
tags: [
|
|
11465
12056
|
"Credits"
|
|
11466
12057
|
],
|
|
@@ -11526,6 +12117,13 @@ var openapi_default = {
|
|
|
11526
12117
|
period_days: {
|
|
11527
12118
|
type: "integer",
|
|
11528
12119
|
example: 30
|
|
12120
|
+
},
|
|
12121
|
+
cost_fields: {
|
|
12122
|
+
type: "string",
|
|
12123
|
+
enum: [
|
|
12124
|
+
"redacted"
|
|
12125
|
+
],
|
|
12126
|
+
description: "Present only when model and cost fields are redacted."
|
|
11529
12127
|
}
|
|
11530
12128
|
}
|
|
11531
12129
|
}
|
|
@@ -11545,7 +12143,7 @@ var openapi_default = {
|
|
|
11545
12143
|
get: {
|
|
11546
12144
|
operationId: "getCreditsUsageDaily",
|
|
11547
12145
|
summary: "Get daily usage breakdown",
|
|
11548
|
-
description:
|
|
12146
|
+
description: 'Returns per-day API usage for the specified period (default last 30 days) as a JSON array. For organizations without the "Cost control endpoints" approval, `cost_usd` is omitted from every entry (the array carries no `cost_fields` marker). The same gate as `GET /v1/usage`.',
|
|
11549
12147
|
tags: [
|
|
11550
12148
|
"Credits"
|
|
11551
12149
|
],
|
|
@@ -11611,7 +12209,7 @@ var openapi_default = {
|
|
|
11611
12209
|
get: {
|
|
11612
12210
|
operationId: "getCreditsUsageLog",
|
|
11613
12211
|
summary: "Get credit usage log",
|
|
11614
|
-
description:
|
|
12212
|
+
description: 'Returns a detailed per-request usage log with model, tokens, and cost, most recent first, with page/limit pagination. For organizations without the "Cost control endpoints" approval, `model` and `cost_estimate_usd` are omitted from every item and the response carries `"cost_fields": "redacted"`. The same gate as `GET /v1/usage`.',
|
|
11615
12213
|
tags: [
|
|
11616
12214
|
"Credits"
|
|
11617
12215
|
],
|
|
@@ -11711,6 +12309,13 @@ var openapi_default = {
|
|
|
11711
12309
|
},
|
|
11712
12310
|
limit: {
|
|
11713
12311
|
type: "integer"
|
|
12312
|
+
},
|
|
12313
|
+
cost_fields: {
|
|
12314
|
+
type: "string",
|
|
12315
|
+
enum: [
|
|
12316
|
+
"redacted"
|
|
12317
|
+
],
|
|
12318
|
+
description: "Present only when model and cost fields are redacted."
|
|
11714
12319
|
}
|
|
11715
12320
|
}
|
|
11716
12321
|
}
|
|
@@ -32275,7 +32880,7 @@ var openapi_default = {
|
|
|
32275
32880
|
get: {
|
|
32276
32881
|
operationId: "listContracts",
|
|
32277
32882
|
summary: "The contract register, filtered",
|
|
32278
|
-
description: "Every contract of the workspace with its status, dates, annual value, direction (sell, buy or internal, derived on read from the parties the documents name against the workspace's own company names), document count, next open key date, open process summary and the Price Baseline and Money Found links.
|
|
32883
|
+
description: "Every contract of the workspace with its status, dates, annual value, direction (sell, buy or internal, derived on read from the parties the documents name against the workspace's own company names), document count, next open key date, open process summary and the Price Baseline and Money Found links. Without `page`, `limit` or `offset` the whole register is returned in one array, ordered by counterparty, then contract key. With any of them the answer is one page of one view, with `total`, `page` and `limit`.",
|
|
32279
32884
|
tags: [
|
|
32280
32885
|
"Contracts"
|
|
32281
32886
|
],
|
|
@@ -32310,11 +32915,86 @@ var openapi_default = {
|
|
|
32310
32915
|
type: "string"
|
|
32311
32916
|
},
|
|
32312
32917
|
description: "Exact contract key."
|
|
32918
|
+
},
|
|
32919
|
+
{
|
|
32920
|
+
name: "view",
|
|
32921
|
+
in: "query",
|
|
32922
|
+
schema: {
|
|
32923
|
+
type: "string"
|
|
32924
|
+
},
|
|
32925
|
+
description: "Paged only: one register view (all, active, notice_soon, customer_exit, auto_renewal, open_ended, ended, review, money). An unknown view is a 400."
|
|
32926
|
+
},
|
|
32927
|
+
{
|
|
32928
|
+
name: "sort",
|
|
32929
|
+
in: "query",
|
|
32930
|
+
schema: {
|
|
32931
|
+
type: "string"
|
|
32932
|
+
},
|
|
32933
|
+
description: "Paged only: contract, counterparty, status, ends, next, value or money. An unknown sort is a 400."
|
|
32934
|
+
},
|
|
32935
|
+
{
|
|
32936
|
+
name: "dir",
|
|
32937
|
+
in: "query",
|
|
32938
|
+
schema: {
|
|
32939
|
+
type: "string",
|
|
32940
|
+
enum: [
|
|
32941
|
+
"asc",
|
|
32942
|
+
"desc"
|
|
32943
|
+
]
|
|
32944
|
+
}
|
|
32945
|
+
},
|
|
32946
|
+
{
|
|
32947
|
+
name: "due",
|
|
32948
|
+
in: "query",
|
|
32949
|
+
schema: {
|
|
32950
|
+
type: "string",
|
|
32951
|
+
format: "date"
|
|
32952
|
+
},
|
|
32953
|
+
description: "Paged only: contracts whose exit falls in the week starting on this calendar day. Not a real day is a 400."
|
|
32954
|
+
},
|
|
32955
|
+
{
|
|
32956
|
+
name: "page",
|
|
32957
|
+
in: "query",
|
|
32958
|
+
schema: {
|
|
32959
|
+
type: "integer",
|
|
32960
|
+
minimum: 1
|
|
32961
|
+
},
|
|
32962
|
+
description: "The page to return (1-based)."
|
|
32963
|
+
},
|
|
32964
|
+
{
|
|
32965
|
+
name: "limit",
|
|
32966
|
+
in: "query",
|
|
32967
|
+
schema: {
|
|
32968
|
+
type: "integer",
|
|
32969
|
+
minimum: 1
|
|
32970
|
+
},
|
|
32971
|
+
description: "Rows per page; capped at the configured most (500 by default)."
|
|
32972
|
+
},
|
|
32973
|
+
{
|
|
32974
|
+
name: "offset",
|
|
32975
|
+
in: "query",
|
|
32976
|
+
schema: {
|
|
32977
|
+
type: "integer",
|
|
32978
|
+
minimum: 0
|
|
32979
|
+
},
|
|
32980
|
+
description: "The first row of the page (0-based); wins over `page`. Ask from the rows already held so a row that moved meanwhile is not skipped."
|
|
32981
|
+
},
|
|
32982
|
+
{
|
|
32983
|
+
name: "issues",
|
|
32984
|
+
in: "query",
|
|
32985
|
+
schema: {
|
|
32986
|
+
type: "string",
|
|
32987
|
+
enum: [
|
|
32988
|
+
"0",
|
|
32989
|
+
"1"
|
|
32990
|
+
]
|
|
32991
|
+
},
|
|
32992
|
+
description: "Paged only: `1` attaches each row's open issues in any view (the review view always carries them)."
|
|
32313
32993
|
}
|
|
32314
32994
|
],
|
|
32315
32995
|
responses: {
|
|
32316
32996
|
"200": {
|
|
32317
|
-
description: "The matching contracts.",
|
|
32997
|
+
description: "The matching contracts; one page with `total` when paged.",
|
|
32318
32998
|
content: {
|
|
32319
32999
|
"application/json": {
|
|
32320
33000
|
schema: {
|
|
@@ -32325,11 +33005,24 @@ var openapi_default = {
|
|
|
32325
33005
|
items: {
|
|
32326
33006
|
$ref: "#/components/schemas/ContractsListItem"
|
|
32327
33007
|
}
|
|
33008
|
+
},
|
|
33009
|
+
total: {
|
|
33010
|
+
type: "integer",
|
|
33011
|
+
description: "Paged only: rows of the view after the filters."
|
|
33012
|
+
},
|
|
33013
|
+
page: {
|
|
33014
|
+
type: "integer"
|
|
33015
|
+
},
|
|
33016
|
+
limit: {
|
|
33017
|
+
type: "integer"
|
|
32328
33018
|
}
|
|
32329
33019
|
}
|
|
32330
33020
|
}
|
|
32331
33021
|
}
|
|
32332
33022
|
}
|
|
33023
|
+
},
|
|
33024
|
+
"400": {
|
|
33025
|
+
$ref: "#/components/responses/BadRequest"
|
|
32333
33026
|
}
|
|
32334
33027
|
}
|
|
32335
33028
|
}
|
|
@@ -34323,7 +35016,27 @@ var openapi_default = {
|
|
|
34323
35016
|
minimum: 1,
|
|
34324
35017
|
maximum: 5e3,
|
|
34325
35018
|
default: 200
|
|
34326
|
-
}
|
|
35019
|
+
},
|
|
35020
|
+
description: "Rows per page."
|
|
35021
|
+
},
|
|
35022
|
+
{
|
|
35023
|
+
name: "offset",
|
|
35024
|
+
in: "query",
|
|
35025
|
+
schema: {
|
|
35026
|
+
type: "integer",
|
|
35027
|
+
minimum: 0,
|
|
35028
|
+
default: 0
|
|
35029
|
+
},
|
|
35030
|
+
description: "The first row of the page (0-based). Wins over `page` when both are given."
|
|
35031
|
+
},
|
|
35032
|
+
{
|
|
35033
|
+
name: "page",
|
|
35034
|
+
in: "query",
|
|
35035
|
+
schema: {
|
|
35036
|
+
type: "integer",
|
|
35037
|
+
minimum: 1
|
|
35038
|
+
},
|
|
35039
|
+
description: "The page to return (1-based, `limit` rows each); an alternative to `offset`."
|
|
34327
35040
|
},
|
|
34328
35041
|
{
|
|
34329
35042
|
name: "scope",
|
|
@@ -34336,11 +35049,29 @@ var openapi_default = {
|
|
|
34336
35049
|
],
|
|
34337
35050
|
default: "partners"
|
|
34338
35051
|
}
|
|
35052
|
+
},
|
|
35053
|
+
{
|
|
35054
|
+
name: "document_id",
|
|
35055
|
+
in: "query",
|
|
35056
|
+
schema: {
|
|
35057
|
+
type: "string",
|
|
35058
|
+
format: "uuid"
|
|
35059
|
+
},
|
|
35060
|
+
description: "Only the parties of the row(s) this document belongs to."
|
|
35061
|
+
},
|
|
35062
|
+
{
|
|
35063
|
+
name: "contract_id",
|
|
35064
|
+
in: "query",
|
|
35065
|
+
schema: {
|
|
35066
|
+
type: "string",
|
|
35067
|
+
format: "uuid"
|
|
35068
|
+
},
|
|
35069
|
+
description: "Only the parties of this contract: the row(s) sharing the most of its documents (a framework document shared with other contracts does not pull in their parties). Not a UUID is a 400."
|
|
34339
35070
|
}
|
|
34340
35071
|
],
|
|
34341
35072
|
responses: {
|
|
34342
35073
|
"200": {
|
|
34343
|
-
description: "
|
|
35074
|
+
description: "One page of the parties.",
|
|
34344
35075
|
content: {
|
|
34345
35076
|
"application/json": {
|
|
34346
35077
|
schema: {
|
|
@@ -34348,12 +35079,20 @@ var openapi_default = {
|
|
|
34348
35079
|
properties: {
|
|
34349
35080
|
total: {
|
|
34350
35081
|
type: "integer",
|
|
34351
|
-
description: "Parties matching the filters, before
|
|
35082
|
+
description: "Parties matching the filters, before paging."
|
|
34352
35083
|
},
|
|
34353
35084
|
needs_attention: {
|
|
34354
35085
|
type: "integer",
|
|
34355
35086
|
description: "Parties in scope (before the other filters) that need a person."
|
|
34356
35087
|
},
|
|
35088
|
+
offset: {
|
|
35089
|
+
type: "integer",
|
|
35090
|
+
description: "The first row of this page."
|
|
35091
|
+
},
|
|
35092
|
+
limit: {
|
|
35093
|
+
type: "integer",
|
|
35094
|
+
description: "Rows per page."
|
|
35095
|
+
},
|
|
34357
35096
|
data: {
|
|
34358
35097
|
type: "array",
|
|
34359
35098
|
items: {
|
|
@@ -35906,7 +36645,7 @@ var openapi_default = {
|
|
|
35906
36645
|
get: {
|
|
35907
36646
|
operationId: "listCustomsDeclarationIssues",
|
|
35908
36647
|
summary: "Worklist of orders with a failing check",
|
|
35909
|
-
description: "The orders of a pipeline that are not ready, each with the checks that failed and the fields concerned, and the scored fields whose extracted value differs from the filed declaration or is missing. When `pipeline_id` is omitted, the pipeline is chosen as for `GET /v1/customs-declaration/declarations`.",
|
|
36648
|
+
description: "The orders of a pipeline that are not ready, each with the checks that failed and the fields concerned, and the scored fields whose extracted value differs from the filed declaration or is missing. When `pipeline_id` is omitted, the pipeline is chosen as for `GET /v1/customs-declaration/declarations`. The worklist is built from at most `customs_declaration.max_records` orders: `read` says how many were read, `available` how many the pipeline holds for the key, and `truncated` is true when orders past the cap were not checked.",
|
|
35910
36649
|
tags: [
|
|
35911
36650
|
"Customs Declaration"
|
|
35912
36651
|
],
|
|
@@ -59391,6 +60130,18 @@ var openapi_default = {
|
|
|
59391
60130
|
}
|
|
59392
60131
|
}
|
|
59393
60132
|
},
|
|
60133
|
+
read: {
|
|
60134
|
+
type: "integer",
|
|
60135
|
+
description: "Orders read and checked."
|
|
60136
|
+
},
|
|
60137
|
+
available: {
|
|
60138
|
+
type: "integer",
|
|
60139
|
+
description: "Orders the pipeline holds for the key; more than `read` only past the cap."
|
|
60140
|
+
},
|
|
60141
|
+
truncated: {
|
|
60142
|
+
type: "boolean",
|
|
60143
|
+
description: "True when `read` < `available`: orders past the cap are not in the worklist."
|
|
60144
|
+
},
|
|
59394
60145
|
data: {
|
|
59395
60146
|
type: "array",
|
|
59396
60147
|
items: {
|
|
@@ -59634,6 +60385,10 @@ var openapi_default = {
|
|
|
59634
60385
|
type: "string",
|
|
59635
60386
|
nullable: true,
|
|
59636
60387
|
description: "The title from the chart's latest reading; absent or null for a chart never read."
|
|
60388
|
+
},
|
|
60389
|
+
reason: {
|
|
60390
|
+
type: "string",
|
|
60391
|
+
description: "Optional engineering text explaining why a found chart is not ready, from its scan or latest reading that returned no values. Absent for ready charts and when no reason was stored. Clients map recognized codes to localized sentences and use a generic fallback for unknown codes; raw text is not display copy."
|
|
59637
60392
|
}
|
|
59638
60393
|
}
|
|
59639
60394
|
},
|
|
@@ -59807,6 +60562,30 @@ var openapi_default = {
|
|
|
59807
60562
|
$ref: "#/components/schemas/ChartToDataFoundChart"
|
|
59808
60563
|
}
|
|
59809
60564
|
},
|
|
60565
|
+
pictures: {
|
|
60566
|
+
type: "array",
|
|
60567
|
+
description: "Optional unread figure-sized picture diagnostics, grouped by page. Omitted when the scan has none or an older scan stored no picture diagnostics. These are not chart assets or claims.",
|
|
60568
|
+
items: {
|
|
60569
|
+
type: "object",
|
|
60570
|
+
required: [
|
|
60571
|
+
"page_number",
|
|
60572
|
+
"reasons"
|
|
60573
|
+
],
|
|
60574
|
+
properties: {
|
|
60575
|
+
page_number: {
|
|
60576
|
+
type: "integer",
|
|
60577
|
+
minimum: 1
|
|
60578
|
+
},
|
|
60579
|
+
reasons: {
|
|
60580
|
+
type: "array",
|
|
60581
|
+
items: {
|
|
60582
|
+
type: "string"
|
|
60583
|
+
},
|
|
60584
|
+
description: "One engineering reason per unread picture, including the refusal code and explanation when available. Clients map recognized codes to localized sentences and fall back generically for unknown codes."
|
|
60585
|
+
}
|
|
60586
|
+
}
|
|
60587
|
+
}
|
|
60588
|
+
},
|
|
59810
60589
|
diagrams: {
|
|
59811
60590
|
type: "array",
|
|
59812
60591
|
items: {
|
|
@@ -68873,6 +69652,10 @@ var API_NAV_SECTIONS = [
|
|
|
68873
69652
|
{ id: "usage-overview", label: "Overview" },
|
|
68874
69653
|
{ id: "usage-credits", label: "Credit Usage" }
|
|
68875
69654
|
] },
|
|
69655
|
+
{ id: "aggregate", label: "Aggregate", children: [
|
|
69656
|
+
{ id: "aggregate-overview", label: "Overview" },
|
|
69657
|
+
{ id: "aggregate-catalog", label: "Catalog" }
|
|
69658
|
+
] },
|
|
68876
69659
|
{ id: "account", label: "Account", children: [
|
|
68877
69660
|
{ id: "get-account", label: "Account Snapshot" },
|
|
68878
69661
|
{ id: "account-keys", label: "Manage API Keys" },
|
|
@@ -69247,6 +70030,7 @@ var API_SECTION_META = [
|
|
|
69247
70030
|
{ id: "routing-rules", title: "Routing Rules API", description: "Document routing rules \u2014 create, manage, and reorder priority-based rules for automatic document workflow assignment." },
|
|
69248
70031
|
{ id: "reference-data", title: "Reference Data API", description: "Upload, list, and manage reference data tables used as lookup targets for matching configurations. Supports JSON upload, paginated row access, and CSV export." },
|
|
69249
70032
|
{ id: "fields", title: "Fields API", description: "Read-only access to the field registry \u2014 list fields with filters, cross-schema harmonization analysis, field detail with occurrences, and embedding-based similarity search." },
|
|
70033
|
+
{ id: "aggregate", title: "Aggregate API", description: "Workspace metrics in one request \u2014 counts, sums, averages, medians and percentiles over documents, pipelines, app decisions, deliveries, model calls and the standard apps, filtered and grouped." },
|
|
69250
70034
|
{ id: "usage", title: "Usage API", description: "AI token usage tracking \u2014 aggregate stats by operation type and model, per-document usage breakdown with cost estimates, and per-function credit consumption." },
|
|
69251
70035
|
{ id: "pricing", title: "Pricing API", description: "Public machine-readable credit pricing catalog \u2014 fixed per-unit credit rates, EUR equivalents, the credits-per-EUR conversion, and processing-mode multipliers, so an agent can predict spend before running." },
|
|
69252
70036
|
{ id: "document-types", title: "Document Types API", description: "Document type classification \u2014 list workspace document types by frequency and retrieve the 529-type ontology taxonomy." },
|