Assets
Workspace asset management.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/assets/upload-urls" \ -H "Content-Type: application/json" \ -d '{ "fileName": "string", "mimeType": "string", "sizeBytes": -9007199254740991 }'{ "uploadUrl": "string", "storageKey": "string", "publicUrl": "string", "expiresIn": 0, "duplicate": true, "attachmentId": "string", "assetId": "string"}Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/assets/confirmations" \ -H "Content-Type: application/json" \ -d '{ "storageKey": "string", "fileName": "string", "mimeType": "string", "sizeBytes": -9007199254740991 }'{ "success": true, "attachmentId": "string", "assetId": "string", "storageKey": "string", "publicUrl": "string"}Query Parameters
Page size, 1-200. Omit to return every asset (the historical behaviour).
1 <= value <= 200Asset id of the last row of the previous page. Requires limit.
Response Body
application/json
curl -X GET "https://example.com/api/v1/assets"[ { "id": "string", "attachmentId": "string", "name": "string", "contentKind": "text", "metadata": {}, "fileName": "string", "mimeType": "string", "size": 0, "url": "string", "contentHash": "string", "usageCount": 0, "textStatus": "missing", "createdAt": "string" }]curl -X GET "https://example.com/api/v1/assets/string"{ "asset": { "id": "string", "attachmentId": "string", "name": "string", "contentKind": "text", "metadata": {}, "fileName": "string", "mimeType": "string", "size": 0, "url": "string", "contentHash": "string", "usageCount": 0, "textStatus": "missing", "createdAt": "string" }, "usages": [ { "ownerType": "drive", "nodeId": "string", "nodeName": "string", "nodeType": "string", "nodeSlug": "string", "path": "string", "recordId": "string", "fieldSlug": "string", "blockId": "string", "createdAt": "string" } ]}curl -X DELETE "https://example.com/api/v1/assets/string"{ "deleted": true}Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/api/v1/assets/string/metadata" \ -H "Content-Type: application/json" \ -d '{ "metadata": { "property1": null, "property2": null } }'{ "asset": { "id": "string", "attachmentId": "string", "name": "string", "contentKind": "text", "metadata": {}, "fileName": "string", "mimeType": "string", "size": 0, "url": "string", "contentHash": "string", "usageCount": 0, "textStatus": "missing", "createdAt": "string" }, "usages": [ { "ownerType": "drive", "nodeId": "string", "nodeName": "string", "nodeType": "string", "nodeSlug": "string", "path": "string", "recordId": "string", "fieldSlug": "string", "blockId": "string", "createdAt": "string" } ]}curl -X GET "https://example.com/api/v1/assets/string/content"{ "assetId": "string", "downloadUrl": "string", "fileName": "string", "mimeType": "string", "size": 0, "contentHash": "string"}Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/api/v1/assets/string/text" \ -H "Content-Type: application/json" \ -d '{}'{ "assetId": "string", "textStatus": "missing", "lineCount": 0, "charCount": 0, "byteCount": 0}Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/assets/text/upload-urls" \ -H "Content-Type: application/json" \ -d '{ "assetId": "string", "sizeBytes": -9007199254740991 }'{ "uploadUrl": "string", "storageKey": "string", "expiresIn": 0}Path Parameters
Query Parameters
First line to read. 1-indexed, and INCLUSIVE.
1 <= value <= 9007199254740991Last line to read, INCLUSIVE. A range wider than 2000 lines is silently narrowed to the first 2000 rather than rejected — the response reports lineCountCapped when that happened, so check it before concluding the file ends there.
1 <= value <= 9007199254740991Response Body
application/json
curl -X GET "https://example.com/api/v1/assets/string/text/lines?startLine=1&endLine=1"{ "lines": [ "string" ], "startLine": -9007199254740991, "endLine": -9007199254740991, "totalLines": 0, "truncated": true}Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/assets/string/edit-content" \ -H "Content-Type: application/json" \ -d '{ "edits": [ { "oldString": "string", "newString": "string" } ] }'{ "id": "string", "baseId": "string", "targetType": "base", "nodeId": "string", "status": "in_review", "submittedBy": "string", "submittedByUser": null, "sourceAttribution": { "displayName": "string", "ownerName": "string", "channel": "web_ui" }, "sourceMeta": { "property1": null, "property2": null }, "reviewPolicySnapshot": { "property1": null, "property2": null }, "mergeSummary": { "property1": null, "property2": null }, "rejectedReason": "string", "reviewedAt": "string", "mergedAt": "string", "createdAt": "string", "updatedAt": "string", "base": { "id": "string", "nodeId": "string", "slug": "string", "name": "string", "description": "string", "reviewPolicy": { "kind": "single", "requiredApprovals": 0 }, "createdAt": "string", "fields": [ { "id": "string", "baseId": "string", "slug": "string", "name": "string", "type": "text", "required": true, "position": 0, "options": {} } ] }, "node": { "id": "string", "parentId": "string", "type": "folder", "slug": "string", "name": "string", "description": "string", "metadata": {}, "settings": {}, "explicitVisibility": null, "icon": null, "position": 0, "createdAt": "string", "updatedAt": "string", "baseId": "string", "children": [ { "id": "string", "parentId": "string", "type": "folder", "slug": "string", "name": "string", "description": "string", "metadata": {}, "settings": {}, "explicitVisibility": null, "icon": null, "position": 0, "createdAt": "string", "updatedAt": "string", "baseId": "string", "children": [ null ], "hasChildren": true, "shared": true } ], "hasChildren": true, "shared": true }, "operations": [ { "id": "string", "changeRequestId": "string", "baseId": "string", "targetType": "base", "nodeId": "string", "operation": "node_create", "status": "pending", "targetRecordId": "string", "targetViewId": "string", "filePath": "string", "sourceRecordId": "string", "sourceCommitId": "string", "baseCommitId": "string", "headCommitId": "string", "deleteMode": "archive", "mergedRecordId": "string", "mergedViewId": "string", "position": 0, "createdAt": "string", "updatedAt": "string", "headCommit": { "id": "string", "baseId": "string", "targetType": "base", "nodeId": "string", "operationId": "string", "parentCommitId": "string", "payload": { "property1": null, "property2": null }, "operation": "node_create", "message": "string", "author": "string", "authorUser": null, "createdAt": "string" }, "baseFields": { "property1": null, "property2": null } } ], "primaryOperation": { "id": "string", "changeRequestId": "string", "baseId": "string", "targetType": "base", "nodeId": "string", "operation": "node_create", "status": "pending", "targetRecordId": "string", "targetViewId": "string", "filePath": "string", "sourceRecordId": "string", "sourceCommitId": "string", "baseCommitId": "string", "headCommitId": "string", "deleteMode": "archive", "mergedRecordId": "string", "mergedViewId": "string", "position": 0, "createdAt": "string", "updatedAt": "string", "headCommit": { "id": "string", "baseId": "string", "targetType": "base", "nodeId": "string", "operationId": "string", "parentCommitId": "string", "payload": { "property1": null, "property2": null }, "operation": "node_create", "message": "string", "author": "string", "authorUser": null, "createdAt": "string" }, "baseFields": { "property1": null, "property2": null } }, "operationCount": 0, "reviews": [ { "id": "string", "changeRequestId": "string", "reviewerId": "string", "reviewer": null, "verdict": "approved", "reason": "string", "visibleOperationHeads": { "property1": "string", "property2": "string" }, "createdAt": "string" } ]}