Software Factory

Work orders

GET
/v2/external-api/work_orders/labels

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Query Parameters

archived?boolean|null

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    }  ]}
GET
/v2/external-api/work_orders/phases

Authorization

ApiKeyAuth
X-API-Key<token>

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"    }  ]}
GET
/v2/external-api/work_orders

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Query Parameters

page?Page
Range1 <= value
Default1
page_size?Page Size
Range1 <= value <= 100
Default20
title?string|null
status?array<>|null
assignee?string|null
phase?integer|null
blueprint?|null
label?array<string>|null
feature?|null

Response 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}
POST
/v2/external-api/work_orders/search

Authorization

ApiKeyAuth
X-API-Key<token>

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"    }  ]}
POST
/v2/external-api/work_orders/batch_create

Authorization

ApiKeyAuth
X-API-Key<token>

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"    }  }}
POST
/v2/external-api/work_orders/batch_update

Authorization

ApiKeyAuth
X-API-Key<token>

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"    }  }}
GET
/v2/external-api/work_orders/by_number/{work_order_number}

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_number*Work Order Number

Query Parameters

include_plan?Include Plan
Defaultfalse

Response 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"      }    ]  }}
GET
/v2/external-api/work_orders/{work_order_id}

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid

Query Parameters

include_plan?Include Plan
Defaultfalse

Response 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"      }    ]  }}
DELETE
/v2/external-api/work_orders/{work_order_id}

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid

Response Body

application/json

curl -X DELETE "https://example.com/v2/external-api/work_orders/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
PATCH
/v2/external-api/work_orders/{work_order_id}/description

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
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid

Request 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"      }    ]  }}
GET
/v2/external-api/work_orders/{work_order_id}/comments

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid

Response 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"      ]    }  ]}
POST
/v2/external-api/work_orders/{work_order_id}/comments

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid

Request 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"    ]  }}
PATCH
/v2/external-api/work_orders/{work_order_id}/comments/{comment_id}

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid
comment_id*Comment Id
Formatuuid

Request 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"    ]  }}
DELETE
/v2/external-api/work_orders/{work_order_id}/comments/{comment_id}

Authorization

ApiKeyAuth
X-API-Key<token>

External API key header (format: sofa-ext-). Authorization: Bearer is also accepted.

In: header

Path Parameters

work_order_id*Work Order Id
Formatuuid
comment_id*Comment Id
Formatuuid

Response 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"
Empty