{ "opencollection": "1.0.0", "info": { "name": "Cube Agents Library API", "version": "1.0.0 (1.0)" }, "items": [ { "info": { "name": "Library", "type": "folder" }, "items": [ { "info": { "name": "List folders", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/folders", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "namespace", "value": "", "type": "query", "description": "Folder namespace to list / create under. Defaults to `LIBRARY` when omitted." }, { "name": "parent_id", "value": "", "type": "query", "description": "Parent folder id whose direct children should be listed. Omit to list root folders." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "List folders for the requesting company in the given namespace. Supports drill-in via `?parent_id=`." }, { "info": { "name": "Create a folder", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/folders", "headers": [ { "name": "X-Company-ID", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This is a shortcut class that will include all 6 resourceful actions part of the DRF ViewSets:\n- list()\n- retrieve()\n- create()\n- update()\n- partial_update()\n- destroy()\n\nIf you do not want to expose all 6 of these in your ViewSet, then use the CubeAuthenticatedViewSet and add the\nappropriate mixins to it (see rest_framework.mixins). This will allow the api to behave appropriately and block\nrequests to unprocessable endpoints. Furthermore, it will make the drf_spectacular documentation be genera" }, { "info": { "name": "Retrieve a folder", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/folders/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This is a shortcut class that will include all 6 resourceful actions part of the DRF ViewSets:\n- list()\n- retrieve()\n- create()\n- update()\n- partial_update()\n- destroy()\n\nIf you do not want to expose all 6 of these in your ViewSet, then use the CubeAuthenticatedViewSet and add the\nappropriate mixins to it (see rest_framework.mixins). This will allow the api to behave appropriately and block\nrequests to unprocessable endpoints. Furthermore, it will make the drf_spectacular documentation be genera" }, { "info": { "name": "Update a folder", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.cubesoftware.com/folders/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This is a shortcut class that will include all 6 resourceful actions part of the DRF ViewSets:\n- list()\n- retrieve()\n- create()\n- update()\n- partial_update()\n- destroy()\n\nIf you do not want to expose all 6 of these in your ViewSet, then use the CubeAuthenticatedViewSet and add the\nappropriate mixins to it (see rest_framework.mixins). This will allow the api to behave appropriately and block\nrequests to unprocessable endpoints. Furthermore, it will make the drf_spectacular documentation be genera" }, { "info": { "name": "Delete a folder", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.cubesoftware.com/folders/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This is a shortcut class that will include all 6 resourceful actions part of the DRF ViewSets:\n- list()\n- retrieve()\n- create()\n- update()\n- partial_update()\n- destroy()\n\nIf you do not want to expose all 6 of these in your ViewSet, then use the CubeAuthenticatedViewSet and add the\nappropriate mixins to it (see rest_framework.mixins). This will allow the api to behave appropriately and block\nrequests to unprocessable endpoints. Furthermore, it will make the drf_spectacular documentation be genera" }, { "info": { "name": "library_list", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/library", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "created_by_id", "value": "", "type": "query", "description": "Filter to entries created by the given user id." }, { "name": "folder_id", "value": "", "type": "query", "description": "Folder id to scope the listing to (drill-in). Omit to list the root context." }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "ordering", "value": "", "type": "query", "description": "Comma-separated sort tokens (prefix `-` for descending). Allowed: ['created_at', 'created_by', 'last_opened_at', 'name', 'sharing_scheme']. Default: `-created_at`. Folders always pin at the top regardless of ordering." }, { "name": "page", "value": "", "type": "query", "description": "A page number within the paginated result set." }, { "name": "search", "value": "", "type": "query", "description": "Case-insensitive substring match on `name`, applied at SQL before pagination." }, { "name": "type", "value": "", "type": "query", "description": "Single value: `all` (default), `template`, or `file`. Narrows the non-folder kinds shown. **Folders are always included in the response regardless of this filter** -- use `?folder_id=` to scope inside a folder instead. `file` covers both binary uploads and URL bookmarks (they share the underlying `TemplateUpload` model)." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Read-only unified listing of Library entries: folders, templates, and files. Each row carries a `type` discriminator (`folder`, `template`, or `file`) and the fields relevant to that kind. Folders are always pinned to the top of the page regardless of `?ordering=`. The listing is **shallow** -- use `?folder_id=` to drill into a folder. `file` covers both binary uploads and URL bookmarks (same underlying model)." }, { "info": { "name": "List library items", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/library-items", "headers": [ { "name": "X-Company-ID", "value": "" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "List all library items" }, { "info": { "name": "Create a library item", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/library-items", "headers": [ { "name": "X-Company-ID", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Create a library item. Either file or url must be provided but not both." }, { "info": { "name": "Retrieve a library item", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/library-items/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Retrieve a library item by id" }, { "info": { "name": "Update a library item", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.cubesoftware.com/library-items/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Update a library item. Cannot replace an existing file with a url or vice versa. Cannot set both file and url." }, { "info": { "name": "Delete a library item", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.cubesoftware.com/library-items/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Delete a library item by id" }, { "info": { "name": "library_owners_list", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/library/owners", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "created_by_id", "value": "", "type": "query", "description": "Filter to entries created by the given user id." }, { "name": "folder_id", "value": "", "type": "query", "description": "Folder id to scope the owner set to a specific folder. Omit to return owners of the root listing. Same semantics as `/library?folder_id=`." }, { "name": "limit", "value": "", "type": "query", "description": "Number of results to return per page." }, { "name": "ordering", "value": "", "type": "query", "description": "Comma-separated sort tokens (prefix `-` for descending). Allowed: ['created_at', 'created_by', 'last_opened_at', 'name', 'sharing_scheme']. Default: `-created_at`. Folders always pin at the top regardless of ordering." }, { "name": "page", "value": "", "type": "query", "description": "A page number within the paginated result set." }, { "name": "search", "value": "", "type": "query", "description": "Case-insensitive substring match on `name`, applied at SQL before pagination." }, { "name": "type", "value": "", "type": "query", "description": "Single value: `all` (default), `template`, or `file`. Narrows the owner set to creators of items of those kinds. Folders are always considered, matching `/library`." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Distinct creators of Library entries visible to the requester. Backs the Library page Owner filter dropdown. Mirrors `/library` visibility (same `?folder_id=` / `?type=` scoping, same per-instance permission filter) so creators of rows the requester can't see never appear here. Not paginated -- owner counts are bounded by company size." }, { "info": { "name": "List all templates.", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/templates", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "planning_table_id", "value": "", "type": "query", "description": "Limit results to those associated with this planning table id" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "List all templates available to the authenticated user company.\n\n- Expensive fields such as `content`, `styles`, `sheet_metadata`, `formulas`, `images`, etc are omitted from this response for performance reasons." }, { "info": { "name": "Create a template.", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/templates", "headers": [ { "name": "X-Company-ID", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Create a new template.\n\n- When submitted fields contain A1 range values, these values will be normalized (shifted) relative to cell A1 before being stored.\n\n- Matrix fields such as `content`, `styles`, `sheet_metadata`, `formulas`, and `images` will be _sparsified_ for storage optimization, meaning their values will be stored as key-value pairs addressed by their cell references." }, { "info": { "name": "Retrieve a specific template.", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/templates/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Fetch detailed information about a single template by ID.\n\n- Returns all template fields, including potentially large optional fields: `content`, `styles`, `sheet_metadata`, `formulas`, and `images`.\n- This endpoint is intended for detail views or editing." }, { "info": { "name": "Update a template.", "type": "http" }, "http": { "method": "PUT", "url": "https://api.cubesoftware.com/templates/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Update an existing template." }, { "info": { "name": "Partially update a template.", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.cubesoftware.com/templates/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Update one or more writable fields on an existing template." }, { "info": { "name": "Delete a template.", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.cubesoftware.com/templates/:id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Permanently removes a template by ID." }, { "info": { "name": "Request a URL to upload a template image.", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/templates/:id/images/presign", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Return a pre-signed S3 URL for uploading an image linked to this template. Enable direct upload from the frontend." }, { "info": { "name": "templates_data_update_create", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/templates/data/update", "headers": [ { "name": "X-Company-ID", "value": "" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Atomic Template Update" }, { "info": { "name": "Get All Template Folders", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/templates/folders", "headers": [ { "name": "X-Company-ID", "value": "" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint retrieves all template folders" }, { "info": { "name": "Create a New Template Folder", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/templates/folders", "headers": [ { "name": "X-Company-ID", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint creates a new template folder" }, { "info": { "name": "Get a Specific Template Folder", "type": "http" }, "http": { "method": "GET", "url": "https://api.cubesoftware.com/templates/folders/:folder_id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "folder_id", "value": "", "type": "path", "description": "ID of the folder to retrieve" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint retrieves a specific template folder" }, { "info": { "name": "Update a Specific Template Folder", "type": "http" }, "http": { "method": "POST", "url": "https://api.cubesoftware.com/templates/folders/:folder_id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "folder_id", "value": "", "type": "path", "description": "ID of the folder to retrieve" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint updates a template folder" }, { "info": { "name": "Delete a Specific Template Folder", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.cubesoftware.com/templates/folders/:folder_id", "headers": [ { "name": "X-Company-ID", "value": "" } ], "params": [ { "name": "folder_id", "value": "", "type": "path", "description": "ID of the folder to retrieve" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://portal.cubesoftware.com/o/authorize/", "accessTokenUrl": "https://api.cubesoftware.com/o/token/", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This endpoint deletes a template folder" } ] } ], "bundled": true }