MechaMental
Api reference

Tags

List Tags

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

Query Parameters

search?|

Search by tag name

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/tags"
{
  "total": 0,
  "has_more": false,
  "next_cursor": "string",
  "tags": [
    {
      "tag_id": "string",
      "workspace_id": "string",
      "name": "string",
      "color": "string",
      "description": "string",
      "icon": "string",
      "usage_count": 0,
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Create Tag

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace 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/tags" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "tag_id": "string",
  "workspace_id": "string",
  "name": "string",
  "color": "string",
  "description": "string",
  "icon": "string",
  "usage_count": 0,
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Tag

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag ID

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/tags/string"
{
  "tag_id": "string",
  "workspace_id": "string",
  "name": "string",
  "color": "string",
  "description": "string",
  "icon": "string",
  "usage_count": 0,
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Update Tag

PATCH
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag 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 PATCH "https://loading/v1/orgs/string/workspaces/string/tags/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "tag_id": "string",
  "workspace_id": "string",
  "name": "string",
  "color": "string",
  "description": "string",
  "icon": "string",
  "usage_count": 0,
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Delete Tag

DELETE
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag ID

Header Parameters

authorization?string|null

Response Body

application/json

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

Assign Tag To Resource

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}/assign

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag 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/tags/string/assign" \  -H "Content-Type: application/json" \  -d '{    "resource_type": "secret",    "resource_id": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Unassign Tag From Resource

DELETE
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}/assign

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag ID

Query Parameters

resource_type*ResourceType

Resource type

Value in"secret" | "source" | "augmentation" | "endpoint" | "app" | "model_instance" | "prompt" | "namespace" | "thread"
resource_id*Resource Id

Resource ID

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X DELETE "https://loading/v1/orgs/string/workspaces/string/tags/string/assign?resource_type=secret&resource_id=string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Resources By Tag

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/tags/{tag_id}/resources

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

tag_id*Tag Id

Tag ID

Query Parameters

resource_type?|

Filter by resource type

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/tags/string/resources"
{
  "tag_id": "string",
  "resource_type": "string",
  "resources": [
    {}
  ],
  "total": 0,
  "has_more": false,
  "next_cursor": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Get Resource Tags

GET
/v1/orgs/{org_id}/workspaces/{workspace_id}/resources/{resource_type}/{resource_id}/tags

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

resource_type*ResourceType

Resource type

Value in"secret" | "source" | "augmentation" | "endpoint" | "app" | "model_instance" | "prompt" | "namespace" | "thread"
resource_id*Resource Id

Resource ID

Header Parameters

authorization?string|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/orgs/string/workspaces/string/resources/secret/string/tags"
{
  "resource_type": "string",
  "resource_id": "string",
  "tags": [
    {
      "tag_id": "string",
      "workspace_id": "string",
      "name": "string",
      "color": "string",
      "description": "string",
      "icon": "string",
      "usage_count": 0,
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Add Tags To Resource

POST
/v1/orgs/{org_id}/workspaces/{workspace_id}/resources/{resource_type}/{resource_id}/tags

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

resource_type*ResourceType

Resource type

Value in"secret" | "source" | "augmentation" | "endpoint" | "app" | "model_instance" | "prompt" | "namespace" | "thread"
resource_id*Resource Id

Resource 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/resources/secret/string/tags" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Set Resource Tags

PUT
/v1/orgs/{org_id}/workspaces/{workspace_id}/resources/{resource_type}/{resource_id}/tags

Path Parameters

org_id*Org Id
workspace_id*Workspace Id

Workspace ID

resource_type*ResourceType

Resource type

Value in"secret" | "source" | "augmentation" | "endpoint" | "app" | "model_instance" | "prompt" | "namespace" | "thread"
resource_id*Resource Id

Resource 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/resources/secret/string/tags" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
{
  "resource_type": "string",
  "resource_id": "string",
  "tags": [
    {
      "tag_id": "string",
      "workspace_id": "string",
      "name": "string",
      "color": "string",
      "description": "string",
      "icon": "string",
      "usage_count": 0,
      "created_by": "string",
      "created_at": "string",
      "updated_at": "string"
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}