AplasAplas API Reference

Update an asset type

id is not patchable, for built-in and custom types alike — the slug is referenced from asset data and from studio URLs. Built-in types are otherwise editable; only their deletion is refused.

Removing a fieldSpec, or changing its type, when assets already carry values for it is DESTRUCTIVE and is refused with a 409 unless confirmDestructive is true. The refusal names each affected field and how many assets it touches.

PATCH
/workspaces/{workspaceId}/asset-types/{typeId}

Authorization

BearerAuth
AuthorizationBearer <token>

API authentication via Authorization: Bearer <your-api-key>. Obtain your API key from Config → API in the Aplas web app.

In: header

Path Parameters

workspaceId*string

The workspace's slug.

typeId*string

The asset type's slug.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.au.aplas.com/api/v3/workspaces/string/asset-types/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "application",
  "nameSingular": "string",
  "namePlural": "string",
  "description": "string",
  "icon": "string",
  "color": "string",
  "isBuiltIn": true,
  "fieldSpecs": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string",
      "options": [
        {
          "value": "string",
          "label": "string"
        }
      ],
      "subType": "string",
      "min": 0,
      "max": 0
    }
  ],
  "viewRules": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "The permissions of your API key only allow read-only/GET calls."
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "The permissions of your API key only allow read-only/GET calls."
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "The permissions of your API key only allow read-only/GET calls."
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "The permissions of your API key only allow read-only/GET calls."
}
{
  "statusCode": 403,
  "error": "Forbidden",
  "message": "The permissions of your API key only allow read-only/GET calls."
}