ACL Entries
Returns every ACL entry known to the authorization service.
Requires administrve privileges (administrator or service account). Regular users need 'View domains' permission on the root domain, which is not granted by default.
ACL entries list
Unauthorized
Forbidden
Internal Server Error
GET /api/acl_entries HTTP/1.1
Accept: */*
{
"data": [
{
"description": null,
"group_id": null,
"id": 5,
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
]
}Creates an ACL entry granting a role on a resource to a user or a group.
Permissions:
For
domainresources: requires 'Assign domain roles to users or groups' on the target domain.For
structureresources: requires 'Assign structure roles to users or groups' on the domain(s) that own the structure.
Exactly one of user_id or group_id should be supplied to identify the principal.
resource_type selects which resource the role is granted on. Supported values are domain and structure.
Payload for creating an ACL entry.
Exactly one of user_id or group_id must be supplied: if both are provided, one is cleared server-side; if neither is provided, the create fails on the database's XOR constraint.
ACL entry created
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/acl_entries HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 123
{
"acl_entry": {
"description": "grant data steward role",
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
}{
"data": {
"description": "domain admin",
"group_id": null,
"id": 5,
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
}Returns the specified ACL entry.
ACL entry ID.
ACL entry detail
Unauthorized
Not found
Internal Server Error
GET /api/acl_entries/{id} HTTP/1.1
Accept: */*
{
"data": {
"description": "domain admin",
"group_id": null,
"id": 5,
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
}Updates the description of the specified ACL entry. Only the description field may be modified.
Permissions:
For
domainresources: requires 'Update domain roles' on the target domain.For
structureresources: requires 'Assign structure roles to users or groups' on the domain(s) that own the structure.
ACL entry ID.
Update payload. Only the description field may be modified on an existing ACL entry.
ACL entry updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PUT /api/acl_entries/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"acl_entry": {
"description": "updated description"
}
}{
"data": {
"description": "domain admin",
"group_id": null,
"id": 5,
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
}Deletes the specified ACL entry.
Permissions:
For
domainresources: requires 'Delete domain roles' on the target domain.For
structureresources: requires 'Assign structure roles to users or groups' on the domain(s) that own the structure.
ACL entry ID.
ACL entry deleted
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/acl_entries/{id} HTTP/1.1
Accept: */*
No content
Updates the description of the specified ACL entry. Only the description field may be modified.
Permissions:
For
domainresources: requires 'Update domain roles' on the target domain.For
structureresources: requires 'Assign structure roles to users or groups' on the domain(s) that own the structure.
ACL entry ID.
Update payload. Only the description field may be modified on an existing ACL entry.
ACL entry updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PATCH /api/acl_entries/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"acl_entry": {
"description": "updated description"
}
}{
"data": {
"description": "domain admin",
"group_id": null,
"id": 5,
"resource_id": 101,
"resource_type": "domain",
"role_id": 3,
"user_id": 42
}
}Returns every ACL entry attached to the resource identified by resource_type and resource_id.
Permissions:
For
domainresources: requires 'View domains' on the target domain.For
structureresources: requires 'View structures' on the domains that own the structure.
The response is a HAL-style document: entries live under _embedded.acl_entries and hypermedia controls under _links.self. Each entry declares the HTTP methods the caller is allowed to use on that specific ACL entry.
Type of the resource the ACL applies to. Singularized server-side, so domains and domain resolve to the same type.
Only domain and structure are meaningful: the create endpoint rejects any other value with 422, and the list endpoint returns an empty list for types with no entries in the database.
domainPossible values: Resource identifier.
ACL entries for the resource
HAL-style listing of every ACL entry attached to a resource, with hypermedia controls at the top level.
Unauthorized
Forbidden
Internal Server Error
GET /api/acl_entries/{resource_type}/{resource_id} HTTP/1.1
Accept: */*
{
"_embedded": {
"acl_entries": [
{
"_links": {
"self": {
"href": "/api/acl_entries/5",
"methods": [
"GET"
]
}
},
"acl_entry_id": 5,
"description": null,
"principal": {
"full_name": "John Doe",
"id": 42,
"user_name": "john.doe"
},
"principal_type": "user",
"role_id": 3,
"role_name": "writer"
}
]
},
"_links": {
"self": {
"href": "/api/acl_entries/domains/101",
"methods": [
"GET",
"POST"
]
}
}
}Creates an ACL entry granting a role on the resource identified by resource_type and resource_id to a user or a group.
Permissions:
For
domainresources: requires 'Assign domain roles to users or groups' on the target domain.For
structureresources: requires 'Assign structure roles to users or groups' on the domains that own the structure.
Behavior:
The resource identity is taken from the URL path. The body only describes the principal and the role.
If
role_namedoes not match an existing role, the entry cannot be created.On success the endpoint responds with
303 See Otherand aLocationheader pointing at the resource ACL listing. The response body is empty.
Type of the resource the ACL applies to. Singularized server-side, so domains and domain resolve to the same type.
Only domain and structure are meaningful: the create endpoint rejects any other value with 422, and the list endpoint returns an empty list for types with no entries in the database.
domainPossible values: Resource identifier.
Payload for creating an ACL entry through the resource-scoped endpoint.
The resource is identified by the URL path, so the body only needs to describe the principal and the role.
ACL entry created. The Location header points at the resource ACL listing.
No content
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/acl_entries/{resource_type}/{resource_id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 124
{
"acl_entry": {
"description": "grant data steward role",
"principal_id": 42,
"principal_type": "user",
"role_name": "data-steward"
}
}No content
Last updated