Classes

Resource classes and data classes.

5 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

List the data classes

GET /api/v1/account/organizations/{id}/data_classes
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • classes array[string]

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/data_classes' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "classes": [
    "string"
  ]
}

Create a data class

POST /api/v1/account/organizations/{id}/data_classes
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Request body application/json required

  • class string
  • created_at string<date-time>
  • id string<uuid>
  • updated_at string<date-time>

Response 200 OK application/json

  • class string
  • created_at string<date-time>
  • id string<uuid>
  • updated_at string<date-time>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/account/organizations/{id}/data_classes' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "class": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "updated_at": "2026-01-01T00:00:00Z"
}'

Response 200

{
  "class": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "updated_at": "2026-01-01T00:00:00Z"
}

Search the data classes

GET /api/v1/account/organizations/{id}/data_classes/search
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Query parameters

  • name string required
    Data class name to search for.

Response 200 OK application/json

  • classes array[string]

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/data_classes/search' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "classes": [
    "string"
  ]
}

Delete a data class

DELETE /api/v1/account/organizations/{id}/data_classes/{name}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • name string required

Response 200 OK application/json

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/data_classes/{name}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{}

List the resource classes

GET /api/v1/resource_classes
Badge

Response 200 OK application/json

  • classes map[array[string]]

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/resource_classes' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "classes": {
    "key": [
      "string"
    ]
  }
}