Skip to content

Operations ​

Operations represent action types (e.g. read, write, delete) used in the permission system to define what a role is allowed to do on a resource.

How It Works ​

Operations define the type of action a permission grants on a resource. They are paired with a resource in a scope to express "this route allows performing operation X on resource Y". Create operations before creating scopes. Seeded operations are core and cannot be archived.

Search Operations ​

POST /gatelin/operations/search
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "pagination": true,
  "first": 0,
  "limit": 10,
  "sortField": "id",
  "sortOrder": "ASC",
  "filters": {
    "name": {
      "value": "read",
      "matchMode": "contains"
    }
  }
}

Get Operation History ​

GET /gatelin/operations/:id/history
Authorization: Bearer <access_token>

Create Operation ​

POST /gatelin/operations
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    {
      "name": "read",
      "description": "Read access",
      "color": "#4B0082"
    }
  ]
}

Response (201 Created)

Update Operation ​

PUT /gatelin/operations
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    {
      "id": 1,
      "name": "read",
      "description": "Read-only access",
      "color": "#0000FF"
    }
  ]
}

Response (200 OK)

Archive Operations ​

POST /gatelin/operations/archive
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    { "id": 1 },
    { "id": 2 },
    { "id": 3 }
  ]
}

Response (204 No Content)

The 13 seeded catalog operations (read, list, create, and the rest marked core) cannot be archived. Permissions and route_operation CASCADE from operation, so a later retention hard-delete would wipe system grants. Custom operations still archive and are purged after 2 months.

Published and maintained by ALTEN