Software Factory

Artifacts

GET
/v2/external-api/artifacts

Return Knowledge Base resources in the API key project scope, optionally filtered by name or type.

Authorization

ApiKeyAuth
X-API-Key<token>

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

In: header

Query Parameters

folder_path?|
Deprecated

Deprecated path filter. When provided, results are scoped by slash-delimited folder path; prefer resource IDs for direct Knowledge Base resource operations.

name?|

Optional case-insensitive name filter.

recursive?Recursive

Whether path filtering includes descendants.

Defaulttrue
type?|

Optional type filter: 'document', 'file', or 'folder'.

page?Page
Range1 <= value
Default1
page_size?Page Size
Range1 <= value <= 100
Default20

Response Body

application/json

application/json

curl -X GET "https://example.com/v2/external-api/artifacts"
{  "items": [    {      "object": "artifact",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "type": "folder",      "content_type": "string",      "size_bytes": 0,      "s3_uri": "string",      "folder_path": "string",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "created_by": "string"    }  ],  "total": 0,  "page": 0,  "page_size": 0,  "total_pages": 0}
POST
/v2/external-api/artifacts

Create a Knowledge Base resource from multipart file upload or JSON markdown content. The folder_path form/body field is deprecated but still accepted; omit it to create the resource at the root.

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 POST "https://example.com/v2/external-api/artifacts"
{  "data": {    "object": "artifact",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "type": "folder",    "content_type": "string",    "size_bytes": 0,    "s3_uri": "string",    "folder_path": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "created_by": "string",    "markdown_content": "string",    "connectedContext": [      {        "resourceType": "artifact",        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"      }    ]  }}
DELETE
/v2/external-api/artifacts/folders

Recursively delete a non-root Knowledge Base folder by path. Deprecated path-based operation; prefer deleting folders by resource ID.

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.

Delete a Knowledge Base folder path recursively (deprecated path-based flow).

Response Body

application/json

curl -X DELETE "https://example.com/v2/external-api/artifacts/folders" \  -H "Content-Type: application/json" \  -d '{}'
Empty
GET
/v2/external-api/artifacts/{artifact_id}/content

Return raw Knowledge Base resource content with stored content type and attachment disposition.

Authorization

ApiKeyAuth
X-API-Key<token>

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

In: header

Path Parameters

artifact_id*Artifact Id
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v2/external-api/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08/content"
null
GET
/v2/external-api/artifacts/{artifact_id}

Return Knowledge Base resource metadata and connected context.

Authorization

ApiKeyAuth
X-API-Key<token>

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

In: header

Path Parameters

artifact_id*Artifact Id
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v2/external-api/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "data": {    "object": "artifact",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "type": "folder",    "content_type": "string",    "size_bytes": 0,    "s3_uri": "string",    "folder_path": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "created_by": "string",    "markdown_content": "string",    "connectedContext": [      {        "resourceType": "artifact",        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"      }    ]  }}
PATCH
/v2/external-api/artifacts/{artifact_id}

Update Knowledge Base resource name or document markdown content.

Authorization

ApiKeyAuth
X-API-Key<token>

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

In: header

Path Parameters

artifact_id*Artifact Id
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Update Knowledge Base resource name or document markdown content.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v2/external-api/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "object": "artifact",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "type": "folder",    "content_type": "string",    "size_bytes": 0,    "s3_uri": "string",    "folder_path": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "created_by": "string",    "markdown_content": "string",    "connectedContext": [      {        "resourceType": "artifact",        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"      }    ]  }}
DELETE
/v2/external-api/artifacts/{artifact_id}

Authorization

ApiKeyAuth
X-API-Key<token>

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

In: header

Path Parameters

artifact_id*Artifact Id
Formatuuid

Response Body

application/json

curl -X DELETE "https://example.com/v2/external-api/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty