GET /api/v2/admin/user_roles
Get all user roles, included users

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Examples

// Successful request
GET /api/v2/admin/user_roles
200
{
  "user_roles": [
    {
      "id": 1,
      "name": "admin",
      "created_at": "2023-11-27T09:42:35.117Z",
      "updated_at": "2023-11-27T09:42:35.289Z",
      "description": "System default",
      "users": [
        {
          "id": 57,
          "email": "admin-user-53@example.com",
          "company": null,
          "first_name": null,
          "last_name": null
        }
      ],
      "permissions": [
        {
          "id": 1,
          "rule": "ASSET_CREATE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.144Z",
          "updated_at": "2023-11-27T09:42:35.562Z",
          "description": "Create and add media",
          "requires": []
        },
        {
          "id": 2,
          "rule": "ASSET_UPLOAD",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.148Z",
          "updated_at": "2023-11-27T09:42:35.567Z",
          "description": "Upload to placeholders",
          "requires": []
        },
        {
          "id": 3,
          "rule": "ASSET_EDIT",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.152Z",
          "updated_at": "2023-11-27T09:42:35.572Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 4,
          "rule": "ASSET_MOVE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.156Z",
          "updated_at": "2023-11-27T09:42:35.576Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 5,
          "rule": "ASSET_DELETE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.160Z",
          "updated_at": "2023-11-27T09:42:35.580Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 6,
          "rule": "ASSET_REMOVE_MEDIA",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.163Z",
          "updated_at": "2023-11-27T09:42:35.585Z",
          "description": "Remove media",
          "requires": []
        },
        {
          "id": 7,
          "rule": "ASSET_EDIT_CUSTOM_FIELDS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.167Z",
          "updated_at": "2023-11-27T09:42:35.589Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 8,
          "rule": "ASSET_REVIEW_CREATE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.170Z",
          "updated_at": "2023-11-27T09:42:35.593Z",
          "description": "Create approval",
          "requires": []
        },
        {
          "id": 9,
          "rule": "ASSET_REVIEW",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.174Z",
          "updated_at": "2023-11-27T09:42:35.598Z",
          "description": "Approve or reject",
          "requires": []
        },
        {
          "id": 10,
          "rule": "ASSET_SHARE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.177Z",
          "updated_at": "2023-11-27T09:42:35.602Z",
          "description": "Share",
          "requires": []
        },
        {
          "id": 11,
          "rule": "ASSET_CREATE_SHAREABLE_LINK",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.182Z",
          "updated_at": "2023-11-27T09:42:35.606Z",
          "description": "Create shareable link",
          "requires": []
        },
        {
          "id": 12,
          "rule": "ASSET_EDIT_ARTICLE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.186Z",
          "updated_at": "2023-11-27T09:42:35.611Z",
          "description": "Edit article",
          "requires": []
        },
        {
          "id": 13,
          "rule": "ASSET_CROP",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.190Z",
          "updated_at": "2023-11-27T09:42:35.615Z",
          "description": "Crop",
          "requires": []
        },
        {
          "id": 14,
          "rule": "PROJECT_CREATE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.193Z",
          "updated_at": "2023-11-27T09:42:35.619Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 15,
          "rule": "PROJECT_EDIT",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.196Z",
          "updated_at": "2023-11-27T09:42:35.624Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 16,
          "rule": "PROJECT_MOVE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.200Z",
          "updated_at": "2023-11-27T09:42:35.628Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 17,
          "rule": "PROJECT_DELETE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.203Z",
          "updated_at": "2023-11-27T09:42:35.632Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 18,
          "rule": "PROJECT_EDIT_CUSTOM_FIELDS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.206Z",
          "updated_at": "2023-11-27T09:42:35.637Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 19,
          "rule": "PROJECT_EDIT_MEMBERS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.209Z",
          "updated_at": "2023-11-27T09:42:35.641Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 20,
          "rule": "PROJECT_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.212Z",
          "updated_at": "2023-11-27T09:42:35.645Z",
          "description": "See public projects",
          "requires": []
        },
        {
          "id": 21,
          "rule": "COLLECTION_CREATE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.216Z",
          "updated_at": "2023-11-27T09:42:35.650Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 22,
          "rule": "COLLECTION_EDIT",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.219Z",
          "updated_at": "2023-11-27T09:42:35.654Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 23,
          "rule": "COLLECTION_ADD_ASSET",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.222Z",
          "updated_at": "2023-11-27T09:42:35.658Z",
          "description": "Add assets",
          "requires": []
        },
        {
          "id": 24,
          "rule": "COLLECTION_REMOVE_ASSET",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.225Z",
          "updated_at": "2023-11-27T09:42:35.663Z",
          "description": "Remove assets",
          "requires": []
        },
        {
          "id": 25,
          "rule": "COLLECTION_DELETE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.229Z",
          "updated_at": "2023-11-27T09:42:35.667Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 26,
          "rule": "COLLECTION_EDIT_MEMBERS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.234Z",
          "updated_at": "2023-11-27T09:42:35.671Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 27,
          "rule": "COLLECTION_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.238Z",
          "updated_at": "2023-11-27T09:42:35.676Z",
          "description": "See public collections",
          "requires": []
        },
        {
          "id": 28,
          "rule": "DROP_FOLDER_CREATE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.243Z",
          "updated_at": "2023-11-27T09:42:35.680Z",
          "description": "Create",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 29,
          "rule": "DROP_FOLDER_EDIT",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.248Z",
          "updated_at": "2023-11-27T09:42:35.684Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 30,
          "rule": "DROP_FOLDER_ADD_ASSETS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.252Z",
          "updated_at": "2023-11-27T09:42:35.689Z",
          "description": "Add assets",
          "requires": []
        },
        {
          "id": 31,
          "rule": "DROP_FOLDER_DELETE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.257Z",
          "updated_at": "2023-11-27T09:42:35.693Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 32,
          "rule": "DROP_FOLDER_EDIT_MEMBERS",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.261Z",
          "updated_at": "2023-11-27T09:42:35.697Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 33,
          "rule": "DROP_FOLDER_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.265Z",
          "updated_at": "2023-11-27T09:42:35.701Z",
          "description": "See public drop folders",
          "requires": []
        },
        {
          "id": 34,
          "rule": "LOADER_VIEW",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.268Z",
          "updated_at": "2023-11-27T09:42:35.706Z",
          "description": "View the list of loaders",
          "requires": []
        },
        {
          "id": 35,
          "rule": "LOADER_MONITOR",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.272Z",
          "updated_at": "2023-11-27T09:42:35.710Z",
          "description": "Monitor",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 36,
          "rule": "LOADER_RESTORE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.275Z",
          "updated_at": "2023-11-27T09:42:35.714Z",
          "description": "Restore",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 37,
          "rule": "PLUGIN_ENABLE",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.278Z",
          "updated_at": "2023-11-27T09:42:35.718Z",
          "description": "Enable plugins",
          "requires": []
        },
        {
          "id": 38,
          "rule": "ACTIONS_VIEW",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.282Z",
          "updated_at": "2023-11-27T09:42:35.723Z",
          "description": "View actions",
          "requires": []
        },
        {
          "id": 39,
          "rule": "ACTIONS_START",
          "has_permission": true,
          "user_role_id": 1,
          "created_at": "2023-11-27T09:42:35.285Z",
          "updated_at": "2023-11-27T09:42:35.728Z",
          "description": "Launch actions",
          "requires": [
            "ACTIONS_VIEW"
          ]
        }
      ]
    },
    {
      "id": 2,
      "name": "default",
      "created_at": "2023-11-27T09:42:35.293Z",
      "updated_at": "2023-11-27T09:42:35.425Z",
      "description": "System default",
      "users": [],
      "permissions": [
        {
          "id": 44,
          "rule": "ASSET_DELETE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.310Z",
          "updated_at": "2023-11-27T09:42:35.310Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 48,
          "rule": "ASSET_REVIEW",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.323Z",
          "updated_at": "2023-11-27T09:42:35.323Z",
          "description": "Approve or reject",
          "requires": []
        },
        {
          "id": 55,
          "rule": "PROJECT_MOVE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.346Z",
          "updated_at": "2023-11-27T09:42:35.346Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 56,
          "rule": "PROJECT_DELETE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.350Z",
          "updated_at": "2023-11-27T09:42:35.350Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 58,
          "rule": "PROJECT_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.356Z",
          "updated_at": "2023-11-27T09:42:35.356Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 65,
          "rule": "COLLECTION_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.379Z",
          "updated_at": "2023-11-27T09:42:35.379Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 70,
          "rule": "DROP_FOLDER_DELETE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.396Z",
          "updated_at": "2023-11-27T09:42:35.396Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 71,
          "rule": "DROP_FOLDER_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.399Z",
          "updated_at": "2023-11-27T09:42:35.399Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 74,
          "rule": "LOADER_MONITOR",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.409Z",
          "updated_at": "2023-11-27T09:42:35.409Z",
          "description": "Monitor",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 75,
          "rule": "LOADER_RESTORE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.412Z",
          "updated_at": "2023-11-27T09:42:35.412Z",
          "description": "Restore",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 76,
          "rule": "PLUGIN_ENABLE",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.416Z",
          "updated_at": "2023-11-27T09:42:35.416Z",
          "description": "Enable plugins",
          "requires": []
        },
        {
          "id": 77,
          "rule": "ACTIONS_VIEW",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.419Z",
          "updated_at": "2023-11-27T09:42:35.419Z",
          "description": "View actions",
          "requires": []
        },
        {
          "id": 78,
          "rule": "ACTIONS_START",
          "has_permission": false,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.422Z",
          "updated_at": "2023-11-27T09:42:35.422Z",
          "description": "Launch actions",
          "requires": [
            "ACTIONS_VIEW"
          ]
        },
        {
          "id": 40,
          "rule": "ASSET_CREATE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.296Z",
          "updated_at": "2023-11-27T09:42:35.733Z",
          "description": "Create and add media",
          "requires": []
        },
        {
          "id": 41,
          "rule": "ASSET_UPLOAD",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.300Z",
          "updated_at": "2023-11-27T09:42:35.737Z",
          "description": "Upload to placeholders",
          "requires": []
        },
        {
          "id": 42,
          "rule": "ASSET_EDIT",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.303Z",
          "updated_at": "2023-11-27T09:42:35.742Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 43,
          "rule": "ASSET_MOVE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.306Z",
          "updated_at": "2023-11-27T09:42:35.746Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 45,
          "rule": "ASSET_REMOVE_MEDIA",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.313Z",
          "updated_at": "2023-11-27T09:42:35.753Z",
          "description": "Remove media",
          "requires": []
        },
        {
          "id": 46,
          "rule": "ASSET_EDIT_CUSTOM_FIELDS",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.316Z",
          "updated_at": "2023-11-27T09:42:35.759Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 47,
          "rule": "ASSET_REVIEW_CREATE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.320Z",
          "updated_at": "2023-11-27T09:42:35.766Z",
          "description": "Create approval",
          "requires": []
        },
        {
          "id": 49,
          "rule": "ASSET_SHARE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.326Z",
          "updated_at": "2023-11-27T09:42:35.772Z",
          "description": "Share",
          "requires": []
        },
        {
          "id": 50,
          "rule": "ASSET_CREATE_SHAREABLE_LINK",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.330Z",
          "updated_at": "2023-11-27T09:42:35.777Z",
          "description": "Create shareable link",
          "requires": []
        },
        {
          "id": 51,
          "rule": "ASSET_EDIT_ARTICLE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.333Z",
          "updated_at": "2023-11-27T09:42:35.782Z",
          "description": "Edit article",
          "requires": []
        },
        {
          "id": 52,
          "rule": "ASSET_CROP",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.336Z",
          "updated_at": "2023-11-27T09:42:35.787Z",
          "description": "Crop",
          "requires": []
        },
        {
          "id": 53,
          "rule": "PROJECT_CREATE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.340Z",
          "updated_at": "2023-11-27T09:42:35.792Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 54,
          "rule": "PROJECT_EDIT",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.343Z",
          "updated_at": "2023-11-27T09:42:35.797Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 57,
          "rule": "PROJECT_EDIT_CUSTOM_FIELDS",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.353Z",
          "updated_at": "2023-11-27T09:42:35.805Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 59,
          "rule": "PROJECT_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.359Z",
          "updated_at": "2023-11-27T09:42:35.811Z",
          "description": "See public projects",
          "requires": []
        },
        {
          "id": 60,
          "rule": "COLLECTION_CREATE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.363Z",
          "updated_at": "2023-11-27T09:42:35.816Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 61,
          "rule": "COLLECTION_EDIT",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.366Z",
          "updated_at": "2023-11-27T09:42:35.821Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 62,
          "rule": "COLLECTION_ADD_ASSET",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.369Z",
          "updated_at": "2023-11-27T09:42:35.826Z",
          "description": "Add assets",
          "requires": []
        },
        {
          "id": 63,
          "rule": "COLLECTION_REMOVE_ASSET",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.373Z",
          "updated_at": "2023-11-27T09:42:35.831Z",
          "description": "Remove assets",
          "requires": []
        },
        {
          "id": 64,
          "rule": "COLLECTION_DELETE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.376Z",
          "updated_at": "2023-11-27T09:42:35.835Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 66,
          "rule": "COLLECTION_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.383Z",
          "updated_at": "2023-11-27T09:42:35.841Z",
          "description": "See public collections",
          "requires": []
        },
        {
          "id": 67,
          "rule": "DROP_FOLDER_CREATE",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.386Z",
          "updated_at": "2023-11-27T09:42:35.846Z",
          "description": "Create",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 68,
          "rule": "DROP_FOLDER_EDIT",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.389Z",
          "updated_at": "2023-11-27T09:42:35.851Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 69,
          "rule": "DROP_FOLDER_ADD_ASSETS",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.392Z",
          "updated_at": "2023-11-27T09:42:35.856Z",
          "description": "Add assets",
          "requires": []
        },
        {
          "id": 72,
          "rule": "DROP_FOLDER_SEE_PUBLIC",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.403Z",
          "updated_at": "2023-11-27T09:42:35.863Z",
          "description": "See public drop folders",
          "requires": []
        },
        {
          "id": 73,
          "rule": "LOADER_VIEW",
          "has_permission": true,
          "user_role_id": 2,
          "created_at": "2023-11-27T09:42:35.406Z",
          "updated_at": "2023-11-27T09:42:35.868Z",
          "description": "View the list of loaders",
          "requires": []
        }
      ]
    },
    {
      "id": 3,
      "name": "guest",
      "created_at": "2023-11-27T09:42:35.429Z",
      "updated_at": "2023-11-27T09:42:35.553Z",
      "description": "System default",
      "users": [],
      "permissions": [
        {
          "id": 81,
          "rule": "ASSET_EDIT",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.438Z",
          "updated_at": "2023-11-27T09:42:35.438Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 82,
          "rule": "ASSET_MOVE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.441Z",
          "updated_at": "2023-11-27T09:42:35.441Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 83,
          "rule": "ASSET_DELETE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.444Z",
          "updated_at": "2023-11-27T09:42:35.444Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 84,
          "rule": "ASSET_REMOVE_MEDIA",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.447Z",
          "updated_at": "2023-11-27T09:42:35.447Z",
          "description": "Remove media",
          "requires": []
        },
        {
          "id": 85,
          "rule": "ASSET_EDIT_CUSTOM_FIELDS",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.450Z",
          "updated_at": "2023-11-27T09:42:35.450Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 86,
          "rule": "ASSET_REVIEW_CREATE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.453Z",
          "updated_at": "2023-11-27T09:42:35.453Z",
          "description": "Create approval",
          "requires": []
        },
        {
          "id": 87,
          "rule": "ASSET_REVIEW",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.456Z",
          "updated_at": "2023-11-27T09:42:35.456Z",
          "description": "Approve or reject",
          "requires": []
        },
        {
          "id": 88,
          "rule": "ASSET_SHARE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.459Z",
          "updated_at": "2023-11-27T09:42:35.459Z",
          "description": "Share",
          "requires": []
        },
        {
          "id": 89,
          "rule": "ASSET_CREATE_SHAREABLE_LINK",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.462Z",
          "updated_at": "2023-11-27T09:42:35.462Z",
          "description": "Create shareable link",
          "requires": []
        },
        {
          "id": 90,
          "rule": "ASSET_EDIT_ARTICLE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.466Z",
          "updated_at": "2023-11-27T09:42:35.466Z",
          "description": "Edit article",
          "requires": []
        },
        {
          "id": 91,
          "rule": "ASSET_CROP",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.469Z",
          "updated_at": "2023-11-27T09:42:35.469Z",
          "description": "Crop",
          "requires": []
        },
        {
          "id": 92,
          "rule": "PROJECT_CREATE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.472Z",
          "updated_at": "2023-11-27T09:42:35.472Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 93,
          "rule": "PROJECT_EDIT",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.475Z",
          "updated_at": "2023-11-27T09:42:35.475Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 94,
          "rule": "PROJECT_MOVE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.478Z",
          "updated_at": "2023-11-27T09:42:35.478Z",
          "description": "Move",
          "requires": []
        },
        {
          "id": 95,
          "rule": "PROJECT_DELETE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.481Z",
          "updated_at": "2023-11-27T09:42:35.481Z",
          "description": "Delete and restore",
          "requires": []
        },
        {
          "id": 96,
          "rule": "PROJECT_EDIT_CUSTOM_FIELDS",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.484Z",
          "updated_at": "2023-11-27T09:42:35.484Z",
          "description": "Edit custom fields",
          "requires": []
        },
        {
          "id": 97,
          "rule": "PROJECT_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.487Z",
          "updated_at": "2023-11-27T09:42:35.487Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 98,
          "rule": "PROJECT_SEE_PUBLIC",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.490Z",
          "updated_at": "2023-11-27T09:42:35.490Z",
          "description": "See public projects",
          "requires": []
        },
        {
          "id": 99,
          "rule": "COLLECTION_CREATE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.493Z",
          "updated_at": "2023-11-27T09:42:35.493Z",
          "description": "Create",
          "requires": []
        },
        {
          "id": 100,
          "rule": "COLLECTION_EDIT",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.496Z",
          "updated_at": "2023-11-27T09:42:35.496Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 101,
          "rule": "COLLECTION_ADD_ASSET",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.500Z",
          "updated_at": "2023-11-27T09:42:35.500Z",
          "description": "Add assets",
          "requires": []
        },
        {
          "id": 102,
          "rule": "COLLECTION_REMOVE_ASSET",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.503Z",
          "updated_at": "2023-11-27T09:42:35.503Z",
          "description": "Remove assets",
          "requires": []
        },
        {
          "id": 103,
          "rule": "COLLECTION_DELETE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.506Z",
          "updated_at": "2023-11-27T09:42:35.506Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 104,
          "rule": "COLLECTION_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.509Z",
          "updated_at": "2023-11-27T09:42:35.509Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 105,
          "rule": "COLLECTION_SEE_PUBLIC",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.512Z",
          "updated_at": "2023-11-27T09:42:35.512Z",
          "description": "See public collections",
          "requires": []
        },
        {
          "id": 106,
          "rule": "DROP_FOLDER_CREATE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.515Z",
          "updated_at": "2023-11-27T09:42:35.515Z",
          "description": "Create",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 107,
          "rule": "DROP_FOLDER_EDIT",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.518Z",
          "updated_at": "2023-11-27T09:42:35.518Z",
          "description": "Edit details",
          "requires": []
        },
        {
          "id": 109,
          "rule": "DROP_FOLDER_DELETE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.525Z",
          "updated_at": "2023-11-27T09:42:35.525Z",
          "description": "Delete",
          "requires": []
        },
        {
          "id": 110,
          "rule": "DROP_FOLDER_EDIT_MEMBERS",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.528Z",
          "updated_at": "2023-11-27T09:42:35.528Z",
          "description": "Edit members",
          "requires": []
        },
        {
          "id": 111,
          "rule": "DROP_FOLDER_SEE_PUBLIC",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.531Z",
          "updated_at": "2023-11-27T09:42:35.531Z",
          "description": "See public drop folders",
          "requires": []
        },
        {
          "id": 112,
          "rule": "LOADER_VIEW",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.534Z",
          "updated_at": "2023-11-27T09:42:35.534Z",
          "description": "View the list of loaders",
          "requires": []
        },
        {
          "id": 113,
          "rule": "LOADER_MONITOR",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.537Z",
          "updated_at": "2023-11-27T09:42:35.537Z",
          "description": "Monitor",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 114,
          "rule": "LOADER_RESTORE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.541Z",
          "updated_at": "2023-11-27T09:42:35.541Z",
          "description": "Restore",
          "requires": [
            "LOADER_VIEW"
          ]
        },
        {
          "id": 115,
          "rule": "PLUGIN_ENABLE",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.544Z",
          "updated_at": "2023-11-27T09:42:35.544Z",
          "description": "Enable plugins",
          "requires": []
        },
        {
          "id": 116,
          "rule": "ACTIONS_VIEW",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.547Z",
          "updated_at": "2023-11-27T09:42:35.547Z",
          "description": "View actions",
          "requires": []
        },
        {
          "id": 117,
          "rule": "ACTIONS_START",
          "has_permission": false,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.550Z",
          "updated_at": "2023-11-27T09:42:35.550Z",
          "description": "Launch actions",
          "requires": [
            "ACTIONS_VIEW"
          ]
        },
        {
          "id": 79,
          "rule": "ASSET_CREATE",
          "has_permission": true,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.432Z",
          "updated_at": "2023-11-27T09:42:35.880Z",
          "description": "Create and add media",
          "requires": []
        },
        {
          "id": 80,
          "rule": "ASSET_UPLOAD",
          "has_permission": true,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.435Z",
          "updated_at": "2023-11-27T09:42:35.884Z",
          "description": "Upload to placeholders",
          "requires": []
        },
        {
          "id": 108,
          "rule": "DROP_FOLDER_ADD_ASSETS",
          "has_permission": true,
          "user_role_id": 3,
          "created_at": "2023-11-27T09:42:35.521Z",
          "updated_at": "2023-11-27T09:42:35.928Z",
          "description": "Add assets",
          "requires": []
        }
      ]
    }
  ]
}
// Not admin user
GET /api/v2/admin/user_roles
401

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/user_roles
Create new user role

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

