MechaMental
Api reference

Artifacts

List Artifacts

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id

Query Parameters

thread_id?|

Filter by thread

artifact_types?|

Comma-separated types

include_expired?Include Expired
Defaultfalse
limit?Limit

Maximum number of items to return (1-200)

Default50
Range1 <= value <= 200
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "artifacts": [
    {
      "artifact_id": "string",
      "workspace_id": "string",
      "namespace_id": "string",
      "thread_id": "string",
      "name": "string",
      "description": "string",
      "artifact_type": "string",
      "version": 1,
      "root_artifact_id": "string",
      "is_latest": true,
      "replaced_by_version": 0,
      "content": "string",
      "content_preview": "string",
      "content_text": "string",
      "file_name": "string",
      "mime_type": "string",
      "size_bytes": 0,
      "has_file": false,
      "summary": "string",
      "keywords": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "metadata": {},
      "source": "string",
      "source_execution_id": "string",
      "source_step_id": "string",
      "source_tool": "string",
      "scope": "string",
      "status": "string",
      "ttl_seconds": 0,
      "expires_at": "string",
      "is_pinned": true,
      "is_expired": true,
      "is_indexed": true,
      "indexed_at": "string",
      "index_collection": "string",
      "index_error": "string",
      "index_attempts": 0,
      "embedding_model_id": "string",
      "chunk_count": 0,
      "promoted_to_source_id": "string",
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Artifact

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "artifact_id": "string",
  "workspace_id": "string",
  "namespace_id": "string",
  "thread_id": "string",
  "name": "string",
  "description": "string",
  "artifact_type": "string",
  "version": 1,
  "root_artifact_id": "string",
  "is_latest": true,
  "replaced_by_version": 0,
  "content": "string",
  "content_preview": "string",
  "content_text": "string",
  "file_name": "string",
  "mime_type": "string",
  "size_bytes": 0,
  "has_file": false,
  "summary": "string",
  "keywords": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "metadata": {},
  "source": "string",
  "source_execution_id": "string",
  "source_step_id": "string",
  "source_tool": "string",
  "scope": "string",
  "status": "string",
  "ttl_seconds": 0,
  "expires_at": "string",
  "is_pinned": true,
  "is_expired": true,
  "is_indexed": true,
  "indexed_at": "string",
  "index_collection": "string",
  "index_error": "string",
  "index_attempts": 0,
  "embedding_model_id": "string",
  "chunk_count": 0,
  "promoted_to_source_id": "string",
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Artifact With File

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/upload

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id

Header Parameters

authorization?string|null

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/upload" \  -F file="string" \  -F name="string"
{
  "artifact_id": "string",
  "workspace_id": "string",
  "namespace_id": "string",
  "thread_id": "string",
  "name": "string",
  "description": "string",
  "artifact_type": "string",
  "version": 1,
  "root_artifact_id": "string",
  "is_latest": true,
  "replaced_by_version": 0,
  "content": "string",
  "content_preview": "string",
  "content_text": "string",
  "file_name": "string",
  "mime_type": "string",
  "size_bytes": 0,
  "has_file": false,
  "summary": "string",
  "keywords": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "metadata": {},
  "source": "string",
  "source_execution_id": "string",
  "source_step_id": "string",
  "source_tool": "string",
  "scope": "string",
  "status": "string",
  "ttl_seconds": 0,
  "expires_at": "string",
  "is_pinned": true,
  "is_expired": true,
  "is_indexed": true,
  "indexed_at": "string",
  "index_collection": "string",
  "index_error": "string",
  "index_attempts": 0,
  "embedding_model_id": "string",
  "chunk_count": 0,
  "promoted_to_source_id": "string",
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Artifact

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string"
{
  "artifact_id": "string",
  "workspace_id": "string",
  "namespace_id": "string",
  "thread_id": "string",
  "name": "string",
  "description": "string",
  "artifact_type": "string",
  "version": 1,
  "root_artifact_id": "string",
  "is_latest": true,
  "replaced_by_version": 0,
  "content": "string",
  "content_preview": "string",
  "content_text": "string",
  "file_name": "string",
  "mime_type": "string",
  "size_bytes": 0,
  "has_file": false,
  "summary": "string",
  "keywords": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "metadata": {},
  "source": "string",
  "source_execution_id": "string",
  "source_step_id": "string",
  "source_tool": "string",
  "scope": "string",
  "status": "string",
  "ttl_seconds": 0,
  "expires_at": "string",
  "is_pinned": true,
  "is_expired": true,
  "is_indexed": true,
  "indexed_at": "string",
  "index_collection": "string",
  "index_error": "string",
  "index_attempts": 0,
  "embedding_model_id": "string",
  "chunk_count": 0,
  "promoted_to_source_id": "string",
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Delete Artifact

DELETE
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Header Parameters

authorization?string|null

Response Body

application/json

curl -X DELETE "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Artifact

PUT
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "artifact_id": "string",
  "workspace_id": "string",
  "namespace_id": "string",
  "thread_id": "string",
  "name": "string",
  "description": "string",
  "artifact_type": "string",
  "version": 1,
  "root_artifact_id": "string",
  "is_latest": true,
  "replaced_by_version": 0,
  "content": "string",
  "content_preview": "string",
  "content_text": "string",
  "file_name": "string",
  "mime_type": "string",
  "size_bytes": 0,
  "has_file": false,
  "summary": "string",
  "keywords": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "metadata": {},
  "source": "string",
  "source_execution_id": "string",
  "source_step_id": "string",
  "source_tool": "string",
  "scope": "string",
  "status": "string",
  "ttl_seconds": 0,
  "expires_at": "string",
  "is_pinned": true,
  "is_expired": true,
  "is_indexed": true,
  "indexed_at": "string",
  "index_collection": "string",
  "index_error": "string",
  "index_attempts": 0,
  "embedding_model_id": "string",
  "chunk_count": 0,
  "promoted_to_source_id": "string",
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Artifact Versions

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}/versions

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string/versions"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get artifact download URL

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}/download

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Query Parameters

expires_in?Expires In

URL expiration in seconds (1 min to 24 hours)

Default3600
Range60 <= value <= 86400

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string/download"
{
  "artifact_id": "string",
  "download_url": "string",
  "expires_in": 0,
  "file_name": "string",
  "content_type": "string",
  "file_size_bytes": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

List Thread Artifacts

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/threads/{thread_id}/artifacts

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
thread_id*Thread Id

Query Parameters

artifact_types?string|null
include_expired?Include Expired
Defaultfalse
limit?Limit

Maximum number of items to return (1-200)

Default50
Range1 <= value <= 200
cursor?|

Cursor for pagination (from previous response's next_cursor)

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/namespaces/string/threads/string/artifacts"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "artifacts": [
    {
      "artifact_id": "string",
      "workspace_id": "string",
      "namespace_id": "string",
      "thread_id": "string",
      "name": "string",
      "description": "string",
      "artifact_type": "string",
      "version": 1,
      "root_artifact_id": "string",
      "is_latest": true,
      "replaced_by_version": 0,
      "content": "string",
      "content_preview": "string",
      "content_text": "string",
      "file_name": "string",
      "mime_type": "string",
      "size_bytes": 0,
      "has_file": false,
      "summary": "string",
      "keywords": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "metadata": {},
      "source": "string",
      "source_execution_id": "string",
      "source_step_id": "string",
      "source_tool": "string",
      "scope": "string",
      "status": "string",
      "ttl_seconds": 0,
      "expires_at": "string",
      "is_pinned": true,
      "is_expired": true,
      "is_indexed": true,
      "indexed_at": "string",
      "index_collection": "string",
      "index_error": "string",
      "index_attempts": 0,
      "embedding_model_id": "string",
      "chunk_count": 0,
      "promoted_to_source_id": "string",
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Query Artifacts

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/query

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/query" \  -H "Content-Type: application/json" \  -d '{    "query": "string"  }'
{
  "results": [
    {
      "artifact": {
        "artifact_id": "string",
        "workspace_id": "string",
        "namespace_id": "string",
        "thread_id": "string",
        "name": "string",
        "description": "string",
        "artifact_type": "string",
        "version": 1,
        "root_artifact_id": "string",
        "is_latest": true,
        "replaced_by_version": 0,
        "content": "string",
        "content_preview": "string",
        "content_text": "string",
        "file_name": "string",
        "mime_type": "string",
        "size_bytes": 0,
        "has_file": false,
        "summary": "string",
        "keywords": [
          "string"
        ],
        "tags": [
          "string"
        ],
        "metadata": {},
        "source": "string",
        "source_execution_id": "string",
        "source_step_id": "string",
        "source_tool": "string",
        "scope": "string",
        "status": "string",
        "ttl_seconds": 0,
        "expires_at": "string",
        "is_pinned": true,
        "is_expired": true,
        "is_indexed": true,
        "indexed_at": "string",
        "index_collection": "string",
        "index_error": "string",
        "index_attempts": 0,
        "embedding_model_id": "string",
        "chunk_count": 0,
        "promoted_to_source_id": "string",
        "created_by": "string",
        "created_at": "string",
        "updated_at": "string"
      },
      "score": 0,
      "matched_chunk": "string"
    }
  ],
  "combined_context": "string",
  "total_results": 0,
  "query": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Promote Artifact To Source

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/namespaces/{namespace_id}/artifacts/{artifact_id}/promote

Path Parameters

org_id*Org Id
workspace_id*Workspace Id
namespace_id*Namespace Id
artifact_id*Artifact Id

Header Parameters

authorization?string|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/orgs/string/workspaces/string/namespaces/string/artifacts/string/promote" \  -H "Content-Type: application/json" \  -d '{}'
{
  "artifact_id": "string",
  "source_id": "string",
  "source_name": "string",
  "message": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}