Work orders
Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders/labels"{ "items": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ]}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders/phases"{ "items": [ { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" } ]}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Query Parameters
1 <= value11 <= value <= 10020Response Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders"{ "items": [ { "object": "work_order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "work_order_number": 0, "title": "string", "status": "backlog", "priority": "urgent", "type": "build", "phase": { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" }, "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "labels": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ], "description_snippet": "string" } ], "total": 0, "page": 0, "page_size": 0, "total_pages": 0}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Search work orders by text or exact work order number.
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/external-api/work_orders/search" \ -H "Content-Type: application/json" \ -d '{}'{ "items": [ { "object": "work_order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "work_order_number": 0, "title": "string", "status": "backlog", "priority": "urgent", "type": "build", "phase": { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" }, "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "labels": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ], "description_snippet": "string" } ]}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
External batch envelope for work order create/update operations.
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/external-api/work_orders/batch_create" \ -H "Content-Type: application/json" \ -d '{ "request_id": "string", "operations": [ { "operation_id": "string", "operation_type": "CreateWorkOrder" } ] }'{ "request_id": "string", "status": "Succeeded", "results": { "property1": { "operation_id": "string", "operation_type": "CreateWorkOrder", "status": "succeeded", "work_order_id": "8b498a82-c67b-4806-a10f-d3c5f51a2153", "work_order_number": 0, "message": "string" }, "property2": { "operation_id": "string", "operation_type": "CreateWorkOrder", "status": "succeeded", "work_order_id": "8b498a82-c67b-4806-a10f-d3c5f51a2153", "work_order_number": 0, "message": "string" } }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
External batch envelope for work order create/update operations.
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/external-api/work_orders/batch_update" \ -H "Content-Type: application/json" \ -d '{ "request_id": "string", "operations": [ { "operation_id": "string", "operation_type": "CreateWorkOrder" } ] }'{ "request_id": "string", "status": "Succeeded", "results": { "property1": { "operation_id": "string", "operation_type": "CreateWorkOrder", "status": "succeeded", "work_order_id": "8b498a82-c67b-4806-a10f-d3c5f51a2153", "work_order_number": 0, "message": "string" }, "property2": { "operation_id": "string", "operation_type": "CreateWorkOrder", "status": "succeeded", "work_order_id": "8b498a82-c67b-4806-a10f-d3c5f51a2153", "work_order_number": 0, "message": "string" } }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
Query Parameters
falseResponse Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders/by_number/0"{ "data": { "object": "work_order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "work_order_number": 0, "title": "string", "status": "backlog", "priority": "urgent", "type": "build", "phase": { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" }, "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "labels": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ], "description_snippet": "string", "markdown_content": "string", "implementation_plan": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "connectedContext": [ { "resourceType": "artifact", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6" } ] }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuidQuery Parameters
falseResponse Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "data": { "object": "work_order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "work_order_number": 0, "title": "string", "status": "backlog", "priority": "urgent", "type": "build", "phase": { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" }, "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "labels": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ], "description_snippet": "string", "markdown_content": "string", "implementation_plan": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "connectedContext": [ { "resourceType": "artifact", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6" } ] }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuidResponse Body
application/json
curl -X DELETE "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08"Fully replaces the work order's markdown description. The supplied markdown_content overwrites the existing content in its entirety — this is not a partial update or patch.
Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Full work order description markdown replacement.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/description" \ -H "Content-Type: application/json" \ -d '{ "markdown_content": "string" }'{ "data": { "object": "work_order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "work_order_number": 0, "title": "string", "status": "backlog", "priority": "urgent", "type": "build", "phase": { "object": "phase", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "phase_id": "95958964-84b6-4655-a1c3-71575024f966", "phase_number": 0, "title": "string" }, "assignee": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "labels": [ { "object": "label", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": "string", "color": "gray", "archived": true } ], "description_snippet": "string", "markdown_content": "string", "implementation_plan": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "connectedContext": [ { "resourceType": "artifact", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6" } ] }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments"{ "items": [ { "object": "work_order_comment", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "author": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "markdown_content": "string", "artifact_ids": [ "6f888f5b-43a6-445b-b585-d59aaf6e5beb" ] } ]}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a flat work order comment.
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments" \ -H "Content-Type: application/json" \ -d '{ "markdown_content": "string" }'{ "data": { "object": "work_order_comment", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "author": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "markdown_content": "string", "artifact_ids": [ "6f888f5b-43a6-445b-b585-d59aaf6e5beb" ] }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuiduuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Update a flat work order comment.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "object": "work_order_comment", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "author": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "markdown_content": "string", "artifact_ids": [ "6f888f5b-43a6-445b-b585-d59aaf6e5beb" ] }}Authorization
ApiKeyAuth External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.
In: header
Path Parameters
uuiduuidResponse Body
application/json
curl -X DELETE "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/comments/497f6eca-6276-4993-bfeb-53cbbbba6f08"