user role name

Validations:

  • Must be a String

description
optional

user role description

Validations:

  • Must be a String

Examples

// Not admin user
POST /api/v2/admin/user_roles
401
// Successful request
POST /api/v2/admin/user_roles
{
  "name": "Sample UserRole",
  "description": "Some description for UserRole"
}
200
{
  "user_role": {
    "id": 4,
    "name": "Sample UserRole",
    "created_at": "2023-11-27T09:42:49.036Z",
    "updated_at": "2023-11-27T09:42:49.036Z",
    "description": "Some description for UserRole",
    "users": [],
    "permissions": [
      {
        "id": 118,
        "rule": "ASSET_CREATE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.042Z",
        "updated_at": "2023-11-27T09:42:49.042Z",
        "description": "Create and add media",
        "requires": []
      },
      {
        "id": 119,
        "rule": "ASSET_UPLOAD",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.046Z",
        "updated_at": "2023-11-27T09:42:49.046Z",
        "description": "Upload to placeholders",
        "requires": []
      },
      {
        "id": 120,
        "rule": "ASSET_EDIT",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.054Z",
        "updated_at": "2023-11-27T09:42:49.054Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 121,
        "rule": "ASSET_MOVE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.060Z",
        "updated_at": "2023-11-27T09:42:49.060Z",
        "description": "Move",
        "requires": []
      },
      {
        "id": 122,
        "rule": "ASSET_DELETE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.067Z",
        "updated_at": "2023-11-27T09:42:49.067Z",
        "description": "Delete and restore",
        "requires": []
      },
      {
        "id": 123,
        "rule": "ASSET_REMOVE_MEDIA",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.073Z",
        "updated_at": "2023-11-27T09:42:49.073Z",
        "description": "Remove media",
        "requires": []
      },
      {
        "id": 124,
        "rule": "ASSET_EDIT_CUSTOM_FIELDS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.079Z",
        "updated_at": "2023-11-27T09:42:49.079Z",
        "description": "Edit custom fields",
        "requires": []
      },
      {
        "id": 125,
        "rule": "ASSET_REVIEW_CREATE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.086Z",
        "updated_at": "2023-11-27T09:42:49.086Z",
        "description": "Create approval",
        "requires": []
      },
      {
        "id": 126,
        "rule": "ASSET_REVIEW",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.092Z",
        "updated_at": "2023-11-27T09:42:49.092Z",
        "description": "Approve or reject",
        "requires": []
      },
      {
        "id": 127,
        "rule": "ASSET_SHARE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.099Z",
        "updated_at": "2023-11-27T09:42:49.099Z",
        "description": "Share",
        "requires": []
      },
      {
        "id": 128,
        "rule": "ASSET_CREATE_SHAREABLE_LINK",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.105Z",
        "updated_at": "2023-11-27T09:42:49.105Z",
        "description": "Create shareable link",
        "requires": []
      },
      {
        "id": 129,
        "rule": "ASSET_EDIT_ARTICLE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.113Z",
        "updated_at": "2023-11-27T09:42:49.113Z",
        "description": "Edit article",
        "requires": []
      },
      {
        "id": 130,
        "rule": "ASSET_CROP",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.120Z",
        "updated_at": "2023-11-27T09:42:49.120Z",
        "description": "Crop",
        "requires": []
      },
      {
        "id": 131,
        "rule": "PROJECT_CREATE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.126Z",
        "updated_at": "2023-11-27T09:42:49.126Z",
        "description": "Create",
        "requires": []
      },
      {
        "id": 132,
        "rule": "PROJECT_EDIT",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.133Z",
        "updated_at": "2023-11-27T09:42:49.133Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 133,
        "rule": "PROJECT_MOVE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.138Z",
        "updated_at": "2023-11-27T09:42:49.138Z",
        "description": "Move",
        "requires": []
      },
      {
        "id": 134,
        "rule": "PROJECT_DELETE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.143Z",
        "updated_at": "2023-11-27T09:42:49.143Z",
        "description": "Delete and restore",
        "requires": []
      },
      {
        "id": 135,
        "rule": "PROJECT_EDIT_CUSTOM_FIELDS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.147Z",
        "updated_at": "2023-11-27T09:42:49.147Z",
        "description": "Edit custom fields",
        "requires": []
      },
      {
        "id": 136,
        "rule": "PROJECT_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.151Z",
        "updated_at": "2023-11-27T09:42:49.151Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 137,
        "rule": "PROJECT_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.156Z",
        "updated_at": "2023-11-27T09:42:49.156Z",
        "description": "See public projects",
        "requires": []
      },
      {
        "id": 138,
        "rule": "COLLECTION_CREATE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.162Z",
        "updated_at": "2023-11-27T09:42:49.162Z",
        "description": "Create",
        "requires": []
      },
      {
        "id": 139,
        "rule": "COLLECTION_EDIT",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.168Z",
        "updated_at": "2023-11-27T09:42:49.168Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 140,
        "rule": "COLLECTION_ADD_ASSET",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.174Z",
        "updated_at": "2023-11-27T09:42:49.174Z",
        "description": "Add assets",
        "requires": []
      },
      {
        "id": 141,
        "rule": "COLLECTION_REMOVE_ASSET",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.180Z",
        "updated_at": "2023-11-27T09:42:49.180Z",
        "description": "Remove assets",
        "requires": []
      },
      {
        "id": 142,
        "rule": "COLLECTION_DELETE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.186Z",
        "updated_at": "2023-11-27T09:42:49.186Z",
        "description": "Delete",
        "requires": []
      },
      {
        "id": 143,
        "rule": "COLLECTION_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.191Z",
        "updated_at": "2023-11-27T09:42:49.191Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 144,
        "rule": "COLLECTION_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.197Z",
        "updated_at": "2023-11-27T09:42:49.197Z",
        "description": "See public collections",
        "requires": []
      },
      {
        "id": 145,
        "rule": "DROP_FOLDER_CREATE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.202Z",
        "updated_at": "2023-11-27T09:42:49.202Z",
        "description": "Create",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 146,
        "rule": "DROP_FOLDER_EDIT",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.208Z",
        "updated_at": "2023-11-27T09:42:49.208Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 147,
        "rule": "DROP_FOLDER_ADD_ASSETS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.214Z",
        "updated_at": "2023-11-27T09:42:49.214Z",
        "description": "Add assets",
        "requires": []
      },
      {
        "id": 148,
        "rule": "DROP_FOLDER_DELETE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.219Z",
        "updated_at": "2023-11-27T09:42:49.219Z",
        "description": "Delete",
        "requires": []
      },
      {
        "id": 149,
        "rule": "DROP_FOLDER_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.224Z",
        "updated_at": "2023-11-27T09:42:49.224Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 150,
        "rule": "DROP_FOLDER_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.230Z",
        "updated_at": "2023-11-27T09:42:49.230Z",
        "description": "See public drop folders",
        "requires": []
      },
      {
        "id": 151,
        "rule": "LOADER_VIEW",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.236Z",
        "updated_at": "2023-11-27T09:42:49.236Z",
        "description": "View the list of loaders",
        "requires": []
      },
      {
        "id": 152,
        "rule": "LOADER_MONITOR",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.242Z",
        "updated_at": "2023-11-27T09:42:49.242Z",
        "description": "Monitor",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 153,
        "rule": "LOADER_RESTORE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.249Z",
        "updated_at": "2023-11-27T09:42:49.249Z",
        "description": "Restore",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 154,
        "rule": "PLUGIN_ENABLE",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.255Z",
        "updated_at": "2023-11-27T09:42:49.255Z",
        "description": "Enable plugins",
        "requires": []
      },
      {
        "id": 155,
        "rule": "ACTIONS_VIEW",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.260Z",
        "updated_at": "2023-11-27T09:42:49.260Z",
        "description": "View actions",
        "requires": []
      },
      {
        "id": 156,
        "rule": "ACTIONS_START",
        "has_permission": false,
        "user_role_id": 4,
        "created_at": "2023-11-27T09:42:49.266Z",
        "updated_at": "2023-11-27T09:42:49.266Z",
        "description": "Launch actions",
        "requires": [
          "ACTIONS_VIEW"
        ]
      }
    ]
  }
}
// With duplicate name
POST /api/v2/admin/user_roles
{
  "name": "admin",
  "description": "Testing duplicate name"
}
400
{
  "error": "Name has already been taken"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

DELETE /api/v2/admin/user_roles/:user_role_id
Delete user role

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Examples

// Not admin user
DELETE /api/v2/admin/user_roles/:user_role_id
401
// User role not found
DELETE /api/v2/admin/user_roles/not-found-id
404
{
  "error": "UserRole not found"
}
// Successful request
DELETE /api/v2/admin/user_roles/6
200
{
  "ok": "UserRole deleted"
}
// User role is system default role
DELETE /api/v2/admin/user_roles/1
400
{
  "error": "can't delete system default role, user role contains users"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/user_roles/:user_role_id
Update user role

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

user role name

Validations:

  • Must be a String

description
optional

user role description

Validations:

  • Must be a String

Examples

// Not admin user
POST /api/v2/admin/user_roles/:user_role_id
401
// User role not found
POST /api/v2/admin/user_roles/not-found-id
404
{
  "error": "UserRole not found"
}
// Successful request
POST /api/v2/admin/user_roles/5
{
  "name": "updated name"
}
200
{
  "user_role": {
    "name": "updated name",
    "id": 5,
    "created_at": "2023-11-27T09:42:49.675Z",
    "updated_at": "2023-11-27T09:42:49.937Z",
    "description": null,
    "users": [],
    "permissions": [
      {
        "id": 157,
        "rule": "ASSET_CREATE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.680Z",
        "updated_at": "2023-11-27T09:42:49.680Z",
        "description": "Create and add media",
        "requires": []
      },
      {
        "id": 158,
        "rule": "ASSET_UPLOAD",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.686Z",
        "updated_at": "2023-11-27T09:42:49.686Z",
        "description": "Upload to placeholders",
        "requires": []
      },
      {
        "id": 159,
        "rule": "ASSET_EDIT",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.691Z",
        "updated_at": "2023-11-27T09:42:49.691Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 160,
        "rule": "ASSET_MOVE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.696Z",
        "updated_at": "2023-11-27T09:42:49.696Z",
        "description": "Move",
        "requires": []
      },
      {
        "id": 161,
        "rule": "ASSET_DELETE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.701Z",
        "updated_at": "2023-11-27T09:42:49.701Z",
        "description": "Delete and restore",
        "requires": []
      },
      {
        "id": 162,
        "rule": "ASSET_REMOVE_MEDIA",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.706Z",
        "updated_at": "2023-11-27T09:42:49.706Z",
        "description": "Remove media",
        "requires": []
      },
      {
        "id": 163,
        "rule": "ASSET_EDIT_CUSTOM_FIELDS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.712Z",
        "updated_at": "2023-11-27T09:42:49.712Z",
        "description": "Edit custom fields",
        "requires": []
      },
      {
        "id": 164,
        "rule": "ASSET_REVIEW_CREATE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.717Z",
        "updated_at": "2023-11-27T09:42:49.717Z",
        "description": "Create approval",
        "requires": []
      },
      {
        "id": 165,
        "rule": "ASSET_REVIEW",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.722Z",
        "updated_at": "2023-11-27T09:42:49.722Z",
        "description": "Approve or reject",
        "requires": []
      },
      {
        "id": 166,
        "rule": "ASSET_SHARE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.726Z",
        "updated_at": "2023-11-27T09:42:49.726Z",
        "description": "Share",
        "requires": []
      },
      {
        "id": 167,
        "rule": "ASSET_CREATE_SHAREABLE_LINK",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.730Z",
        "updated_at": "2023-11-27T09:42:49.730Z",
        "description": "Create shareable link",
        "requires": []
      },
      {
        "id": 168,
        "rule": "ASSET_EDIT_ARTICLE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.735Z",
        "updated_at": "2023-11-27T09:42:49.735Z",
        "description": "Edit article",
        "requires": []
      },
      {
        "id": 169,
        "rule": "ASSET_CROP",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.740Z",
        "updated_at": "2023-11-27T09:42:49.740Z",
        "description": "Crop",
        "requires": []
      },
      {
        "id": 170,
        "rule": "PROJECT_CREATE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.745Z",
        "updated_at": "2023-11-27T09:42:49.745Z",
        "description": "Create",
        "requires": []
      },
      {
        "id": 171,
        "rule": "PROJECT_EDIT",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.749Z",
        "updated_at": "2023-11-27T09:42:49.749Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 172,
        "rule": "PROJECT_MOVE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.753Z",
        "updated_at": "2023-11-27T09:42:49.753Z",
        "description": "Move",
        "requires": []
      },
      {
        "id": 173,
        "rule": "PROJECT_DELETE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.756Z",
        "updated_at": "2023-11-27T09:42:49.756Z",
        "description": "Delete and restore",
        "requires": []
      },
      {
        "id": 174,
        "rule": "PROJECT_EDIT_CUSTOM_FIELDS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.759Z",
        "updated_at": "2023-11-27T09:42:49.759Z",
        "description": "Edit custom fields",
        "requires": []
      },
      {
        "id": 175,
        "rule": "PROJECT_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.762Z",
        "updated_at": "2023-11-27T09:42:49.762Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 176,
        "rule": "PROJECT_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.765Z",
        "updated_at": "2023-11-27T09:42:49.765Z",
        "description": "See public projects",
        "requires": []
      },
      {
        "id": 177,
        "rule": "COLLECTION_CREATE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.768Z",
        "updated_at": "2023-11-27T09:42:49.768Z",
        "description": "Create",
        "requires": []
      },
      {
        "id": 178,
        "rule": "COLLECTION_EDIT",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.771Z",
        "updated_at": "2023-11-27T09:42:49.771Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 179,
        "rule": "COLLECTION_ADD_ASSET",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.774Z",
        "updated_at": "2023-11-27T09:42:49.774Z",
        "description": "Add assets",
        "requires": []
      },
      {
        "id": 180,
        "rule": "COLLECTION_REMOVE_ASSET",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.777Z",
        "updated_at": "2023-11-27T09:42:49.777Z",
        "description": "Remove assets",
        "requires": []
      },
      {
        "id": 181,
        "rule": "COLLECTION_DELETE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.781Z",
        "updated_at": "2023-11-27T09:42:49.781Z",
        "description": "Delete",
        "requires": []
      },
      {
        "id": 182,
        "rule": "COLLECTION_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.784Z",
        "updated_at": "2023-11-27T09:42:49.784Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 183,
        "rule": "COLLECTION_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.787Z",
        "updated_at": "2023-11-27T09:42:49.787Z",
        "description": "See public collections",
        "requires": []
      },
      {
        "id": 184,
        "rule": "DROP_FOLDER_CREATE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.790Z",
        "updated_at": "2023-11-27T09:42:49.790Z",
        "description": "Create",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 185,
        "rule": "DROP_FOLDER_EDIT",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.793Z",
        "updated_at": "2023-11-27T09:42:49.793Z",
        "description": "Edit details",
        "requires": []
      },
      {
        "id": 186,
        "rule": "DROP_FOLDER_ADD_ASSETS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.799Z",
        "updated_at": "2023-11-27T09:42:49.799Z",
        "description": "Add assets",
        "requires": []
      },
      {
        "id": 187,
        "rule": "DROP_FOLDER_DELETE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.804Z",
        "updated_at": "2023-11-27T09:42:49.804Z",
        "description": "Delete",
        "requires": []
      },
      {
        "id": 188,
        "rule": "DROP_FOLDER_EDIT_MEMBERS",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.809Z",
        "updated_at": "2023-11-27T09:42:49.809Z",
        "description": "Edit members",
        "requires": []
      },
      {
        "id": 189,
        "rule": "DROP_FOLDER_SEE_PUBLIC",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.814Z",
        "updated_at": "2023-11-27T09:42:49.814Z",
        "description": "See public drop folders",
        "requires": []
      },
      {
        "id": 190,
        "rule": "LOADER_VIEW",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.819Z",
        "updated_at": "2023-11-27T09:42:49.819Z",
        "description": "View the list of loaders",
        "requires": []
      },
      {
        "id": 191,
        "rule": "LOADER_MONITOR",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.824Z",
        "updated_at": "2023-11-27T09:42:49.824Z",
        "description": "Monitor",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 192,
        "rule": "LOADER_RESTORE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.829Z",
        "updated_at": "2023-11-27T09:42:49.829Z",
        "description": "Restore",
        "requires": [
          "LOADER_VIEW"
        ]
      },
      {
        "id": 193,
        "rule": "PLUGIN_ENABLE",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.834Z",
        "updated_at": "2023-11-27T09:42:49.834Z",
        "description": "Enable plugins",
        "requires": []
      },
      {
        "id": 194,
        "rule": "ACTIONS_VIEW",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.838Z",
        "updated_at": "2023-11-27T09:42:49.838Z",
        "description": "View actions",
        "requires": []
      },
      {
        "id": 195,
        "rule": "ACTIONS_START",
        "has_permission": false,
        "user_role_id": 5,
        "created_at": "2023-11-27T09:42:49.843Z",
        "updated_at": "2023-11-27T09:42:49.843Z",
        "description": "Launch actions",
        "requires": [
          "ACTIONS_VIEW"
        ]
      }
    ]
  }
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters

POST /api/v2/admin/user_roles/:user_role_id/permissions/:permission_id
Update permission for user role

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
has_permission
required

Has permission

Validations:

  • Must be one of: true, false.

Examples

// Not admin user
POST /api/v2/admin/user_roles/:user_role_id/permissions/:permission_id
401
// User role not found
POST /api/v2/admin/user_roles/not-found-id/permissions/274
404
{
  "error": "UserRole not found"
}
// Permission not found
POST /api/v2/admin/user_roles/8/permissions/not-found-id
404
{
  "error": "Permission not found"
}
// Successful request
POST /api/v2/admin/user_roles/9/permissions/353
{
  "has_permission": true
}
200
{
  "permission": {
    "user_role_id": 9,
    "has_permission": true,
    "id": 353,
    "rule": "sample-rule-2",
    "created_at": "2023-11-27T09:42:51.389Z",
    "updated_at": "2023-11-27T09:42:51.490Z",
    "description": null,
    "requires": []
  }
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters