{"openapi":"3.0.3","info":{"title":"AlisQI API","version":"1.1.0","description":"The AlisQI API gives access to the analysis sets, selection lists, results, specifications and statistics of an AlisQI tenant.\n\n## Authentication\n\nAuthenticate with an API token, preferably as a Bearer token in the `Authorization` header (`Authorization: Bearer <token>`). Alternatively, the token can be passed as the `access_token` parameter.\n\nUse the `checkAuth` operation to validate your authentication configuration.\n\n## Errors\n\nAll errors are returned as a JSON object with a single `error` property, for example `{\"error\": \"No read permission for this set\"}`.\n\n| Status | Meaning |\n|---|---|\n| `400 Bad Request` | A parameter is missing or invalid. |\n| `401 Unauthorized` | No token was provided, or the token is invalid. |\n| `403 Forbidden` | The user associated with the token lacks the required permission, or the request comes from an IP address that is not in the token's IP allow-list. |\n| `413 Payload Too Large` | Too many results were sent to `storeResults`. |\n| `429 Too Many Requests` | The rate limit has been exceeded. |\n| `500 Internal Server Error` | An unexpected error occurred. |\n\n## Rate limiting\n\nEach tenant may make 30 API requests per minute. The limit uses a fixed one-minute window and is shared by all operations and all tokens of the tenant. `checkAuth` does not count towards the limit.\n\nRate-limited responses include these headers:\n\n- `X-RateLimit-Limit`: the number of requests allowed per window.\n- `X-RateLimit-Remaining`: the number of requests left in the current window.\n- `X-RateLimit-Retry-After`: the **Unix timestamp** at which the current window resets. Note that this is a point in time, not a number of seconds.\n\nWhen the limit is exceeded, the API responds with `429 Too Many Requests` and an `{\"error\": \"...\"}` body.\n\n## Changelog\n\n### 1.1.0 (2026-09-30)\n\n- Added the `checkAuth` operation.\n- Added the `onlyActive` parameter to `getResults` and the `indexFieldOptions` parameter to `getSpecificationEvaluation`.\n- Documented the `@attachments` and `@id` pseudo-fields for `storeResults`, including how attachments are replaced when modifying results, and `keyField=@id`.\n- Documented the `storeResults` limits: at least 1 and at most 1,000 results (`413` when exceeded), and `editOnly` requires `keyField`.\n- Documented that `storeSpecificationVersion` gives fields that are left out or `null` an empty specification.\n- Documented the rate limit, and the `401`, `403` and `500` responses of all operations.\n- Corrected the response schemas of `getStatistics`, `getSpecificationEvaluation`, `getSpecificationVersion`, `getResults` and `getSetDefinition`.\n- Corrected `getResults` `limit` (maximum 17,000, clamped) and `sort` (no default order), `getStatistics` `limit` and `fields`, and `getSpecificationEvaluation` `limit` (10,000 per index field option).\n- Corrected `storeSetPermissions` `permissions` to a comma-separated string.\n- Corrected `createSet`: the field property is `multiline` (lowercase), errors are `{error: string}`, and a missing permission returns `403`.\n- Corrected the `getAllSets` matching rules and examples.\n- Removed `304 Not Modified` from all operations except `getResults`.\n- Corrected types: specification limits, averages, standard deviations and numeric defaults are numbers; `startDateTime` format; store operations return `application/json`.\n- Made all `operationId`s consistent with the operation names.\n- Fixed typos and broken characters.\n\n### 1.0\n\n- Initial version.\n"},"servers":[{"url":"https://{subdomain}.alisqi.com/api","description":"AlisQI tenant","variables":{"subdomain":{"default":"tenant","description":"The subdomain part needs to be replaced with the customer's subdomain."}}}],"tags":[{"name":"Authentication"},{"name":"Sets"},{"name":"Results"},{"name":"Statistics"},{"name":"Specifications"},{"name":"Permissions"}],"security":[{"ApiToken":[]},{"access_token":[]}],"paths":{"/checkAuth":{"get":{"tags":["Authentication"],"summary":"Check authentication","description":"Use this API operation to validate your authentication configuration and to check that the service is available.\n\nIt returns `\"OK\"` if the token is valid and the request comes from an allowed IP address. It takes no parameters and does not count towards the rate limit.","operationId":"checkAuth","responses":{"200":{"description":"The token is valid and the service is available.","content":{"application/json":{"schema":{"type":"string","enum":["OK"]},"example":"OK"}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Forbidden: the request comes from an IP address that is not in the token's IP allow-list.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WWW-Authenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"IpNotAllowed":{"value":{"error":"Invalid IP address"}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/getResults":{"get":{"tags":["Results"],"summary":"Get results or master data","description":"Use this API operation to get (quality) results from analysis sets or master data from selection lists.","operationId":"getResults","parameters":[{"name":"setId","description":"The unique id of the analysis set or selection list.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","in":"query","required":true,"schema":{"type":"integer"},"example":16},{"name":"limit","description":"The maximum number of results to return.\n\nDefaults to, and is capped at, 17,000. A value of 0 or less, or above 17,000, is not rejected but treated as 17,000.","in":"query","required":false,"schema":{"type":"integer","default":17000,"maximum":17000},"example":100},{"name":"offset","description":"The zero-based offset used for paging. Defaults to 0.","in":"query","required":false,"schema":{"type":"integer","default":0},"example":50},{"name":"sort","description":"Sort field and direction, specified as `field` or `field:direction`, where direction is either `asc` or `desc`.\n\nWithout a direction, results are sorted ascending. Results with equal values are sorted by result id, in the same direction.\n\nWhen `sort` is left out, the order of the results is not defined. Always specify `sort` when paging with `limit` and `offset`.\n","in":"query","required":false,"schema":{"type":"string"},"example":"date:desc"},{"name":"filter","description":"JSON object as a string.\n\nSpecify a filter for the results.\n\nDefaults to none.\n\n<b>Example</b>: `{\"status_\":[{\"value\":\"5\"}]}`<br><br>\n<b>Note</b>: this parameter is usually called constraints in AlisQI URLs. The API uses filter for consistency with the terminology used in the user interface. <br><b>Tip</b>: Use the filter widget in the in-app Integration hub to create a JSON filter string.\n","in":"query","required":false,"schema":{"type":"string"}},{"name":"fields","description":"Comma-separated list of the fields to include. Defaults to all fields.\n\nUse the in-app [integration hub](https://help.alisqi.com/article/478-integration-hub) to find the field names for a particular set.\n\nThe pseudo-fields `id` and `lastModificationDate` can also be listed here. They have the same effect as `includeId=true` and `includeLastModificationDate=true`.\n","in":"query","required":false,"schema":{"type":"string"},"example":"field1,field2,field3"},{"name":"includeAttachments","description":"Include attachments. Defaults to `false`.\n\nEach result object will then include the pseudo-field `@attachments`, which is an array of objects, each with two properties:\n\n* `filename` is the file's title and extension.\n\n* `data` is the base64-encoded content of the file.\n\n```json\n[{\n  \"date\": \"2000-01-01 00:00\",\n  …\n  \"@attachments\": [{\n    \"filename\": \"Delivered pallet.jpeg\",\n    \"data\": \"/9j/4AAQSkZJRgABAg…\"\n  }, {\n    \"filename\": \"Supplier's CoA.pdf\",\n    \"data\": \"JVBERi0xLjUKJcOkw7…\"\n  }]\n}]\n```\n\nThe same format can be used to store attachments with `storeResults`.\n","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeId","description":"Include result id. Defaults to `false`.\n\nEach result object will then include its unique id in the pseudo-field `@id`.\n\nThese ids can be used with `keyField=@id` in the `storeResults` operation to update existing results. You may also use the ids of selection list options to dynamically build filters.\n","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"includeLastModificationDate","description":"Include result last modification date. Defaults to `false`.\n\nTo include each result's last modification's date, use the `includeLastModificationDate` parameter. Each result object will then include it in the pseudo-element `@lastModificationDate`.\n","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"onlyActive","description":"Only applies to selection lists: whether to only return active options. Defaults to `true`.\n\nSpecifying this parameter for an analysis set results in `400 Bad Request`.\n","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"$ref":"#/components/responses/GetResultsResponse"},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/getAllSets":{"get":{"tags":["Sets"],"summary":"Get all analysis sets or selection lists","description":"Use this API operation to get a list of (all)  analysis sets or selection lists.","operationId":"getAllSets","parameters":[{"name":"groups","description":"The id(s) or the name(s) of the group(s) to retrieve, as a comma-separated list.\n\n* When only numbers are used (e.g. `1,3`), they are treated as group ids, and the groups with these ids are retrieved.\n\n* Otherwise (e.g. `G1,G3`), each value is matched case-insensitively against **part of** the group name: the groups whose name contains `G1` or `G3` are retrieved. This also applies to a mix of names and numbers: `G1,3` retrieves the groups whose name contains `G1` or `3`.\n\n* If the value `Selection lists` (case-insensitive) is passed, all selection lists are retrieved.\n\nValues are not trimmed, so don't put spaces after the commas.\n\nWhen both `groups` and `names` are specified, the sets that match **either** of them are returned.\n","in":"query","required":false,"schema":{"type":"string"},"examples":{"SingleId":{"summary":"Single group id","value":"1"},"MultipleIds":{"summary":"Multiple group ids","value":"1,2"},"SingleName":{"summary":"Single group name","value":"GroupX"},"MultipleNames":{"summary":"Multiple group names","value":"GroupX,GroupY"},"SelectionLists":{"summary":"Selection Lists","value":"Selection lists,GroupX"}}},{"name":"names","description":"The name(s) of the analysis set(s) or selection list(s) to retrieve, as a comma-separated list.\n\nEach value is matched case-insensitively against **part of** the name: `Coating` retrieves all sets whose name contains `coating`.\n\nValues are not trimmed, so don't put spaces after the commas.\n\nWhen both `groups` and `names` are specified, the sets that match **either** of them are returned.\n","in":"query","schema":{"type":"string"},"examples":{"SingleAnalysisSet":{"summary":"Single analysis set","value":"AnalysisSet1"},"MultipleAnalysisSets":{"summary":"Multiple analysis sets","value":"AnalysisSet1,AnalysisSet2"},"AnalysisSetAndSelectionList":{"summary":"Analysis set and selection list","value":"AnalysisSet1,SelectionList1"}},"required":false}],"responses":{"200":{"$ref":"#/components/responses/GetAllSetsResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storeResults":{"post":{"tags":["Results"],"summary":"Create or update results or master data","description":"Use this API operation to create or update quality results in analysis sets or master data in selection lists.\n\nReturns `400 Bad Request` if `results` is empty, or if `editOnly` is used without `keyField`. Returns `413 Payload Too Large` if `results` contains more than 1,000 results.","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["setId","results"],"type":"object","properties":{"setId":{"type":"integer","description":"The unique id of the analysis set or selection list.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface."},"results":{"type":"string","description":"JSON array of result objects, as a string. It must contain at least 1 and at most 1,000 results.\n\nEach result object has one key/value pair per field. Two pseudo-fields are also supported:\n\n* `@id`: the id of an existing result. Only used with `keyField=@id` (see `keyField`).\n\n* `@attachments`: an array of attachments. Each attachment is an object with `filename` (the file name, including the extension) and `data` (the base64-encoded content of the file). This is the same format that `getResults` returns with `includeAttachments=true`.\n\n<b>Example</b>:\n```\n[\n  {\n    \"date\": \"2023-08-08 19:19:02\",\n    \"product_\": \"Asy Novelo\",\n    \"batch_\": \"B150125\",\n    \"status_\": \"In production\",\n    \"@attachments\": [\n      {\n        \"filename\": \"Supplier's CoA.pdf\",\n        \"data\": \"JVBERi0xLjUKJcOkw7…\"\n      }\n    ]\n  }\n]\n```\n\n<b>Attachments when modifying an existing result</b> (with `keyField`):\n\n| `@attachments` | Effect on the existing result |\n|---|---|\n| Left out | The existing attachments are kept. |\n| `[]` | All existing attachments are deleted. |\n| A list | The list replaces all existing attachments. Files with the same content as an existing attachment are kept (and their titles updated), new files are added, and existing attachments that are not in the list are deleted. |\n\nTo add an attachment to a result that already has attachments, send the complete list. You can retrieve it with `getResults` and `includeAttachments=true`.\n\n<b>Tip</b>: Call the getResults endpoint to see the exact Result data structure for this setId."},"keyField":{"description":"Find and modify existing results based on this field's value. \n\nUse `keyField=@id` to find existing results by their id: each result object must then contain the pseudo-field `@id` with the id of the result to modify. Use `getResults` with `includeId=true` to get these ids.\n\nDefaults to `none`, meaning new results will be created.\n\nIf a key field is specified, AlisQI will try to find an existing result that matches the provided result's value for that field. If one is found, the existing result's values are merged with those provided and the result is modified. If no existing result is found, a new one is created.\n\nYou can prevent the creation of new results by setting `editOnly=true`. When set, AlisQI will not create new results. Instead, an error message is provided for each result that has no matching existing result.\nUse this to prevent accidental creation of results when key field values might not match up exactly.\n\nNote that the key field evaluation is case sensitive.\nWhen a key field is used, you only need to specify the values that you want to change. These will be merged with the existing values. That means you can even leave out values for required fields.\nHowever, if no existing result is found, AlisQI will try to modify or create a result using only the partial result!\nIf you wish to remove a value, specify `\"field\": null` in the Result.\n","type":"string"},"editOnly":{"description":"Use (only) in conjunction with keyField. Enable to prevent (accidental) creation of new results.\n\nDefaults to `false`. Specifying `editOnly=true` without `keyField` results in `400 Bad Request`.\n","type":"boolean","default":false,"example":true},"addListOptions":{"description":"Create new selection list options if an unknown value is specified?\n\nDefaults to `false` to prevent accidental duplicates or noise in master data.\n","type":"boolean","default":false,"example":true}}}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/StoreResultsResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"storeResults"}},"/getStatistics":{"get":{"tags":["Statistics"],"summary":"Get descriptive statistics for analysis set fields","description":"Use this API operation to get descriptive statistics for numeric analysis set fields of your choice.","operationId":"getStatistics","parameters":[{"name":"setId","description":"The unique id of the analysis set or selection list.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","in":"query","required":true,"schema":{"type":"integer"},"example":16},{"name":"fields","description":"Comma-separated list of field names, at most 25.\n\nUse the in-app [integration hub](https://help.alisqi.com/article/478-integration-hub) to find the field names for a particular set.\n\nInclude the pseudo-field `@id` (or `id`) to also get the number of results and the lowest and highest result id, in the `@id` property of the response.\n","in":"query","required":true,"schema":{"type":"string"},"example":"field1,field2,field3"},{"name":"limit","description":"The maximum number of results to consider while calculating the statistics. Must be between 1 and 50,000.\n\nDefaults to 50,000.\n\nIf the set has a `date` field, the most recent results are used.\n","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50000,"default":50000},"example":500},{"name":"filter","description":"JSON object as a string.\n\nSpecify a filter for the results.\n\nDefaults to none.\n\n<b>Example</b>: `{\"status_\":[{\"value\":\"5\"}]}`<br><br>\n<b>Note</b>: this parameter is usually called constraints in AlisQI URLs. The API uses filter for consistency with the terminology used in the user interface.<br><b>Tip</b>: Use the filter widget in the in-app Integration hub to create a JSON filter string.\n","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetStatisticsResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/getSpecificationEvaluation":{"get":{"tags":["Statistics"],"summary":"Get capability statistics for analysis set fields","description":"Use this API operation to get in-depth statistics of specification evaluation and product and process capability for an analysis set's numeric fields.","parameters":[{"name":"setId","description":"The unique id of the analysis set. Selection lists have no specifications.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","in":"query","required":true,"schema":{"type":"integer"},"example":16},{"name":"fields","description":"Comma-separated list of field names, at most 25.\n\nUse the in-app [integration hub](https://help.alisqi.com/article/478-integration-hub) to find the field names for a particular set.","in":"query","required":true,"schema":{"type":"string"},"example":"field1,field2,field3"},{"name":"indexFieldOptions","description":"Only applies to sets with an index field.\n\nComma-separated list of the index field options to evaluate, at most 25. Specify either only option ids (e.g. `12,15`) or only option values (e.g. `Product A,Product B`).\n\nDefaults to all active options. If this parameter is left out and more than 25 index field options have results, the API returns `400 Bad Request`. In that case, specify `indexFieldOptions`, or narrow down the results with `filter`.\n\nThe response is keyed by the options in the form they are specified here (ids or values).\n","in":"query","required":false,"schema":{"type":"string"},"example":"Product A,Product B"},{"name":"limit","description":"The maximum number of results to consider while calculating the statistics, **per index field option** (or in total, for sets without an index field). At most 10,000.\n\nDefaults to 10,000.\n","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"default":10000},"example":500},{"name":"filter","description":"JSON object as a string.\n\nSpecify a filter for the results.\n\nDefaults to none.\n\n<b>Example</b>: `{\"status_\":[{\"value\":\"5\"}]}`<br><br>\n<b>Note</b>: this parameter is usually called constraints in AlisQI URLs. The API uses filter for consistency with the terminology used in the user interface.<br><b>Tip</b>: Use the filter widget in the in-app Integration hub to create a JSON filter string.\n","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetSpecificationEvaluationResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"getSpecificationEvaluation"}},"/getSpecificationVersion":{"get":{"tags":["Specifications"],"summary":"Get specification versions","description":"Use this API operation to get (a) specification version(s) for an analysis set.","parameters":[{"name":"setId","description":"The unique id of the analysis set. Selection lists have no specifications and are not supported by this operation.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","in":"query","required":true,"schema":{"type":"integer"},"example":16},{"name":"indexValue","description":"The index field value. (This only applies to sets that have an index field.)\n\nGet the current specification version for this index value. Index value matching is case-insensitive.\n\nIf the set has an index field and this parameter is left out, the current specification version of every index value is returned, keyed by index value.\n","in":"query","required":false,"schema":{"type":"string"},"example":"Product A"}],"responses":{"200":{"$ref":"#/components/responses/GetSpecificationVersionResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"getSpecificationVersion"}},"/storeSpecificationVersion":{"post":{"tags":["Specifications"],"summary":"Create a new specification version","description":"Use this API operation to create a new specification version for an analysis set.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["setId","specs"],"properties":{"setId":{"description":"The unique id of the analysis set. Selection lists have no specifications and are not supported by this operation.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","type":"integer"},"specs":{"type":"string","description":"JSON object as a string.\n\nSpecification objects. \n\n<b>Example</b>:\n```\n{\n  \"ph_\": {\n\t\"min\": 7,\n\t\"innermin\": 8,\n\t\"goal\": 9,\n\t\"innermax\": 10,\n\t\"max\": 11\n  },\n  \"viscosity_\": {\n\t\"min\": 500,\n\t\"innermin\": null,\n\t\"goal\": null,\n\t\"innermax\": null,\n\t\"max\": 1300\n  }\n}\n```\n\n<b>Important</b>: the new specification version replaces the current one entirely. Fields that are left out, or set to `null`, get an **empty** specification in the new version: their current specification is not carried over. Include every field whose specification you want to keep.\n\n<b>Tip</b>: Call the getSpecificationVersion endpoint to see the exact Specification data structure for this setId."},"indexValue":{"description":"The index field value. (Only applies to sets which have an index field.)\n\nStore a new specification version for this index value.\n\nLeave out to create a generic specification which applies to all index values.\n","type":"string","example":"Product A"},"startDateTime":{"description":"The start date and time of the new specification version, formatted as `yyyy-mm-dd hh:mm:ss` (with a space between date and time, not a `T`), or as a Unix timestamp.\n\nLeave out to use the current date and time.\n","type":"string","example":"2001-02-03 14:15:16"},"reason":{"description":"The reason for changing the spec\n\nThis is used for documentation only.\n","type":"string","example":"rev# 12.3abc"}}}}},"required":true},"responses":{"200":{"description":"Returns `true` if the specification version has been stored.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}},"content":{"application/json":{"schema":{"type":"boolean"},"example":true}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"storeSpecificationVersion"}},"/getSetDefinition":{"get":{"tags":["Sets"],"summary":"Get the structure of an analysis set or selection list","description":"Use this API operation to get the structural definition of an analysis set or selection list.","parameters":[{"name":"setId","description":"The unique id of the analysis set or selection list.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","in":"query","required":true,"schema":{"type":"integer"},"example":16},{"name":"onlyActiveFields","description":"Whether to only show currently active fields or also include deactivated fields.\n\nDefaults to `true` (only active fields). Deactivated fields have the property `\"active\": false`.\n","in":"query","required":false,"schema":{"type":"boolean","default":true},"example":true}],"responses":{"200":{"$ref":"#/components/responses/GetSetDefinitionResponse"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"getSetDefinition"}},"/createSet":{"post":{"summary":"Create new set or list","description":"This endpoint allows the creation of a new set or list, with its properties and collection of fields.\n","operationId":"createSet","tags":["Sets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the set or list","example":"Final product inspections"},"type":{"type":"string","description":"Type of the set, either 'set' or 'list'.","enum":["set","list"],"example":"set"},"groupId":{"type":"integer","description":"Group ID, required if type is 'set', should be omitted if the type is 'list'."},"fields":{"type":"array","description":"Collection of fields that will be added to the set. They will appear as form fields.","minItems":1,"items":{"type":"object","required":["label","type"],"properties":{"label":{"type":"string","description":"Human-readable title for the field.","example":"Temperature"},"abbreviation":{"type":"string","description":"Abbreviation for the field title.","example":"Temp"},"unit":{"type":"string","description":"Unit of measure for the field.","example":"°C"},"method":{"type":"string","description":"The field's test method.","example":"ASTM E21"},"type":{"type":"string","description":"Type of field.","enum":["date","text","numeric","select","check","signature"],"example":"numeric"},"required":{"type":"boolean","description":"Indicates if the field is required.","default":false},"lockOnValue":{"type":"boolean","description":"Whether the field is locked after receiving its first value."},"isIndex":{"type":"boolean","description":"Indicates whether the field should be configured as the index field. Applies to required select fields only."},"format":{"type":"string","description":"Specific format for date or numeric fields. This property is required for date or numeric fields.","enum":["date","datetime","integer","decimal","scientific"]},"multiline":{"type":"boolean","description":"Controls the appearance of text fields in forms. Applies to text fields only.\n\nNote that this property is written in lowercase (`multiline`), unlike the `multiLine` property returned by `getSetDefinition`."},"decimals":{"type":"integer","description":"Number of decimal places. Applies to numeric fields only."},"default":{"type":"number","description":"Default value for the field. Applies to numeric fields only."},"listId":{"type":"integer","description":"ID of the selection list associated with a select field. Applies to select fields only."},"listField":{"type":"string","description":"Field name in the selection list identified by `listId`. The referenced fields needs to be required and of type text or numeric"},"radioButtons":{"type":"boolean","description":"Controls appearance of select fields, either radio buttons or dropdown. Applies to select fields only."},"lockResultSignoff":{"type":"boolean","description":"Whether the entire result should be locked upon sign-off. Applies to signature fields only."}}}}},"required":["name","type","fields"]}}}},"responses":{"200":{"description":"Set created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"setId":{"type":"integer","description":"ID of the created set.","example":1234}}}}}},"400":{"description":"Bad Request: a parameter or field definition is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"InvalidGroup":{"value":{"error":"Parameter 'groupId' is required for sets and cannot be set for lists"}},"UnknownProperty":{"value":{"error":"Unknown property 'multiLine' for field definition at index 0"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Forbidden: the user associated with the token doesn't have permission to create sets, or the request comes from an IP address that is not in the token's IP allow-list.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WWW-Authenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"NoPermission":{"value":{"error":"The user associated with this token doesn't have permission to create sets"}},"IpNotAllowed":{"value":{"error":"Invalid IP address"}}}}}},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/storeSetPermissions":{"post":{"tags":["Permissions"],"summary":"Store permissions for an analysis set or selection list","description":"Use this API operation to configure permissions for an analysis set or selection list.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["setId","userGroupId","permissions"],"properties":{"setId":{"description":"The unique id of the analysis set or selection list.\n\nThis parameter is required and has no default.\n\n<b>Note</b>: for historical reasons, this parameter is usually called `maskid` in AlisQI URLs. The API uses `setId` for consistency with the terminology used in the user interface.","type":"integer"},"userGroupId":{"description":"The unique id of the user group.","type":"integer"},"permissions":{"type":"string","description":"Comma-separated list of permissions, as a string (e.g. `read,insert`).\n\nPossible permissions: `read`, `insert`, `complete`, `modify`, `delete` and `specification`. For selection lists, only `read` and `modify` are applicable.\n\nTo revoke all permissions of the user group, send this parameter with an empty value (`permissions=`). Leaving the parameter out results in `400 Bad Request`.","example":"read,insert"}}}}},"required":true},"responses":{"200":{"description":"Returns `true` if the permissions have been stored.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}},"content":{"application/json":{"schema":{"type":"boolean"},"example":true}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"operationId":"storeSetPermissions"}}},"components":{"schemas":{"Specs":{"type":"object","additionalProperties":true,"properties":{"numericfield":{"type":"object","properties":{"min":{"type":"number","nullable":true,"example":null},"innermin":{"type":"number","nullable":true,"example":3},"goal":{"type":"number","nullable":true,"example":5},"innermax":{"type":"number","nullable":true,"example":null},"max":{"type":"number","nullable":true,"example":9}}},"selectfield":{"type":"array","items":{"type":"string"},"example":["Option One","Option Two"]}}},"GetSetDefinitionSchema":{"type":"object","properties":{"name":{"type":"string"},"group":{"type":"string","nullable":true,"description":"Only for analysis sets."},"indexField":{"type":"string","nullable":true,"description":"Only for analysis sets."},"fields":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/FieldsTypeDate"},{"$ref":"#/components/schemas/FieldsTypeSelect"},{"$ref":"#/components/schemas/FieldsTypeNumeric"},{"$ref":"#/components/schemas/FieldsTypeText"},{"$ref":"#/components/schemas/FieldsTypeCalculation"},{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"}]}}}},"FieldsTypeText":{"allOf":[{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"},{"type":"object","properties":{"multiLine":{"type":"boolean","nullable":true}}}]},"FieldsTypeNumeric":{"allOf":[{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"},{"type":"object","properties":{"decimals":{"type":"integer","nullable":true},"default":{"type":"number","nullable":true,"description":"The default value. Not present for calculations."}}}],"example":{"name":"old","label":"Old field","abbreviation":"Old","unit":"m/s<sup>2</sup>","type":"numeric","required":false,"decimals":2,"default":0,"active":false}},"FieldsTypeSelect":{"allOf":[{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"},{"type":"object","properties":{"listId":{"type":"integer"},"listField":{"type":"string"},"listFilter":{"type":"string","nullable":true}}}],"example":{"name":"product","label":"Product","abbreviation":"Prod","unit":null,"type":"select","required":true,"listId":123,"listField":"code","listFilter":"group = 1"}},"FieldsTypeDate":{"allOf":[{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"},{"type":"object","properties":{"format":{"type":"string","enum":["date","datetime"]}}}],"example":{"name":"date","label":"Date","abbreviation":"Date","unit":null,"type":"date","required":true,"format":"datetime"}},"GetSetDefinitionGlobalFields":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"abbreviation":{"type":"string"},"unit":{"type":"string","nullable":true},"type":{"type":"string","enum":["date","numeric","select","text","check","signature","calculation","selectcalculation","textcalculation","datecalculation","checkcalculation"],"description":"The field type. Calculated fields have a type ending in `calculation`, e.g. `calculation` for a numeric calculation."},"required":{"type":"boolean"},"active":{"type":"boolean","enum":[false],"description":"Only present, with value `false`, for inactive fields (when `onlyActiveFields=false`)."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A human-readable error message (in English)."}}},"ResultAttachment":{"type":"object","required":["filename","data"],"properties":{"filename":{"type":"string","description":"The file name, including the extension.","example":"Supplier's CoA.pdf"},"data":{"type":"string","format":"byte","description":"The base64-encoded content of the file.","example":"JVBERi0xLjUKJcOkw7…"}}},"Result":{"type":"object","description":"A result: one key/value pair per field, keyed by field name, plus the requested pseudo-fields (starting with `@`).\n\nNumeric values that were entered with an operator (such as `<` or `>`) are returned as a string with the operator prepended, e.g. `\"<321\"`. Other numeric values are returned as numbers.","properties":{"@id":{"type":"integer","description":"The unique id of the result. Only present with `includeId=true` (or `id` in `fields`).","example":1234},"@lastModificationDate":{"type":"string","description":"The date and time of the last modification. Only present with `includeLastModificationDate=true` (or `lastModificationDate` in `fields`).","example":"2001-02-05 08:30:00"},"@attachments":{"type":"array","description":"The attachments of the result. Only present with `includeAttachments=true`.","items":{"$ref":"#/components/schemas/ResultAttachment"}}},"additionalProperties":{"description":"A field value: a string, number, boolean or `null`, depending on the field type.","nullable":true}},"FieldStatistics":{"type":"object","properties":{"count":{"type":"integer","description":"The number of values.","example":10},"no-spec":{"type":"integer","description":"The number of values without a specification.","example":0},"in-spec":{"type":"integer","description":"The number of values within the specification.","example":7},"offspec-internal":{"type":"integer","description":"The number of values outside the internal specification limits.","example":0},"offspec-external":{"type":"integer","description":"The number of values outside the external specification limits.","example":3},"min":{"type":"number","nullable":true,"description":"The lowest value.","example":8.46},"max":{"type":"number","nullable":true,"description":"The highest value.","example":8.54},"sum":{"type":"number","nullable":true,"description":"The sum of all values.","example":84.96},"avg":{"type":"number","nullable":true,"description":"The average of all values.","example":8.5},"stddev":{"type":"number","nullable":true,"description":"The standard deviation of all values.","example":0.02}}},"ResultIdStatistics":{"type":"object","description":"Only present if `@id` (or `id`) was included in `fields`.","properties":{"count":{"type":"integer","description":"The number of results.","example":10},"min":{"type":"integer","nullable":true,"description":"The lowest result id.","example":1001},"max":{"type":"integer","nullable":true,"description":"The highest result id.","example":1010}}},"Statistics":{"type":"object","description":"Keyed by field name.","properties":{"@id":{"$ref":"#/components/schemas/ResultIdStatistics"}},"additionalProperties":{"$ref":"#/components/schemas/FieldStatistics"}},"FieldSpecificationEvaluation":{"type":"object","properties":{"count":{"type":"integer","example":180},"no-spec":{"type":"integer","example":40},"in-spec":{"type":"integer","example":119},"offspec-internal":{"type":"integer","example":16},"offspec-external":{"type":"integer","example":5},"avg":{"type":"number","example":10.2,"nullable":true},"stddev":{"type":"number","example":23.68,"nullable":true},"cp":{"type":"number","example":0.765,"nullable":true},"cpk":{"type":"number","example":0.669,"nullable":true},"pp":{"type":"number","example":0.127,"nullable":true},"ppk":{"type":"number","example":0.111,"nullable":true},"lcl":{"type":"number","example":-61.04,"nullable":true},"ucl":{"type":"number","example":81.04,"nullable":true}}},"SpecificationEvaluation":{"type":"object","description":"Keyed by field name.","additionalProperties":{"$ref":"#/components/schemas/FieldSpecificationEvaluation"}},"SpecificationVersion":{"type":"object","properties":{"startDateTime":{"type":"string","description":"The start date and time, formatted as `yyyy-mm-dd hh:mm:ss`.","example":"2001-02-03 14:15:16"},"generic":{"type":"boolean","example":true,"description":"Only present (as `true`) for a generic specification version, which applies to all index values."},"specs":{"$ref":"#/components/schemas/Specs"}}},"FieldsTypeCalculation":{"allOf":[{"$ref":"#/components/schemas/GetSetDefinitionGlobalFields"},{"type":"object","properties":{"expression":{"type":"string","description":"The calculation expression."},"decimals":{"type":"integer","nullable":true,"description":"Only for numeric calculations (type `calculation`)."}}}],"example":{"name":"total","label":"Total","abbreviation":"Tot","unit":"kg","type":"calculation","required":false,"expression":"{net} + {tare}","decimals":1}}},"responses":{"GetSpecificationVersionResponse":{"description":"A JSON value that depends on the set and on `indexValue`:\n\n* For sets **without** an index field, or when `indexValue` is given: a specification version object, or `null` if there is no current specification version.\n\n* For sets **with** an index field and **no** `indexValue`: an object keyed by index value. Each value is the current specification version object for that index value, or `null` if there is none.\n\nA specification version object has two properties: `startDateTime` and `specs`. The latter is an object with a property for each specification field (numeric or select type).\n\nIf the specification version is generic, a third property (`generic`) will be present. A generic specification version applies to all index values.\n","content":{"application/json":{"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/SpecificationVersion"}],"nullable":true,"title":"Single specification version"},{"type":"object","title":"Keyed by index value","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/SpecificationVersion"}],"nullable":true}}]},"examples":{"Single":{"summary":"Without index field, or with indexValue","value":{"startDateTime":"2001-02-03 14:15:16","specs":{"ph_":{"min":7,"innermin":8,"goal":9,"innermax":10,"max":11},"color_":["Red","Blue"]}}},"PerIndexValue":{"summary":"With index field and no indexValue","value":{"Product A":{"startDateTime":"2001-02-03 14:15:16","specs":{"ph_":{"min":7,"innermin":8,"goal":9,"innermax":10,"max":11}}},"Product B":null}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"StoreResultsResponse":{"description":"The output will be a JSON-encoded array which mirrors the results parameter: for each result that was specified, the array will contain either a string describing an error, or `null` if no error occurred.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","nullable":true}},"example":[null,"Date is required, but no value has been entered.",null,"Unknown field: 'invalidfield'"]}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"GetSetDefinitionResponse":{"description":"The output will be a JSON-encoded object.\n\nFor both analysis sets and selection lists, the object will have properties `name` and `fields`. Analysis sets will also have `group` and `indexField`, which might be `null`.\n\nThe `fields` value will be an array of objects. These objects are listed in order and describe the fields. Object properties will vary based on the field `type`:\n\n* `date` fields have a `format` property, which is either `date` or `datetime`.\n\n* `numeric` fields all have `decimals`. If this is null, the field holds a floating point value. They also have a `default`.\n\n* Calculated fields have a type ending in `calculation` (`calculation`, `selectcalculation`, `textcalculation`, `datecalculation` or `checkcalculation`) and an `expression` property. Numeric calculations (`calculation`) also have `decimals`, but no `default`.\n\n* `select` fields have properties (`listId, listField, listFilter`) that define which selection list the field is based on, and which of list's fields is selected, along with which filter (see the `product` field in the example below).\n\n* `text` fields have a `multiLine` property with a boolean value.\n\n* `check` and `signature` fields only have the common properties.\n\nThe `active` property is only present, with value `false`, for inactive fields. These are only included with `onlyActiveFields=false`.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSetDefinitionSchema"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"GetSpecificationEvaluationResponse":{"description":"A JSON object.\n\n* For sets **with** an index field, it is keyed by index field option. Each value is an object keyed by field name. The options are given in the same form as in `indexFieldOptions` (ids or values); without `indexFieldOptions`, they are option values.\n\n* For sets **without** an index field, it is keyed by field name.\n\nIndex field options without results are left out. If there are no results at all, an empty array (`[]`) is returned.\n\nThe statistics of each field are:\n\nThe `count` represents the number of values\n\nThe `no-spec` represents the number of values without spec\n\nThe `in-spec` represents the number of values within spec bandwidth\n\nThe `offspec-internal` represents the number of values off-spec in the internal spec range\n\nThe `offspec-external` represents the number of values off-spec in the external spec range\n\nThe `avg` represents the average of all the values of the field\n\nThe `stddev` represents the standard deviation of all the values of the field\n\nThe `cp` represents the Cp value\n\nThe `cpk` represents the Cpk value\n\nThe `pp` represents the Pp value\n\nThe `ppk` represents the Ppk value\n\nThe `lcl` represents the Computed value: Average - 3x standard deviation\n\nThe `ucl` represents the Computed value: Average + 3x standard deviation\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Set with an index field","description":"Keyed by index field option.","additionalProperties":{"$ref":"#/components/schemas/SpecificationEvaluation"}},{"allOf":[{"$ref":"#/components/schemas/SpecificationEvaluation"}],"title":"Set without an index field"}]},"examples":{"WithIndexField":{"summary":"Set with an index field","value":{"Product A":{"viscosity_":{"count":180,"no-spec":40,"in-spec":119,"offspec-internal":16,"offspec-external":5,"avg":10.2,"stddev":23.68,"cp":0.765,"cpk":0.669,"pp":0.127,"ppk":0.111,"lcl":-60.84,"ucl":81.24}}}},"WithoutIndexField":{"summary":"Set without an index field","value":{"viscosity_":{"count":180,"no-spec":40,"in-spec":119,"offspec-internal":16,"offspec-external":5,"avg":10.2,"stddev":23.68,"cp":0.765,"cpk":0.669,"pp":0.127,"ppk":0.111,"lcl":-60.84,"ucl":81.24}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"GetAllSetsResponse":{"description":"The output will be a JSON-encoded array. Each array element contains a JSON object.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The id of the analysis set or selection list (the `setId` used by the other operations).","example":1},"name":{"type":"string","description":"The name of the analysis set or selection list.","example":"Analysis Set 1"},"groupId":{"type":"integer","description":"The id of the group. `null` for selection lists.","nullable":true,"example":1},"groupName":{"type":"string","description":"The name of the group. For selection lists, this is `Selection lists`.","example":"Analysis Set Group 1"},"topLevelMenu":{"type":"string","description":"The name of the top-level menu.","example":"Top Level Menu"}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"GetResultsResponse":{"description":"A JSON array of result objects.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Result"}},"example":[{"date":"2001-02-03 14:15:16","numeric":123,"numerico":"<321","select":"option value","check":true,"@id":1234,"@lastModificationDate":"2001-02-05 08:30:00"},{"date":"2001-02-04 09:00:00","numeric":118.5,"numerico":45,"select":"other option value","check":false,"@id":1235,"@lastModificationDate":"2001-02-04 09:00:00"}]}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"NotModified":{"description":"Not Modified","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}},"Forbidden":{"description":"Forbidden: the user associated with the token lacks the required permission, or the request comes from an IP address that is not in the token's IP allow-list.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WWW-Authenticate"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"NoPermission":{"value":{"error":"No read permission for this set"}},"IpNotAllowed":{"value":{"error":"Invalid IP address"}}}}}},"TooManyRequests":{"description":"Too Many Requests: the rate limit has been exceeded. Retry after the time in `X-RateLimit-Retry-After`.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"RateLimited":{"value":{"error":"You got rate limited, you are allowed to initiate 30 API requests every minute"}}}}}},"BadRequest":{"description":"Bad Request: a parameter is missing or invalid.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"InvalidParameter":{"value":{"error":"Invalid parameter: sort field 'batchnr'. No such field in set."}},"MissingParameter":{"value":{"error":"Missing parameter: setId"}}}}}},"Unauthorized":{"description":"Unauthorized: no token was provided, or the token is invalid.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WWW-Authenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"NoToken":{"value":{"error":"No authentication token provided"}},"InvalidToken":{"value":{"error":"Invalid authentication token"}}}}}},"PayloadTooLarge":{"description":"Payload Too Large: more than 1,000 results were sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"TooManyResults":{"value":{"error":"Invalid parameter: results. May not exceed 1000 results."}}}}}},"InternalServerError":{"description":"Internal Server Error: an unexpected error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"InternalError":{"value":{"error":"Internal error"}}}}}},"GetStatisticsResponse":{"description":"A JSON object with one property per requested field, keyed by field name. Each property is an object with the statistics of that field.\n\nIf the pseudo-field `@id` was requested, the `@id` property contains the number of results and the lowest and highest result id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statistics"},"example":{"ph_":{"count":10,"no-spec":0,"in-spec":7,"offspec-internal":0,"offspec-external":3,"min":8.46,"max":8.54,"sum":84.96,"avg":8.5,"stddev":0.02},"@id":{"count":10,"min":1001,"max":1010}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Retry-After":{"$ref":"#/components/headers/X-RateLimit-Retry-After"}}}},"headers":{"X-RateLimit-Limit":{"description":"The number of requests allowed per one-minute window for the tenant.","schema":{"type":"integer"},"example":30},"X-RateLimit-Remaining":{"description":"The number of requests left in the current window.","schema":{"type":"integer"},"example":29},"X-RateLimit-Retry-After":{"description":"The Unix timestamp (seconds since epoch) at which the current window resets. This is a point in time, not a number of seconds.","schema":{"type":"integer","format":"int64"},"example":1735689600},"Retry-After":{"description":"The same value as `X-RateLimit-Retry-After`: a Unix timestamp, not a number of seconds.","schema":{"type":"integer","format":"int64"},"example":1735689600},"WWW-Authenticate":{"description":"Bearer challenge (RFC 6750), e.g. `Bearer realm=\"production environment\", error=\"invalid_token\"`. The `error` attribute is `invalid_token` for an invalid token, `insufficient_scope` for `403` responses, and is left out when no token was provided.","schema":{"type":"string"}}},"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer"},"access_token":{"type":"apiKey","name":"access_token","in":"query"}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true,"samples-enabled":true}}