curl -X POST 'https://api.example.com/resources/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap"
},
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification"
}
]'
[
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
},
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
}
]
Resources
Create Resources (Batch)
Create multiple resources in a single request
POST
/
resources
/
batch
curl -X POST 'https://api.example.com/resources/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap"
},
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification"
}
]'
[
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
},
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
}
]
Overview
Batch creation allows you to create multiple resources in a single API call.ID Format: All IDs use a namespaced UUIDv7 format:
resource_{uuidv7}.Request Body
Array of resource objects:string
Optional client-provided ID
string
required
ID of the resource type
string
required
ID of the owning scope
string
required
External identifier for the resource
string
Display name for the resource
Response
Returns an array of created resource objects.curl -X POST 'https://api.example.com/resources/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap"
},
{
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification"
}
]'
[
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-123",
"displayName": "Project Roadmap",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
},
{
"id": "resource_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
"resourceTypeId": "resource_type_document",
"scopeId": "scope_engineering",
"externalResourceId": "doc-456",
"displayName": "API Specification",
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "system"
}
]
Was this page helpful?
⌘I