From b9f1c22335c9c0d33db3722e8ccc2559e3e6d766 Mon Sep 17 00:00:00 2001 From: Barbara Czyz Date: Mon, 16 Sep 2024 06:59:31 +0200 Subject: [PATCH] Add extract metadata schema --- openapi.json | 2821 ++++++++++++++------------------------------------ 1 file changed, 791 insertions(+), 2030 deletions(-) diff --git a/openapi.json b/openapi.json index 74aff645..ca9c04f4 100644 --- a/openapi.json +++ b/openapi.json @@ -947,6 +947,94 @@ } } }, + "/files/{file_id}/app_item_associations": { + "get": { + "operationId": "get_files_id_app_item_associations", + "summary": "List file app item associations", + "description": "**This is a beta feature, which means that its availability might be limited.**\nReturns all app items the file is associated with. This includes app items\nassociated with ancestors of the file. Assuming the context user has access\nto the file, the type/ids are revealed even if the context user does not\nhave **View** permission on the app item.", + "tags": [ + "App item associations" + ], + "x-box-tag": "app_item_associations", + "parameters": [ + { + "name": "file_id", + "description": "The unique identifier that represents a file.\n\nThe ID for any file can be determined\nby visiting a file in the web application\nand copying the ID from the URL. For example,\nfor the URL `https://*.app.box.com/files/123`\nthe `file_id` is `123`.", + "example": "12345", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "description": "The maximum number of items to return per page.", + "in": "query", + "required": false, + "example": 1000, + "schema": { + "type": "integer", + "format": "int64", + "maximum": 1000 + } + }, + { + "name": "marker", + "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", + "in": "query", + "required": false, + "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", + "schema": { + "type": "string" + } + }, + { + "name": "application_type", + "description": "If given, only return app items for this application type", + "example": "hubs", + "in": "query", + "required": false, + "schema": { + "type": "string", + "nullable": false + } + } + ], + "responses": { + "200": { + "description": "Returns a collection of app item objects. If there are no\napp items on this file, an empty collection will be returned.\nThis list includes app items on ancestors of this File.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppItemAssociations" + } + } + } + }, + "404": { + "description": "Returned if the file is not found, or the user does not\nhave access to the file.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientError" + } + } + } + }, + "default": { + "description": "An unexpected client error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientError" + } + } + } + } + } + } + }, "/files/{file_id}/content": { "get": { "operationId": "get_files_id_content", @@ -5546,6 +5634,95 @@ } } }, + "/folders/{folder_id}/app_item_associations": { + "get": { + "operationId": "get_folders_id_app_item_associations", + "summary": "List folder app item associations", + "description": "**This is a beta feature, which means that its availability might be limited.**\nReturns all app items the folder is associated with. This includes app items\nassociated with ancestors of the folder. Assuming the context user has access\nto the folder, the type/ids are revealed even if the context user does not\nhave **View** permission on the app item.", + "tags": [ + "App item associations" + ], + "x-box-tag": "app_item_associations", + "parameters": [ + { + "name": "folder_id", + "description": "The unique identifier that represent a folder.\n\nThe ID for any folder can be determined\nby visiting this folder in the web application\nand copying the ID from the URL. For example,\nfor the URL `https://*.app.box.com/folder/123`\nthe `folder_id` is `123`.\n\nThe root folder of a Box account is\nalways represented by the ID `0`.", + "example": "12345", + "in": "path", + "required": true, + "schema": { + "type": "string", + "nullable": false + } + }, + { + "name": "limit", + "description": "The maximum number of items to return per page.", + "in": "query", + "required": false, + "example": 1000, + "schema": { + "type": "integer", + "format": "int64", + "maximum": 1000 + } + }, + { + "name": "marker", + "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", + "in": "query", + "required": false, + "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", + "schema": { + "type": "string" + } + }, + { + "name": "application_type", + "description": "If given, returns only app items for this application type", + "example": "hubs", + "in": "query", + "required": false, + "schema": { + "type": "string", + "nullable": false + } + } + ], + "responses": { + "200": { + "description": "Returns a collection of app item objects. If there are no\napp items on this folder an empty collection will be returned.\nThis list includes app items on ancestors of this folder.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppItemAssociations" + } + } + } + }, + "404": { + "description": "Returned if the folder is not found, or the user does not\nhave access to the folder.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientError" + } + } + } + }, + "default": { + "description": "An unexpected client error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientError" + } + } + } + } + } + } + }, "/folders/{folder_id}/items": { "get": { "operationId": "get_folders_id_items", @@ -6300,7 +6477,7 @@ "Classifications on folders" ], "x-box-tag": "folder_classifications", - "description": "Retrieves the classification metadata instance that\nhas been applied to a folder.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id//enterprise_12345/securityClassification-6VMVochwUWo`.", + "description": "Retrieves the classification metadata instance that\nhas been applied to a folder.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.", "parameters": [ { "name": "folder_id", @@ -6374,7 +6551,7 @@ "Classifications on folders" ], "x-box-tag": "folder_classifications", - "description": "Adds a classification to a folder by specifying the label of the\nclassification to add.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id//enterprise_12345/securityClassification-6VMVochwUWo`.", + "description": "Adds a classification to a folder by specifying the label of the\nclassification to add.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.", "parameters": [ { "name": "folder_id", @@ -6573,7 +6750,7 @@ "Classifications on folders" ], "x-box-tag": "folder_classifications", - "description": "Removes any classifications from a folder.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id//enterprise_12345/securityClassification-6VMVochwUWo`.", + "description": "Removes any classifications from a folder.\n\nThis API can also be called by including the enterprise ID in the\nURL explicitly, for example\n`/folders/:id/enterprise_12345/securityClassification-6VMVochwUWo`.", "parameters": [ { "name": "folder_id", @@ -9783,14 +9960,7 @@ } }, "204": { - "description": "If the role is changed to `owner`, the collaboration is deleted\nand a new collaboration is created. The previous `owner` of\nthe old collaboration will be a `co-owner` on the new collaboration.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Collaboration" - } - } - } + "description": "If the role is changed to `owner`, the collaboration is deleted\nand a new collaboration is created. The previous `owner` of\nthe old collaboration will be a `co-owner` on the new collaboration." }, "403": { "description": "Returns an error if the authenticated user does not have the right\npermissions to update the collaboration.\n\nAdditionally, this error may occur when attempting to update the\n`expires_at` field for the collaboration without the **Automatically\nremove invited collaborators: Allow folder owners to extend the expiry\ndate** setting enabled in the admin dashboard of the enterprise.", @@ -23869,7 +24039,7 @@ "/ai/ask": { "post": { "operationId": "post_ai_ask", - "summary": "Send AI question request", + "summary": "Ask question", "tags": [ "AI" ], @@ -23922,13 +24092,13 @@ "/ai/text_gen": { "post": { "operationId": "post_ai_text_gen", - "summary": "Send AI request to generate text", + "summary": "Generate text", "tags": [ "AI" ], "x-box-tag": "ai", "x-box-enable-explorer": false, - "description": "Sends an AI request to supported LLMs and returns an answer specifically focused on the creation of new text.", + "description": "Sends an AI request to supported Large Language Models (LLMs) and returns generated text based on the provided prompt.", "requestBody": { "content": { "application/json": { @@ -24022,7 +24192,7 @@ ], "responses": { "200": { - "description": "A successful response including the default agent configuration.\nThis response can be one of the following four objects:\nAI agent for questions, AI agent for text generation, AI agent\nfor freeform extract and AI agent for structured extract. The response\ndepends on the agent configuration requested in this endpoint.", + "description": "A successful response including the default agent configuration.\nThis response can be one of the following four objects:\n* AI agent for questions\n* AI agent for text generation\n* AI agent for freeform metadata extraction\n* AI agent for structured metadata extraction.\nThe response depends on the agent configuration requested in this endpoint.", "content": { "application/json": { "schema": { @@ -24067,59 +24237,38 @@ } } }, - "/docgen_templates": { + "/ai/extract": { "post": { - "operationId": "post_docgen_templates", - "summary": "Add file with docgen template", + "operationId": "post_ai_extract", + "summary": "Extract metadata (freeform)", "tags": [ - "Docgen Template" + "AI" ], - "x-box-tag": "docgen_template", - "description": "Creates a Docgen template", + "x-box-tag": "ai", + "x-box-enable-explorer": false, + "description": "Sends an AI request to supported Large Language Models (LLMs) and extracts metadata in form of key-value pairs.\nFreeform metadata extraction does not require any metadata template setup before sending the request.", "requestBody": { - "description": "Docgen entity object to be marked as Docgen template", - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DocgenTemplateCreateRequest" + "$ref": "#/components/schemas/AiExtract" } } } }, "responses": { - "201": { - "description": "The file which has now been marked as a Docgen template.", + "200": { + "description": "A response including the answer from the LLM.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DocgenTemplate--Base" + "$ref": "#/components/schemas/AiResponse" } } } }, "400": { - "description": "The server cannot or will not process the request due to an apparent client error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", + "description": "An unexpected client error.", "content": { "application/json": { "schema": { @@ -24128,8 +24277,8 @@ } } }, - "default": { - "description": "An unexpected condition was encountered on the server.", + "500": { + "description": "An unexpected server error.", "content": { "application/json": { "schema": { @@ -24139,52 +24288,40 @@ } } } - }, - "get": { - "operationId": "get_docgen_templates", - "summary": "List docgen templates", + } + }, + "/ai/extract_structured": { + "post": { + "operationId": "post_ai_extract_structured", + "summary": "Extract metadata (structured)", "tags": [ - "Docgen Template" + "AI" ], - "x-box-tag": "docgen_template", - "description": "Lists docgen templates created by a user.", - "parameters": [ - { - "name": "marker", - "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", - "in": "query", - "required": false, - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "description": "The maximum number of items to return per page.", - "in": "query", - "required": false, - "example": 1000, - "schema": { - "type": "integer", - "format": "int64", - "maximum": 1000 + "x-box-tag": "ai", + "x-box-enable-explorer": false, + "description": "Sends an AI request to supported Large Language Models (LLMs) and returns extracted metadata as a set of key-value pairs.\nFor this request, you need to use an already defined metadata template or a define a schema yourself.\nTo learn more about creating templates, see [Creating metadata templates in the Admin Console](https://support.box.com/hc/en-us/articles/360044194033-Customizing-Metadata-Templates)\nor use the [metadata template API](g://metadata/templates/create).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AiExtractStructured" + } } } - ], + }, "responses": { "200": { - "description": "Returns a collection of templates.", + "description": "A successful response including the answer from the LLM.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DocgenTemplates" + "$ref": "#/components/schemas/AiExtractResponse" } } } }, - "401": { - "description": "Returned when the access token provided in the `Authorization` header\nis not recognized or not provided.", + "400": { + "description": "An unexpected client error.", "content": { "application/json": { "schema": { @@ -24193,8 +24330,8 @@ } } }, - "default": { - "description": "An unexpected client error.", + "500": { + "description": "An unexpected server error.", "content": { "application/json": { "schema": { @@ -24205,956 +24342,168 @@ } } } - }, - "/docgen_templates/{template_id}": { - "delete": { - "operationId": "delete_docgen_templates_id", - "summary": "Delete file as docgen template", - "tags": [ - "Docgen Template" - ], - "x-box-tag": "docgen_template", - "description": "Unmarks file as Docgen template", - "parameters": [ - { - "name": "template_id", - "in": "path", - "description": "Id of file which will be unmarked as a docgen template", - "required": true, - "schema": { - "type": "string" - }, - "example": "123" + } + }, + "components": { + "securitySchemes": { + "OAuth2Security": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://account.box.com/api/oauth2/authorize", + "tokenUrl": "https://api.box.com/oauth2/token", + "scopes": { + "root_readonly": "Read all files and folders stored in Box", + "root_readwrite": "Read and write all files and folders stored in Box", + "manage_app_users": "Provision and manage app users", + "manage_managed_users": "Provision and manage managed users", + "manage_groups": "Manage an enterprise's groups", + "manage_webhook": "Create webhooks programmatically through the API", + "manage_enterprise_properties": "Manage enterprise properties", + "manage_data_retention": "Manage data retention polices", + "manage_legal_hold": "Manage Legal Holds" + } } + } + } + }, + "schemas": { + "AiAsk": { + "title": "AI ask request", + "type": "object", + "x-box-tag": "ai", + "required": [ + "prompt", + "items", + "mode" ], - "responses": { - "204": { - "description": "Returns an empty response when the docgen template has been deleted." + "properties": { + "mode": { + "type": "string", + "description": "The mode specifies if this request is for a single or multiple items. If you select `single_item_qa` the `items` array can have one element only. Selecting `multiple_item_qa` allows you to provide up to 25 items.", + "enum": [ + "multiple_item_qa", + "single_item_qa" + ], + "example": "multiple_item_qa", + "nullable": false }, - "400": { - "description": "The server cannot or will not process the request due to an apparent client error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } + "prompt": { + "type": "string", + "description": "The prompt provided by the client to be answered by the LLM. The prompt's length is limited to 10000 characters.", + "example": "What is the value provided by public APIs based on this document?" }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } + "items": { + "type": "array", + "description": "The items to be processed by the LLM, often files.\n\n**Note**: Box AI handles documents with text representations up to 1MB in size, or a maximum of 25 files, whichever comes first.\nIf the file size exceeds 1MB, the first 1MB of text representation will be processed.\nIf you set `mode` parameter to `single_item_qa`, the `items` array can have one element only. ", + "minItems": 1, + "maxItems": 25, + "uniqueItems": true, + "items": { + "$ref": "#/components/schemas/AiItem--Base" } }, - "404": { - "description": "Returned if the template is not found or the user does not\nhave access to the associated template.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } + "dialogue_history": { + "type": "array", + "description": "The history of prompts and answers previously passed to the LLM. This provides additional context to the LLM in generating the response.", + "items": { + "$ref": "#/components/schemas/AiDialogueHistory" } }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } + "include_citations": { + "type": "boolean", + "description": "A flag to indicate whether citations should be returned.", + "example": true }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } + "ai_agent": { + "$ref": "#/components/schemas/AiAgentAsk" } - } + }, + "description": "AI ask request object" }, - "get": { - "operationId": "get_docgen_templates_id", - "summary": "Get docgen template by id.", - "tags": [ - "Docgen Template" - ], - "x-box-tag": "docgen_template", - "description": "Lists details of a specific docgen template.", - "parameters": [ - { - "name": "template_id", - "description": "The ID of a docgen template.", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "example": 123 - } + "AiTextGen": { + "title": "AI text gen request", + "type": "object", + "x-box-tag": "ai", + "required": [ + "prompt", + "items" ], - "responses": { - "200": { - "description": "Returns details of a template.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenTemplate" - } - } - } + "properties": { + "prompt": { + "type": "string", + "description": "The prompt provided by the client to be answered by the LLM. The prompt's length is limited to 10000 characters.", + "example": "Write an email to a client about the importance of public APIs." }, - "401": { - "description": "Returned when the access token provided in the `Authorization` header\nis not recognized or not provided.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" + "items": { + "type": "array", + "description": "The items to be processed by the LLM, often files.\nThe array can include **exactly one** element.\n\n**Note**: Box AI handles documents with text representations up to 1MB in size.\nIf the file size exceeds 1MB, the first 1MB of text representation will be processed.", + "minItems": 1, + "maxItems": 1, + "uniqueItems": true, + "items": { + "required": [ + "id", + "type" + ], + "type": "object", + "description": "The item to be processed by the LLM.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the item.", + "example": "123" + }, + "type": { + "type": "string", + "description": "The type of the item.", + "enum": [ + "file" + ], + "example": "file" + }, + "content": { + "type": "string", + "description": "The content to use as context for generating new text or editing existing text.", + "example": "This is file content that is relevant to the text gen request." } } } }, - "404": { - "description": "Returned if the template is not found or the user does not\nhave access to the associated template.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } + "dialogue_history": { + "type": "array", + "description": "The history of prompts and answers previously passed to the LLM. This parameter provides the additional context to the LLM when generating the response.", + "items": { + "$ref": "#/components/schemas/AiDialogueHistory" } }, - "default": { - "description": "An unexpected client error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } + "ai_agent": { + "$ref": "#/components/schemas/AiAgentTextGen" } - } - } - }, - "/docgen_templates/{template_id}/tags": { - "get": { - "operationId": "get_docgen_templates_id_tags", - "summary": "List all docgen template tags in template.", - "tags": [ - "Docgen Template Tags" + }, + "description": "AI text gen request object" + }, + "AiExtractStructured": { + "title": "AI Extract Structured Request", + "type": "object", + "x-box-tag": "ai", + "required": [ + "items" ], - "x-box-tag": "docgen_tag", - "description": "List all tags in a document generation template.", - "parameters": [ - { - "name": "template_id", - "in": "path", - "required": true, - "description": "Id of template.", - "schema": { - "type": "string" - }, - "example": 123 - }, - { - "name": "template_version_id", - "in": "query", - "required": false, - "description": "Id of template version.", - "schema": { - "type": "string" - }, - "example": 123 - }, - { - "name": "marker", - "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", - "in": "query", - "required": false, - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "description": "The maximum number of items to return per page.", - "in": "query", - "required": false, - "example": 1000, - "schema": { - "type": "integer", - "format": "int64", - "maximum": 1000 - } - } - ], - "responses": { - "200": { - "description": "A list of document generation template tags.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenTags" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "404": { - "description": "The requested resource could not be found but may be available in the future.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/docgen_jobs/{job_id}": { - "get": { - "operationId": "get_docgen_jobs_id", - "summary": "Get docgen job by id", - "tags": [ - "Docgen" - ], - "x-box-tag": "docgen", - "description": "List status of job.", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "description": "Document generation job id.", - "schema": { - "type": "string" - }, - "example": 123 - } - ], - "responses": { - "200": { - "description": "Status of the document generation job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenJob" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "404": { - "description": "Returned if the job is not found or the user does not\nhave access to the associated job.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/docgen_jobs": { - "get": { - "operationId": "get_docgen_jobs", - "summary": "List all docgen jobs", - "tags": [ - "Docgen" - ], - "x-box-tag": "docgen", - "description": "List of all document generation jobs for a user.", - "parameters": [ - { - "name": "marker", - "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", - "in": "query", - "required": false, - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "description": "The maximum number of items to return per page.", - "in": "query", - "required": false, - "example": 1000, - "schema": { - "type": "integer", - "format": "int64", - "maximum": 1000 - } - } - ], - "responses": { - "200": { - "description": "A list of document generation jobs.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenJobs--Full" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/docgen_template_jobs/{template_id}": { - "get": { - "operationId": "get_docgen_template_jobs_id", - "summary": "Get list of all docgen jobs for template.", - "tags": [ - "Docgen Template" - ], - "x-box-tag": "docgen_template", - "description": "Lists details of a document generation template including associated jobs list for a user", - "parameters": [ - { - "name": "template_id", - "in": "path", - "description": "Id of template to fetch jobs for", - "required": true, - "schema": { - "type": "string" - }, - "example": 123 - }, - { - "name": "marker", - "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", - "in": "query", - "required": false, - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "description": "The maximum number of items to return per page.", - "in": "query", - "required": false, - "example": 1000, - "schema": { - "type": "integer", - "format": "int64", - "maximum": 1000 - } - } - ], - "responses": { - "200": { - "description": "A single document generation template.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenJobs" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "404": { - "description": "Returned if the template is not found or the user does not\nhave access to the associated template.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/docgen_batch_jobs/{batch_id}": { - "get": { - "operationId": "get_docgen_batch_jobs_id", - "summary": "Get docgen jobs for batch id", - "tags": [ - "Docgen" - ], - "x-box-tag": "docgen", - "description": "List docgen jobs in a batch", - "parameters": [ - { - "name": "batch_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "Document generation batch id.", - "example": 123 - }, - { - "name": "marker", - "description": "Defines the position marker at which to begin returning results. This is\nused when paginating using marker-based pagination.\n\nThis requires `usemarker` to be set to `true`.", - "in": "query", - "required": false, - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "description": "The maximum number of items to return per page.", - "in": "query", - "required": false, - "example": 1000, - "schema": { - "type": "integer", - "format": "int64", - "maximum": 1000 - } - } - ], - "responses": { - "200": { - "description": "List of docgen jobs in to a docgen batch", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenJobs" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "404": { - "description": "Returned if the batch is not found or the user does not\nhave access to the associated batch.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/docgen_batches": { - "post": { - "operationId": "post_docgen_batches", - "summary": "Create document using template", - "tags": [ - "Docgen" - ], - "x-box-tag": "docgen", - "description": "API to submit document generation jobs.", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenBatchCreateRequest" - } - } - } - }, - "responses": { - "202": { - "description": "The created Batch ID.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DocgenBatch--Base" - } - } - } - }, - "403": { - "description": "The client does not have access rights to the content or resource requested.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "429": { - "description": "The user has sent too many requests in a given amount of time.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "default": { - "description": "An unexpected condition was encountered on the server.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/ai/extract": { - "post": { - "operationId": "post_ai_extract", - "summary": "Send AI Extract request", - "tags": [ - "AI" - ], - "x-box-tag": "ai", - "x-box-enable-explorer": false, - "description": "Sends an AI request to supported LLMs and returns an answer specifically focused returning key-value pairs.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiExtract" - } - } - } - }, - "responses": { - "200": { - "description": "A successful response including the answer from the LLM.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiResponse" - } - } - } - }, - "400": { - "description": "An unexpected client error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "500": { - "description": "An unexpected server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - }, - "/ai/extract_structured": { - "post": { - "operationId": "post_ai_extract_structured", - "summary": "Send AI Extract Structured request", - "tags": [ - "AI" - ], - "x-box-tag": "ai", - "x-box-enable-explorer": false, - "description": "Sends an AI request to supported LLMs and returns extracted key pairs and values.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiExtractStructured" - } - } - } - }, - "responses": { - "200": { - "description": "A successful response including the answer from the LLM.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiExtractResponse" - } - } - } - }, - "400": { - "description": "An unexpected client error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - }, - "500": { - "description": "An unexpected server error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientError" - } - } - } - } - } - } - } - }, - "components": { - "securitySchemes": { - "OAuth2Security": { - "type": "oauth2", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://account.box.com/api/oauth2/authorize", - "tokenUrl": "https://api.box.com/oauth2/token", - "scopes": { - "root_readonly": "Read all files and folders stored in Box", - "root_readwrite": "Read and write all files and folders stored in Box", - "manage_app_users": "Provision and manage app users", - "manage_managed_users": "Provision and manage managed users", - "manage_groups": "Manage an enterprise's groups", - "manage_webhook": "Create webhooks programmatically through the API", - "manage_enterprise_properties": "Manage enterprise properties", - "manage_data_retention": "Manage data retention polices", - "manage_legal_hold": "Manage Legal Holds" - } - } - } - } - }, - "schemas": { - "AiAsk": { - "title": "AI ask request", - "type": "object", - "x-box-tag": "ai", - "required": [ - "prompt", - "items", - "mode" - ], - "properties": { - "mode": { - "type": "string", - "description": "The mode specifies if this request is for a single or multiple items. If you select `single_item_qa` the `items` array can have one element only. Selecting `multiple_item_qa` allows you to provide up to 25 items.", - "enum": [ - "multiple_item_qa", - "single_item_qa" - ], - "example": "multiple_item_qa", - "nullable": false - }, - "prompt": { - "type": "string", - "description": "The prompt provided by the client to be answered by the LLM. The prompt's length is limited to 10000 characters.", - "example": "What is the value provided by public APIs based on this document?" - }, - "items": { - "type": "array", - "description": "The items to be processed by the LLM, often files.\n\n**Note**: Box AI handles documents with text representations up to 1MB in size, or a maximum of 25 files, whichever comes first.\nIf the file size exceeds 1MB, the first 1MB of text representation will be processed.\nIf you set `mode` parameter to `single_item_qa`, the `items` array can have one element only. ", - "minItems": 1, - "maxItems": 25, - "uniqueItems": true, - "items": { - "type": "object", - "description": "The item to be processed by the LLM.", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string", - "description": "The id of the item.", - "example": "123" - }, - "type": { - "type": "string", - "description": "The type of the item.", - "enum": [ - "file" - ], - "example": "file" - }, - "content": { - "type": "string", - "description": "The content of the item, often the text representation.", - "example": "This is file content." - } - } - } - }, - "dialogue_history": { - "type": "array", - "description": "The history of prompts and answers previously passed to the LLM. This provides additional context to the LLM in generating the response.", - "items": { - "$ref": "#/components/schemas/AiDialogueHistory" - } - }, - "include_citations": { - "type": "boolean", - "description": "A flag to indicate whether citations should be returned.", - "example": true - }, - "ai_agent": { - "$ref": "#/components/schemas/AiAgentAsk" - } - }, - "description": "AI ask request object" - }, - "AiTextGen": { - "title": "AI text gen request", - "type": "object", - "x-box-tag": "ai", - "required": [ - "prompt", - "items" - ], - "properties": { - "prompt": { - "type": "string", - "description": "The prompt provided by the client to be answered by the LLM. The prompt's length is limited to 10000 characters.", - "example": "Write an email to a client about the importance of public APIs." - }, - "items": { - "type": "array", - "description": "The items to be processed by the LLM, often files.\nThe array can include **exactly one** element.\n\n**Note**: Box AI handles documents with text representations up to 1MB in size.\nIf the file size exceeds 1MB, the first 1MB of text representation will be processed.", - "required": [ - "id", - "type" - ], - "minItems": 1, - "maxItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "description": "The item to be processed by the LLM.", - "properties": { - "id": { - "type": "string", - "description": "The id of the item.", - "example": "123" - }, - "type": { - "type": "string", - "description": "The type of the item.", - "enum": [ - "file" - ], - "example": "file" - }, - "content": { - "type": "string", - "description": "The content to use as context for generating new text or editing existing text.", - "example": "This is file content that is relevant to the text gen request." - } - } - } - }, - "dialogue_history": { - "type": "array", - "description": "The history of prompts and answers previously passed to the LLM. This provides additional context to the LLM in generating the response.", - "items": { - "$ref": "#/components/schemas/AiDialogueHistory" - } - }, - "ai_agent": { - "$ref": "#/components/schemas/AiAgentTextGen" - } - }, - "description": "AI text gen request object" - }, - "AiExtractStructured": { - "title": "AI Extract Structured Request", - "type": "object", - "x-box-tag": "ai", - "required": [ - "items" - ], - "properties": { - "items": { - "type": "array", - "description": "The items to be processed by the LLM, often files.", - "minItems": 1, - "maxItems": 1, - "uniqueItems": true, - "items": { - "$ref": "#/components/schemas/AiItem--Base" + "properties": { + "items": { + "type": "array", + "description": "The items to be processed by the LLM. Currently you can use files only.", + "minItems": 1, + "maxItems": 1, + "uniqueItems": true, + "items": { + "$ref": "#/components/schemas/AiItem--Base" } }, "metadata_template": { "type": "object", - "description": "The metadata template containing the fields to extract. Cannot be used\nin combination with `fields`.", + "description": "The metadata template containing the fields to extract.\nFor your request to work, you must provide either `metadata_template` or `fields`, but not both.", "properties": { "template_key": { "type": "string", @@ -25171,19 +24520,20 @@ }, "scope": { "type": "string", - "description": "The scope of the metadata template can either be global or\nenterprise_*. The global scope is used for templates that are\navailable to any Box enterprise. The enterprise_* scope represents\ntemplates that have been created within a specific enterprise,\nwhere * will be the ID of that enterprise.", - "example": "enterprise_12345" + "description": "The scope of the metadata template that can either be global or\nenterprise. \n* The **global** scope is used for templates that are\navailable to any Box enterprise. \n* The **enterprise** scope represents templates created within a specific enterprise,\n containing the ID of that enterprise.", + "example": "enterprise_12345", + "maxLength": 40 } } }, "fields": { "type": "array", - "description": "The fields to be extracted from the items. Cannot be used in combination\nwith `metadata_template`.", + "description": "The fields to be extracted from the provided items.\nFor your request to work, you must provide either `metadata_template` or `fields`, but not both.", "minItems": 1, "uniqueItems": true, "items": { "type": "object", - "description": "The field to be extracted from the items.", + "description": "The fields to be extracted from the provided items.", "required": [ "key" ], @@ -25205,12 +24555,12 @@ }, "prompt": { "type": "string", - "description": "Context about the key that may include how to find and how to format it.", + "description": "The context about the key that may include how to find and format it.", "example": "Name is the first and last name from the email address" }, "type": { "type": "string", - "description": "The type of the field. Can include but is not limited to string, float, date, enum, and multiSelect.", + "description": "The type of the field. It include but is not limited to string, float, date, enum, and multiSelect.", "example": "enum" }, "options": { @@ -25248,7 +24598,7 @@ "description": "AI Extract Structured Request object." }, "AiExtract": { - "title": "AI Extract Request", + "title": "AI metadata freeform extraction request", "type": "object", "x-box-tag": "ai", "required": [ @@ -25258,12 +24608,12 @@ "properties": { "prompt": { "type": "string", - "description": "The prompt provided by the client to be answered by the LLM that can \ninclude the JSON schema of the expected response.", + "description": "The prompt provided to a Large Language Model (LLM) in the request. The prompt can be up to 10000 characters long and it can be an XML or a JSON schema.", "example": "\\\"fields\\\":[{\\\"type\\\":\\\"string\\\",\\\"key\\\":\\\"name\\\",\\\"displayName\\\":\\\"Name\\\",\\\"description\\\":\\\"The customer name\\\",\\\"prompt\\\":\\\"Name is always the first word in the document\\\"},{\\\"type\\\":\\\"date\\\",\\\"key\\\":\\\"last_contacted_at\\\",\\\"displayName\\\":\\\"Last Contacted At\\\",\\\"description\\\":\\\"When this customer was last contacted at\\\"}]" }, "items": { "type": "array", - "description": "The items to be processed by the LLM, often files.", + "description": "The items that LLM will process. Currently, you can use files only.", "minItems": 1, "maxItems": 1, "uniqueItems": true, @@ -25275,7 +24625,7 @@ "$ref": "#/components/schemas/AiAgentExtract" } }, - "description": "AI Extract request object." + "description": "AI metadata freeform extraction request object" }, "PostOAuth2Token": { "title": "Token request", @@ -25384,240 +24734,72 @@ "box_shared_link": { "type": "string", "format": "url", - "description": "Full URL of the shared link on the file or folder\nthat the token should be generated for.", - "example": "https://cloud.box.com/s/123456" - } - } - }, - "PostOAuth2Token--RefreshAccessToken": { - "title": "Refresh access token", - "type": "object", - "description": "A request to refresh an Access Token. Use this API to refresh an expired\nAccess Token using a valid Refresh Token.", - "required": [ - "grant_type", - "client_id", - "client_secret", - "refresh_token" - ], - "properties": { - "grant_type": { - "type": "string", - "format": "urn", - "example": "refresh_token", - "description": "The type of request being made, in this case a refresh request.", - "enum": [ - "refresh_token" - ] - }, - "client_id": { - "type": "string", - "description": "The client ID of the application requesting to refresh the token.", - "example": "ly1nj6n11vionaie65emwzk575hnnmrk" - }, - "client_secret": { - "type": "string", - "description": "The client secret of the application requesting to refresh the token.", - "example": "hOzsTeFlT6ko0dme22uGbQal04SBPYc1" - }, - "refresh_token": { - "type": "string", - "format": "token", - "description": "The refresh token to refresh.", - "example": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ" - } - } - }, - "PostOAuth2Revoke": { - "title": "Token revocation request", - "type": "object", - "description": "A request to revoke an OAuth 2.0 token", - "required": [ - "grant_type" - ], - "properties": { - "client_id": { - "type": "string", - "description": "The Client ID of the application requesting to revoke the\naccess token.", - "example": "ly1nj6n11vionaie65emwzk575hnnmrk" - }, - "client_secret": { - "type": "string", - "description": "The client secret of the application requesting to revoke\nan access token.", - "example": "hOzsTeFlT6ko0dme22uGbQal04SBPYc1" - }, - "token": { - "type": "string", - "format": "token", - "description": "The access token to revoke.", - "example": "n22JPxrh18m4Y0wIZPIqYZK7VRrsMTWW" - } - } - }, - "DocgenTemplateCreateRequest": { - "title": "Marking file as Docgen Template", - "type": "object", - "description": "The schema for marking document as Docgen Template.", - "required": [ - "file" - ], - "properties": { - "file": { - "allOf": [ - { - "title": "File reference", - "type": "object", - "description": "File reference", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "description": "`file`", - "example": "file", - "enum": [ - "file" - ], - "nullable": false - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - { - "description": "Enable the file to create a docgen document from." - } - ] - } - } - }, - "DocgenBatchCreateRequest": { - "title": "Create batch request", - "type": "object", - "description": "The schema for Docgen Document Generation post job request.", - "required": [ - "file", - "input_source", - "destination_folder", - "output_type", - "document_generation_data" - ], - "properties": { - "file": { - "allOf": [ - { - "title": "File reference", - "type": "object", - "description": "File reference", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "description": "`file`", - "example": "file", - "enum": [ - "file" - ], - "nullable": false - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - { - "description": "Template file." - } - ] - }, - "file_version": { - "allOf": [ - { - "$ref": "#/components/schemas/FileVersion--Base" - }, - { - "description": "File version of a template." - } - ] - }, - "input_source": { - "type": "string", - "description": "source of input.", - "example": "api" - }, - "destination_folder": { - "allOf": [ - { - "title": "Folder reference", - "type": "object", - "description": "Folder reference", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "description": "`folder`", - "example": "folder", - "enum": [ - "folder" - ], - "nullable": false - }, - "id": { - "description": "ID of the folder", - "type": "string", - "example": "42037322" - } - } - }, - { - "description": "Destination folder for generated files." - } + "description": "Full URL of the shared link on the file or folder\nthat the token should be generated for.", + "example": "https://cloud.box.com/s/123456" + } + } + }, + "PostOAuth2Token--RefreshAccessToken": { + "title": "Refresh access token", + "type": "object", + "description": "A request to refresh an Access Token. Use this API to refresh an expired\nAccess Token using a valid Refresh Token.", + "required": [ + "grant_type", + "client_id", + "client_secret", + "refresh_token" + ], + "properties": { + "grant_type": { + "type": "string", + "format": "urn", + "example": "refresh_token", + "description": "The type of request being made, in this case a refresh request.", + "enum": [ + "refresh_token" ] }, - "output_type": { + "client_id": { "type": "string", - "description": "Type of the output file.", - "example": "docx" + "description": "The client ID of the application requesting to refresh the token.", + "example": "ly1nj6n11vionaie65emwzk575hnnmrk" }, - "document_generation_data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DocgenDocumentGenerationData" - } + "client_secret": { + "type": "string", + "description": "The client secret of the application requesting to refresh the token.", + "example": "hOzsTeFlT6ko0dme22uGbQal04SBPYc1" + }, + "refresh_token": { + "type": "string", + "format": "token", + "description": "The refresh token to refresh.", + "example": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ" } } }, - "DocgenDocumentGenerationData": { - "title": "Document generation data", + "PostOAuth2Revoke": { + "title": "Token revocation request", "type": "object", - "description": "The schema for Docgen Document Generation post job request.", + "description": "A request to revoke an OAuth 2.0 token", "required": [ - "generated_file_name", - "user_input" + "grant_type" ], "properties": { - "generated_file_name": { + "client_id": { "type": "string", - "example": "New_Template", - "description": "File name of the output file" + "description": "The Client ID of the application requesting to revoke the\naccess token.", + "example": "ly1nj6n11vionaie65emwzk575hnnmrk" }, - "user_input": { - "type": "object", - "example": { - "name": "Aaron Levie" - } + "client_secret": { + "type": "string", + "description": "The client secret of the application requesting to revoke\nan access token.", + "example": "hOzsTeFlT6ko0dme22uGbQal04SBPYc1" + }, + "token": { + "type": "string", + "format": "token", + "description": "The access token to revoke.", + "example": "n22JPxrh18m4Y0wIZPIqYZK7VRrsMTWW" } } }, @@ -25892,39 +25074,50 @@ ] }, "IntegrationMappingSlackCreateRequest": { - "title": "Create integration mapping request", + "title": "Create Slack integration mapping request", "type": "object", "x-box-resource-id": "integration_mapping_slack_create_request", "description": "A request to create a\nSlack Integration Mapping object", - "properties": { - "partner_item": { - "allOf": [ - { - "$ref": "#/components/schemas/IntegrationMappingPartnerItemSlack" - } - ], - "nullable": false - }, - "box_item": { - "allOf": [ - { - "$ref": "#/components/schemas/IntegrationMappingBoxItemSlack" + "allOf": [ + { + "properties": { + "partner_item": { + "allOf": [ + { + "$ref": "#/components/schemas/IntegrationMappingPartnerItemSlack" + } + ], + "nullable": false } - ], - "nullable": false + } }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/IntegrationMappingSlackOptions" + { + "type": "object", + "properties": { + "box_item": { + "allOf": [ + { + "$ref": "#/components/schemas/IntegrationMappingBoxItemSlack" + } + ], + "nullable": false + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/IntegrationMappingSlackOptions" + } + ], + "nullable": false } - ], - "nullable": false + }, + "required": [ + "box_item" + ] } - }, + ], "required": [ - "partner_item", - "box_item" + "partner_item" ] }, "ClientError": { @@ -26402,567 +25595,6 @@ } } }, - "DocgenBatch--Base": { - "title": "Docgen Batch (Base)", - "type": "object", - "x-box-resource-id": "docgen_batch--base", - "x-box-tag": "files", - "x-box-variants": [ - "base", - "standard" - ], - "x-box-variant": "base", - "description": "The bare basic representation of a docgen batch", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string", - "nullable": false, - "description": "The unique identifier that represent a batch.", - "example": "12345" - }, - "type": { - "type": "string", - "description": "`docgen_batch`", - "example": "docgen_batch", - "enum": [ - "docgen_batch" - ], - "nullable": false - } - } - }, - "DocgenJob": { - "title": "Document generation batch job details", - "type": "object", - "description": "The schema is used in get Document Generation Batch jobs", - "x-box-resource-id": "docgen_job", - "x-box-tag": "docgen", - "required": [ - "id", - "batch", - "template_file", - "template_file_version", - "status", - "output_type" - ], - "allOf": [ - { - "$ref": "#/components/schemas/DocgenJob--Base" - }, - { - "properties": { - "batch": { - "allOf": [ - { - "$ref": "#/components/schemas/DocgenBatch--Base" - }, - { - "description": "Docgen Batch that job belongs to." - } - ] - }, - "template_file": { - "allOf": [ - { - "title": "File reference", - "type": "object", - "description": "File reference", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "description": "`file`", - "example": "file", - "enum": [ - "file" - ], - "nullable": false - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - { - "description": "Docgen template used in the job." - } - ] - }, - "template_file_version": { - "allOf": [ - { - "$ref": "#/components/schemas/FileVersion--Base" - }, - { - "description": "File version of a template." - } - ] - }, - "output_file": { - "nullable": true, - "description": "The output file of the job.", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "`file`", - "example": "file", - "enum": [ - "file" - ] - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - "output_file_version": { - "nullable": true, - "description": "File version of generated file.", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "`file_version`", - "example": "file_version", - "enum": [ - "file_version" - ] - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - "status": { - "type": "string", - "description": "Status of the job.", - "enum": [ - "submitted", - "completed", - "failed", - "completed_with_error", - "pending" - ], - "example": "completed" - }, - "output_type": { - "type": "string", - "description": "Type of the generated file.", - "example": "docx" - } - } - } - ] - }, - "DocgenJob--Base": { - "title": "Docgen Job (Base)", - "type": "object", - "x-box-resource-id": "docgen_job--base", - "x-box-tag": "docgen", - "x-box-variants": [ - "base", - "standard", - "full" - ], - "x-box-variant": "base", - "description": "The bare basic representation of a docgen job", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string", - "nullable": false, - "description": "The unique identifier that represent a docgen job.", - "example": "12345" - }, - "type": { - "type": "string", - "description": "`docgen_job`", - "example": "docgen_job", - "enum": [ - "docgen_job" - ], - "nullable": false - } - } - }, - "DocgenJob--Full": { - "title": "Docgen Job (Full)", - "description": "The schema is to get a job", - "type": "object", - "x-box-resource-id": "docgen_job--full", - "x-box-tag": "docgen", - "required": [ - "id", - "batch", - "created_by", - "enterprise", - "template_file", - "template_file_version", - "output_type", - "source", - "user_input", - "status" - ], - "allOf": [ - { - "$ref": "#/components/schemas/DocgenJob" - }, - { - "properties": { - "created_at": { - "type": "string", - "readOnly": true, - "description": "Time of creation.", - "example": "2022-05-11T10:56:11-07:00" - }, - "created_by": { - "allOf": [ - { - "$ref": "#/components/schemas/User--Base" - }, - { - "description": "User who created the job" - } - ] - }, - "enterprise": { - "allOf": [ - { - "$ref": "#/components/schemas/Enterprise--Base" - }, - { - "description": "Id of enterprise" - } - ] - }, - "source": { - "type": "string", - "readOnly": true, - "description": "Source of the request.", - "example": "api" - }, - "user_input": { - "type": "object", - "description": "User details to fill tags.", - "readOnly": true, - "example": { - "name": "Aaron Levie" - } - } - } - } - ] - }, - "DocgenJobs": { - "title": "Docgen jobs", - "type": "object", - "description": "The schema for a list of jobs, used for get template jobs and get batch jobs", - "x-box-tag": "docgen", - "x-box-resource-id": "docgen_jobs", - "allOf": [ - { - "type": "object", - "description": "The part of an API response that describes marker\nbased pagination", - "properties": { - "limit": { - "description": "The limit that was used for these entries. This will be the same as the\n`limit` query parameter unless that value exceeded the maximum value\nallowed. The maximum value varies by API.", - "example": 1000, - "type": "integer", - "format": "int64" - }, - "next_marker": { - "description": "The marker for the start of the next page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "type": "string", - "nullable": true - }, - "prev_marker": { - "description": "The marker for the start of the previous page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih", - "type": "string", - "nullable": true - } - } - }, - { - "properties": { - "entries": { - "type": "array", - "description": "List of jobs.", - "items": { - "$ref": "#/components/schemas/DocgenJob" - } - } - } - } - ] - }, - "DocgenJobs--Full": { - "title": "Docgen jobs", - "type": "object", - "description": "The schema is for a more details list of jobs used for get Jobs for user", - "x-box-tag": "docgen", - "x-box-resource-id": "docgen_jobs--full", - "allOf": [ - { - "type": "object", - "description": "The part of an API response that describes marker\nbased pagination", - "properties": { - "limit": { - "description": "The limit that was used for these entries. This will be the same as the\n`limit` query parameter unless that value exceeded the maximum value\nallowed. The maximum value varies by API.", - "example": 1000, - "type": "integer", - "format": "int64" - }, - "next_marker": { - "description": "The marker for the start of the next page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "type": "string", - "nullable": true - }, - "prev_marker": { - "description": "The marker for the start of the previous page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih", - "type": "string", - "nullable": true - } - } - }, - { - "properties": { - "entries": { - "type": "array", - "description": "List of jobs.", - "items": { - "$ref": "#/components/schemas/DocgenJob--Full" - } - } - } - } - ] - }, - "DocgenTemplate--Base": { - "title": "Docgen Template (Base)", - "type": "object", - "x-box-resource-id": "docgen_template--base", - "x-box-variants": [ - "base", - "standard" - ], - "x-box-variant": "base", - "description": "A base representation of a docgen template, used when\nnested within another resource.", - "properties": { - "file": { - "allOf": [ - { - "title": "File reference", - "type": "object", - "description": "File reference", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "description": "`file`", - "example": "file", - "enum": [ - "file" - ], - "nullable": false - }, - "id": { - "description": "ID of the object", - "type": "string", - "example": "42037322" - } - } - }, - { - "description": "Enable the file to generate a document from." - } - ] - } - } - }, - "DocgenTemplate": { - "title": "Docgen template", - "type": "object", - "description": "A docgen template object", - "x-box-tag": "docgen", - "x-box-resource-id": "docgen_template", - "x-box-variant": "standard", - "allOf": [ - { - "$ref": "#/components/schemas/DocgenTemplate--Base" - }, - { - "properties": { - "file_name": { - "type": "string", - "nullable": true, - "example": "Official contract", - "description": "The name of the template" - } - } - } - ] - }, - "DocgenTemplates": { - "title": "Docgen templates", - "type": "object", - "description": "List of docgen templates.", - "x-box-tag": "docgen", - "x-box-resource-id": "docgen_templates", - "allOf": [ - { - "type": "object", - "description": "The part of an API response that describes marker\nbased pagination", - "properties": { - "limit": { - "description": "The limit that was used for these entries. This will be the same as the\n`limit` query parameter unless that value exceeded the maximum value\nallowed. The maximum value varies by API.", - "example": 1000, - "type": "integer", - "format": "int64" - }, - "next_marker": { - "description": "The marker for the start of the next page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "type": "string", - "nullable": true - }, - "prev_marker": { - "description": "The marker for the start of the previous page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih", - "type": "string", - "nullable": true - } - } - }, - { - "properties": { - "entries": { - "type": "array", - "description": "A list of templates.", - "items": { - "$ref": "#/components/schemas/DocgenTemplate" - } - } - } - } - ] - }, - "DocgenTags": { - "title": "Docgen Tags", - "type": "object", - "description": "The schema for a list of tags, used for get template tags", - "x-box-tag": "docgen_tag", - "x-box-resource-id": "docgen_tags", - "allOf": [ - { - "type": "object", - "description": "The part of an API response that describes marker\nbased pagination", - "properties": { - "limit": { - "description": "The limit that was used for these entries. This will be the same as the\n`limit` query parameter unless that value exceeded the maximum value\nallowed. The maximum value varies by API.", - "example": 1000, - "type": "integer", - "format": "int64" - }, - "next_marker": { - "description": "The marker for the start of the next page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", - "type": "string", - "nullable": true - }, - "prev_marker": { - "description": "The marker for the start of the previous page of results.", - "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih", - "type": "string", - "nullable": true - } - } - }, - { - "properties": { - "entries": { - "type": "array", - "description": "List of tags.", - "items": { - "$ref": "#/components/schemas/DocgenTag" - } - } - } - } - ] - }, - "DocgenTag": { - "title": "Document template tag details", - "type": "object", - "description": "The schema is used in get Document Template Tags", - "x-box-resource-id": "docgen_tag", - "x-box-sanitized": true, - "x-box-tag": "docgen", - "required": [ - "tag_content", - "tag_type", - "json_paths" - ], - "properties": { - "tag_content": { - "readOnly": true, - "description": "The content of the tag.", - "type": "string", - "example": "{{item.name}}" - }, - "tag_type": { - "readOnly": true, - "description": "Type of the tag.", - "type": "string", - "example": "text", - "enum": [ - "text", - "arithmetic", - "conditional", - "for-loop", - "table-loop", - "image" - ] - }, - "json_paths": { - "readOnly": true, - "type": "array", - "example": [ - "products", - "products.name" - ], - "description": "List of the paths.", - "items": { - "readOnly": true, - "type": "string", - "example": "products.name" - } - } - } - }, "AccessToken": { "title": "Access token", "type": "object", @@ -27109,13 +25741,13 @@ "$ref": "#/components/schemas/AiAgentLongTextTool" }, "basic_text": { - "$ref": "#/components/schemas/AiAgentBasicTextToolAsk" + "$ref": "#/components/schemas/AiAgentBasicTextTool" }, "long_text_multi": { "$ref": "#/components/schemas/AiAgentLongTextTool" }, "basic_text_multi": { - "$ref": "#/components/schemas/AiAgentBasicTextToolAsk" + "$ref": "#/components/schemas/AiAgentBasicTextTool" } }, "description": "The AI agent used to handle queries." @@ -27166,10 +25798,10 @@ "$ref": "#/components/schemas/AiAgentLongTextTool" }, "basic_text": { - "$ref": "#/components/schemas/AiAgentBasicTextToolExtract" + "$ref": "#/components/schemas/AiAgentBasicTextTool" } }, - "description": "The AI Agent to be used for extraction." + "description": "The AI agent to be used for extraction." }, "AiAgentExtractStructured": { "title": "AI agent for structured extract request", @@ -27193,10 +25825,147 @@ "$ref": "#/components/schemas/AiAgentLongTextTool" }, "basic_text": { - "$ref": "#/components/schemas/AiAgentBasicTextToolExtract" + "$ref": "#/components/schemas/AiAgentBasicTextTool" } }, - "description": "The AI Agent to be used for structured extraction." + "description": "The AI agent to be used for structured extraction." + }, + "AppItem": { + "title": "App item", + "type": "object", + "x-box-tag": "app_item_associations", + "x-box-resource-id": "app_item_associations", + "description": "An app item represents an content object owned by an application. It can\ngroup files and folders together from different paths. That set can be shared\nvia a collaboration.", + "required": [ + "id", + "type", + "application_type" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for this app item.", + "example": "12345678" + }, + "type": { + "type": "string", + "description": "`app_item`", + "example": "app_item", + "enum": [ + "app_item" + ] + }, + "application_type": { + "type": "string", + "description": "The type of the app that owns this app item.", + "example": "hubs" + } + } + }, + "AppItemAssociation": { + "title": "App item association", + "type": "object", + "x-box-tag": "app_item_associations", + "x-box-resource-id": "app_item_association", + "description": "An app item association represents an association between a file or\nfolder and an app item. Associations between a folder and an app item\ncascade down to all descendants of the folder.", + "required": [ + "id", + "type", + "app_item", + "item" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for this app item association.", + "example": "12345678", + "nullable": false + }, + "type": { + "type": "string", + "description": "`app_item_association`", + "example": "app_item_association", + "enum": [ + "app_item_association" + ], + "nullable": false + }, + "app_item": { + "allOf": [ + { + "$ref": "#/components/schemas/AppItem" + }, + { + "description": "The app item which is associated with the file or folder." + } + ], + "nullable": false + }, + "item": { + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/File--Base" + }, + { + "$ref": "#/components/schemas/Folder--Base" + }, + { + "$ref": "#/components/schemas/WebLink--Base" + } + ] + }, + { + "description": "The file or folder which is associated with the app item." + } + ], + "nullable": false + } + } + }, + "AppItemAssociations": { + "title": "App item associations", + "type": "object", + "x-box-tag": "app_item_associations", + "x-box-resource-id": "app_item_associations", + "description": "A list of app item associations", + "allOf": [ + { + "type": "object", + "description": "The part of an API response that describes marker\nbased pagination", + "properties": { + "limit": { + "description": "The limit that was used for these entries. This will be the same as the\n`limit` query parameter unless that value exceeded the maximum value\nallowed. The maximum value varies by API.", + "example": 1000, + "type": "integer", + "format": "int64" + }, + "next_marker": { + "description": "The marker for the start of the next page of results.", + "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii", + "type": "string", + "nullable": true + }, + "prev_marker": { + "description": "The marker for the start of the previous page of results.", + "example": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih", + "type": "string", + "nullable": true + } + } + }, + { + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppItemAssociation" + } + } + } + } + ] }, "Classification": { "title": "Classification", @@ -27453,7 +26222,18 @@ ] }, { - "description": "The file or folder to which access is granted. The field is\n`null` when the collaboration `status` is `pending`." + "description": "The file or folder to which access is granted. The field is\n`null` when the collaboration `status` is `pending` or the\ncollaboration is created on an app item (see `app_item` field)." + } + ], + "nullable": true + }, + "app_item": { + "allOf": [ + { + "$ref": "#/components/schemas/AppItem" + }, + { + "description": "An `app_item` to which access is granted. The field is `null`\nwhen the collaboration is created on an item (see `item`\nfield), or the `app_item` is inaccessible. The role cascades\nto all items associated with the `app_item`." } ], "nullable": true @@ -29428,7 +28208,7 @@ } }, "additionalProperties": { - "$ref": "#/components/schemas/Metadata" + "$ref": "#/components/schemas/Metadata--Full" } } }, @@ -29598,6 +28378,12 @@ "can_edit" ] } + }, + "is_associated_with_app_item": { + "type": "boolean", + "example": true, + "nullable": false, + "description": "This field will return true if the file or any ancestor of the file\nis associated with at least one app item. Note that this will return\ntrue even if the context user does not have access to the app item(s)\nassociated with the file." } } } @@ -30946,7 +29732,7 @@ } }, "additionalProperties": { - "$ref": "#/components/schemas/Metadata" + "$ref": "#/components/schemas/Metadata--Full" } } }, @@ -31069,6 +29855,12 @@ "nullable": true } ] + }, + "is_associated_with_app_item": { + "type": "boolean", + "example": true, + "nullable": false, + "description": "This field will return true if the folder or any ancestor of the\nfolder is associated with at least one app item. Note that this will\nreturn true even if the context user does not have access to the\napp item(s) associated with the folder." } } } @@ -31264,26 +30056,26 @@ } }, "IntegrationMapping": { - "title": "Integration mapping", + "title": "Integration mapping Slack", "type": "object", - "x-box-resource-id": "integration_mapping", + "x-box-resource-id": "integration_mapping_slack", "x-box-tag": "integration_mappings", "x-box-variant": "standard", - "description": "A standard representation of an integration\nmapping object.", + "description": "A Slack specific representation of an integration\nmapping object.", "allOf": [ { "$ref": "#/components/schemas/IntegrationMapping--Base" }, { "properties": { - "type": { + "integration_type": { "type": "string", - "example": "integration_mapping", + "nullable": false, + "description": "Identifies the Box partner app,\nwith which the mapping is associated.\nCurrently only supports Slack.\n(part of the composite key together with `id`)", + "example": "slack", "enum": [ - "integration_mapping" - ], - "description": "Mapping type", - "nullable": false + "slack" + ] }, "partner_item": { "oneOf": [ @@ -31292,8 +30084,18 @@ } ], "nullable": false, - "description": "Mapped item object for Slack" - }, + "example": { + "id": "C12378991223", + "type": "channel", + "slack_org_id": "E1234567" + }, + "description": "Mapped item object for Slack or Teams" + } + } + }, + { + "type": "object", + "properties": { "box_item": { "allOf": [ { @@ -31310,11 +30112,8 @@ "nullable": false }, "options": { - "type": "object", "nullable": false, - "example": {}, - "description": "Integration mapping options for Slack", - "anyOf": [ + "allOf": [ { "$ref": "#/components/schemas/IntegrationMappingSlackOptions" } @@ -31352,13 +30151,14 @@ "example": "2012-12-12T10:53:43-08:00", "nullable": false } - } + }, + "required": [ + "box_item" + ] } ], "required": [ - "type", - "partner_item", - "box_item" + "partner_item" ] }, "IntegrationMapping--Base": { @@ -31380,68 +30180,25 @@ "example": "12345", "description": "A unique identifier of a folder mapping\n(part of a composite key together\nwith `integration_type`)" }, - "integration_type": { + "type": { "type": "string", - "nullable": false, - "description": "Identifies the Box partner app,\nwith which the mapping is associated.\nCurrently only supports Slack.\n(part of the composite key together with `id`)", - "example": "slack", + "example": "integration_mapping", "enum": [ - "slack" - ] - } - } - }, - "IntegrationMapping--Mini": { - "title": "Integration mapping (Mini)", - "type": "object", - "x-box-resource-id": "integration_mapping--mini", - "x-box-tag": "integration_mappings", - "x-box-variant": "mini", - "description": "A mini representation of an\nintegration mapping object.", - "allOf": [ - { - "$ref": "#/components/schemas/IntegrationMapping--Base" - }, - { - "properties": { - "partner_item_id": { - "type": "string", - "example": "C12351346", - "description": "ID of the mapped partner item", - "nullable": false - }, - "partner_item_type": { - "type": "string", - "example": "channel", - "enum": [ - "channel" - ], - "description": "Domain-specific type of the mapped partner item", - "nullable": false - }, - "box_item_id": { - "type": "string", - "example": "123124351", - "description": "ID of the Box item mapped to the object referenced in `partner_item_id`", - "nullable": false - }, - "box_item_type": { - "type": "string", - "example": "folder", - "enum": [ - "folder" - ], - "description": "Type of the Box object referenced in `box_item_id`", - "nullable": false - } - } + "integration_mapping" + ], + "description": "Mapping type", + "nullable": false } + }, + "required": [ + "id", + "type" ] }, "IntegrationMappings": { - "title": "Integration mappings", + "title": "Integration mappings Slack", "type": "object", - "x-box-resource-id": "integration_mappings", + "x-box-resource-id": "integration_mappings_slack", "x-box-tag": "integration_mappings", "description": "A list of integration mapping\nobjects.", "allOf": [ @@ -32658,10 +31415,10 @@ "items": { "oneOf": [ { - "$ref": "#/components/schemas/File" + "$ref": "#/components/schemas/File--Full" }, { - "$ref": "#/components/schemas/Folder" + "$ref": "#/components/schemas/Folder--Full" } ] } @@ -35427,6 +34184,17 @@ "description": "If provided, this value points signers that are assigned the same inputs and belongs to same signer group.\nA signer group is not a Box Group. It is an entity that belongs to the template itself and can only be used\nwithin Box Sign requests created from it.", "example": "cd4ff89-8fc1-42cf-8b29-1890dedd26d7", "nullable": true + }, + "label": { + "type": "string", + "description": "A placeholder label for the signer set by the template creator to differentiate between signers.", + "example": "Jane Doe", + "nullable": true + }, + "public_id": { + "type": "string", + "description": "An identifier for the signer. This can be used to identify a signer within the template.", + "example": "RJZYYVPR" } } } @@ -39015,12 +37783,12 @@ "properties": { "id": { "type": "string", - "description": "The id of the item.", + "description": "The ID of the file.", "example": "123" }, "type": { "type": "string", - "description": "The type of the item.", + "description": "The type of the item. Currently the value can be `file` only.", "enum": [ "file" ], @@ -39033,26 +37801,15 @@ } } }, - "AiAgentBasicTextToolAsk": { + "AiAgentBasicTextToolBase": { "title": "AI agent basic text tool", "type": "object", "x-box-tag": "ai", "properties": { "model": { "type": "string", - "description": "The model used for the AI Agent for basic text.", - "example": "openai__gpt_3_5_turbo" - }, - "system_message": { - "type": "string", - "description": "System messages try to help the LLM \"understand\" its role and what it is supposed to do.", - "example": "You are a helpful travel assistant specialized in budget travel" - }, - "prompt_template": { - "type": "string", - "description": "The prompt template contains contextual information of the request and the user prompt. \n\nWhen passing `prompt_template` parameters, you **must include** inputs for `{current_date}`, `{user_question}`, and `{content}`.", - "example": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?", - "maxLength": 10000 + "description": "The model used for the AI agent for basic text. For specific model values, see the [available models list](g://box-ai/supported-models).", + "example": "azure__openai__gpt_3_5_turbo_16k" }, "num_tokens_for_completion": { "type": "integer", @@ -39074,95 +37831,102 @@ }, "description": "AI agent tool used to handle basic text." }, - "AiAgentBasicTextToolTextGen": { + "AiAgentBasicTextTool": { "title": "AI agent basic text tool", "type": "object", "x-box-tag": "ai", - "properties": { - "model": { - "type": "string", - "description": "The model to be used for the AI Agent for basic text.", - "example": "openai__gpt_3_5_turbo" - }, - "system_message": { - "type": "string", - "description": "System messages try to help the LLM \"understand\" its role and what it is supposed to do.\nThis parameter requires using `{current_date}`.", - "example": "You are a helpful travel assistant specialized in budget travel" - }, - "prompt_template": { - "type": "string", - "description": "The prompt template contains contextual information of the request and the user prompt.\n\nWhen using the `prompt_template` parameter, you **must include** input for `{user_question}`.\nInputs for `{current_date}` and`{content}` are optional, depending on the use.", - "example": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?", - "maxLength": 10000 - }, - "num_tokens_for_completion": { - "type": "integer", - "description": "The number of tokens for completion.", - "example": 8400, - "minimum": 1 + "allOf": [ + { + "$ref": "#/components/schemas/AiAgentBasicTextToolBase" }, - "llm_endpoint_params": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/AiLlmEndpointParamsOpenAi" - }, - { - "$ref": "#/components/schemas/AiLlmEndpointParamsGoogle" - } - ] + { + "properties": { + "system_message": { + "type": "string", + "description": "System messages try to help the LLM \"understand\" its role and what it is supposed to do.", + "example": "You are a helpful travel assistant specialized in budget travel" }, - { - "description": "The parameters for the LLM endpoint specific to OpenAI / Google models." + "prompt_template": { + "type": "string", + "description": "The prompt template contains contextual information of the request and the user prompt.\nWhen passing `prompt_template` parameters, you **must include** inputs for `{user_question}` and `{content}`.\n`{current_date}` is optional, depending on the use.", + "example": "It is `{current_date}`, consider these travel options `{content}` and answer the `{user_question}`.", + "maxLength": 10000, + "pattern": "(\\{user_question\\}[\\s\\S]*?\\{content\\}|\\{content\\}[\\s\\S]*?\\{user_question\\})" } - ] + } } - }, + ], "description": "AI agent tool used to handle basic text." }, - "AiAgentBasicTextToolExtract": { + "AiAgentBasicTextToolTextGen": { "title": "AI agent basic text tool", "type": "object", "x-box-tag": "ai", - "properties": { - "model": { - "type": "string", - "description": "The model used for the AI Agent for basic text.", - "example": "openai__gpt_3_5_turbo" - }, - "system_message": { - "type": "string", - "description": "System messages try to help the LLM \"understand\" its role and what it is supposed to do.", - "example": "You are a helpful travel assistant specialized in budget travel" - }, - "prompt_template": { - "type": "string", - "description": "The prompt template contains contextual information of the request and the user prompt. \n\nWhen passing `prompt_template` parameters, you **must include** inputs for `{current_date}`, `{user_question}`, and `{content}`.", - "example": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. What should I see?", - "maxLength": 10000 - }, - "num_tokens_for_completion": { - "type": "integer", - "description": "The number of tokens for completion.", - "example": 8400, - "minimum": 1 + "allOf": [ + { + "$ref": "#/components/schemas/AiAgentBasicTextToolBase" }, - "llm_endpoint_params": { - "oneOf": [ - { - "$ref": "#/components/schemas/AiLlmEndpointParamsOpenAi" + { + "properties": { + "system_message": { + "type": "string", + "description": "System messages aim at helping the LLM understand its role and what it is supposed to do.\nThe input for `{current_date}` is optional, depending on the use.", + "example": "You are a helpful travel assistant specialized in budget travel" }, - { - "$ref": "#/components/schemas/AiLlmEndpointParamsGoogle" + "prompt_template": { + "type": "string", + "description": "The prompt template contains contextual information of the request and the user prompt.\n\nWhen using the `prompt_template` parameter, you **must include** input for `{user_question}`.\nInputs for `{current_date}` and `{content}` are optional, depending on the use.", + "example": "It is `{current_date}`, and I have $8000 and want to spend a week in the Azores. `{user_question}`", + "maxLength": 10000, + "pattern": "{user_question}" } - ], - "description": "The parameters for the LLM endpoint specific to OpenAI / Google models." + } } - }, + ], "description": "AI agent tool used to handle basic text." }, "AiAgentLongTextTool": { + "title": "AI agent long text tool", + "type": "object", + "x-box-tag": "ai", + "description": "AI agent tool used to to handle longer text.", + "allOf": [ + { + "$ref": "#/components/schemas/AiAgentBasicTextTool" + }, + { + "properties": { + "embeddings": { + "type": "object", + "properties": { + "model": { + "type": "string", + "example": "openai__text_embedding_ada_002", + "description": "The model used for the AI agent for calculating embeddings." + }, + "strategy": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The strategy used for the AI agent for calculating embeddings.", + "example": "basic" + }, + "num_tokens_per_chunk": { + "type": "integer", + "description": "The number of tokens per chunk.", + "example": 64, + "minimum": 1 + } + } + } + } + } + } + } + ] + }, + "AiAgentLongTextToolTextGen": { "title": "AI agent long text tool", "type": "object", "x-box-tag": "ai", @@ -39179,14 +37943,14 @@ "model": { "type": "string", "example": "openai__text_embedding_ada_002", - "description": "The model used for the AI Agent for calculating embeddings." + "description": "The model used for the AI agent for calculating embeddings." }, "strategy": { "type": "object", "properties": { "id": { "type": "string", - "description": "The strategy used for the AI Agent for calculating embeddings.", + "description": "The strategy used for the AI agent for calculating embeddings.", "example": "basic" }, "num_tokens_per_chunk": { @@ -39209,19 +37973,19 @@ "x-box-tag": "ai", "allOf": [ { - "$ref": "#/components/schemas/AiAgentLongTextTool" + "$ref": "#/components/schemas/AiAgentLongTextToolTextGen" }, { "properties": { "content_template": { "type": "string", - "description": "How the content should be included in a request to the LLM.\nWhen passing this parameter, you must include `{content}`.", + "description": "How the content should be included in a request to the LLM.\nInput for `{content}` is optional, depending on the use.", "example": "---{content}---" } } } ], - "description": "AI agent basic tool used to generate text." + "description": "AI agent basic tool used to generate text. " }, "AiLlmEndpointParamsGoogle": { "title": "AI LLM endpoint params Google", @@ -39242,24 +38006,27 @@ }, "temperature": { "type": "number", - "description": "The temperature is used for sampling during response generation, which occurs when `top-P` and `top-K` are applied. \nTemperature controls the degree of randomness in token selection.", + "description": "The temperature is used for sampling during response generation, which occurs when `top-P` and `top-K` are applied. Temperature controls the degree of randomness in the token selection.", "example": 0, "minimum": 0, - "maximum": 2 + "maximum": 2, + "nullable": true }, "top_p": { "type": "number", - "description": "`Top-P` changes how the model selects tokens for output. Tokens are selected from the most (see `top-K`) to least probable\nuntil the sum of their probabilities equals the `top-P` value.", + "description": "`Top-P` changes how the model selects tokens for output. Tokens are selected from the most (see `top-K`) to least probable until the sum of their probabilities equals the `top-P` value.", "example": 1, "minimum": 0.1, - "maximum": 2 + "maximum": 2, + "nullable": true }, "top_k": { "type": "number", "description": "`Top-K` changes how the model selects tokens for output. A `top-K` of 1 means the next selected token is\nthe most probable among all tokens in the model's vocabulary (also called greedy decoding),\nwhile a `top-K` of 3 means that the next token is selected from among the three most probable tokens by using temperature.", "example": 1, "minimum": 0.1, - "maximum": 2 + "maximum": 2, + "nullable": true } }, "description": "AI LLM endpoint params Google object" @@ -39286,33 +38053,38 @@ "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, \nwhile lower values like 0.2 will make it more focused and deterministic. \nWe generally recommend altering this or `top_p` but not both.", "example": 0, "minimum": 0, - "maximum": 2 + "maximum": 2, + "nullable": true }, "top_p": { "type": "number", "example": 1, "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results \nof the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability \nmass are considered. We generally recommend altering this or temperature but not both.", "minimum": 0.1, - "maximum": 1 + "maximum": 1, + "nullable": true }, "frequency_penalty": { "type": "number", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the \ntext so far, decreasing the model's likelihood to repeat the same line verbatim.", + "description": "A number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the \ntext so far, decreasing the model's likelihood to repeat the same line verbatim.", "minimum": -2, "maximum": 2, - "example": 1.5 + "example": 1.5, + "nullable": true }, "presence_penalty": { "type": "number", - "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, \nincreasing the model's likelihood to talk about new topics.", + "description": "A number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", "minimum": -2, "maximum": 2, - "example": 1.5 + "example": 1.5, + "nullable": true }, "stop": { "type": "string", "description": "Up to 4 sequences where the API will stop generating further tokens.", - "example": "<|im_end|>" + "example": "<|im_end|>", + "nullable": true } }, "description": "AI LLM endpoint params OpenAI object." @@ -40784,6 +39556,10 @@ "description": "A set of endpoints used to\ninteract with supported LLMs.", "x-box-tag": "ai" }, + { + "name": "App item associations", + "x-box-tag": "app_item_associations" + }, { "name": "Authorization", "description": "A set of endpoints used to\nmanage user authorization process.", @@ -41050,21 +39826,6 @@ "description": "A set of endpoints used to\nmanage the status of terms of service\nfor a particular user.", "x-box-tag": "terms_of_service_user_statuses" }, - { - "name": "Docgen", - "description": "Docgen are used to generate documents\nusing a template.", - "x-box-tag": "docgen" - }, - { - "name": "Docgen template", - "description": "Docgen are used to generate documents\nusing a template.", - "x-box-tag": "docgen_template" - }, - { - "name": "Docgen tag", - "description": "Docgen tag", - "x-box-tag": "docgen_tag" - }, { "name": "Transfer folders", "description": "API designed to move all of the items\n(files, folders and workflows)\nowned by a user into another user's account.",