Grants
Creates a grant for the target data structure.
Requires the 'Manage grants' permission on the target structure.
ID of the user receiving the grant (user_id) is required but start_date, end_date, source_user_name and detail are optional. The grant is created with the provided dates (if any). If start_date is omitted, the grant is effective immediately.
The detail field is a free‑form JSON object for additional metadata.
Data Structure external ID
Grant created
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
POST /api/data_structures/{data_structure_id}/grants HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"grant": {
"source_user_name": "foo",
"start_date": "2026-05-01",
"user_id": 123
}
}{
"data": {
"data_structure": {
"external_id": "ds_ext",
"id": 456
},
"detail": {},
"id": 123,
"start_date": "2026-05-01",
"user_id": 789
}
}Searches grants owned by the current user, not all visible grants.
Supports pagination, scrolling (scroll + scroll_id), and filtering (filters). page defaults to 0 and size defaults to 20. Sorting is by relevance unless specified via sort parameter.
The response includes a x-total-count header.
Soft‑deleted grants are excluded by default.
Requires 'View grants' permission.
020Grant search response
Unauthorized
Unprocessable Entity
Internal Server Error
POST /api/grants/search/mine HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"filters": {
"status": [
"active"
]
},
"page": 0,
"query": "foo",
"size": 20
}{
"data": [
{
"data_structure": {
"id": 1
},
"id": 77,
"user_id": 123
}
],
"filters": {
"status": [
{
"count": 1,
"key": "active"
}
]
},
"scroll_id": null
}Returns the available grant filter values for the caller.
Requires 'View grants' permission.
The returned values are permission-aware and based on the payload sent in the request body. Soft‑deleted grants are excluded.
020Available filters
Unauthorized
Internal Server Error
POST /api/grant_filters/search HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"filters": {
"status": [
"active"
]
},
"page": 0,
"query": "foo",
"size": 20
}{
"data": {
"status": [
{
"count": 10,
"key": "active"
}
],
"user_id": [
{
"count": 8,
"key": 123
}
]
}
}Retrieves a grant by ID and includes only the actions the current user is allowed to perform.
Requires the 'View grants' permission.
Grant ID
Grant retrieved
Unauthorized
Forbidden
Not found
Internal Server Error
GET /api/grants/{id} HTTP/1.1
Accept: */*
{
"_actions": {},
"data": {
"data_structure": {
"external_id": "ds_ext",
"id": 456
},
"id": 77,
"pending_removal": false,
"user_id": 789
}
}Updates a grant. Two update modes are supported:
Action‑based updates (using the
actionfield):
mark_pending_removal– marks the grant for future removal (requires 'Remove grant' permission).unmark_pending_removal– clears the pending removal flag (requires 'Remove grant' permission).set_removed– immediately ends the grant (requires 'Manage grants' permission). The grant’send_dateis set to the current time andpending_removalis cleared.
Attribute update (using the
grantobject):
Updates any of:
user_id,start_date,end_date,source_user_name,detail.Requires 'Manage grants' permission.
The request must include either action or grant, but not both.
Grant ID
Action to perform (optional, when action instead of grant update)
Grant updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PUT /api/grants/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"grant": {
"end_date": "2027-05-01T00:00:00Z",
"start_date": "2026-05-01T00:00:00Z",
"user_id": 123
}
}{
"data": {
"data_structure": {
"id": 456
},
"id": 123,
"pending_removal": false,
"user_id": 789
}
}Performs a soft‑delete on the grant identified by the given ID (sets deleted_at to the current timestamp) .
Requires the 'Manage grants' permission.
Grant ID
Grant deleted
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/grants/{id} HTTP/1.1
Accept: */*
No content
Updates a grant. Two update modes are supported:
Action‑based updates (using the
actionfield):
mark_pending_removal– marks the grant for future removal (requires 'Remove grant' permission).unmark_pending_removal– clears the pending removal flag (requires 'Remove grant' permission).set_removed– immediately ends the grant (requires 'Manage grants' permission). The grant’send_dateis set to the current time andpending_removalis cleared.
Attribute update (using the
grantobject):
Updates any of:
user_id,start_date,end_date,source_user_name,detail.Requires 'Manage grants' permission.
The request must include either action or grant, but not both.
Grant ID
Action to perform (optional, when action instead of grant update)
Grant updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PATCH /api/grants/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"grant": {
"end_date": "2027-05-01T00:00:00Z",
"start_date": "2026-05-01T00:00:00Z",
"user_id": 123
}
}{
"data": {
"data_structure": {
"id": 456
},
"id": 123,
"pending_removal": false,
"user_id": 789
}
}Schedules a full reindex of grants and returns 202 when the job is enqueued.
Requires administrative privileges (administrator or service account).
Reindexing accepted
No content
Unauthorized
Forbidden
Internal Server Error
GET /api/grants/search/reindex_all HTTP/1.1
Accept: */*
No content
Returns available filter values for grants assigned to the current user, based on the provided search criteria.
Requires 'View grants' permission.
The result is permission-aware and based on the payload sent in the request body. Soft‑deleted grants are excluded.
020Available filters
Unauthorized
Internal Server Error
POST /api/grant_filters/search/mine HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"filters": {
"status": [
"active"
]
},
"page": 0,
"query": "foo",
"size": 20
}{
"data": {
"status": [
{
"count": 10,
"key": "active"
}
],
"user_id": [
{
"count": 8,
"key": 123
}
]
}
}Lists active grants visible to the current user. The list does not include soft-deleted grants.
Requires the 'View grants' permission.
List of grants
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
GET /api/grants HTTP/1.1
Accept: */*
{
"data": [
{
"data_structure": {
"external_id": "ds_ext",
"id": 456
},
"id": 77,
"pending_removal": false,
"user_id": 789
}
]
}Accepts a bulk grants payload and processes each operation independently.
Supported operations: add, updateand remove.
Operations are processed independently. A failure in one item does not affect others. The endpoint always returns HTTP 200 even if some items fail. Reports per-item failures in the errors array instead of rejecting the whole request. The response includes:
ids– all processed grant IDs (created, updated, removed).created_ids,updated_ids,removed_ids– separate lists for each operation.errors– an array of objects describing each failed operation, including theop, the affectedid(if applicable), and amessage. RequiresManage grantspermission.
Request parameters: Each item in the grants array must include:
op– one of'add','update','remove'.For
add:user_id(required),data_structure_external_id(required), optionalstart_date,end_date,source_user_name,detail.For
update:id(required) and any fields to modify (start_date,end_date,source_user_name,detail).For
remove:id(required).
Grants processed
IDs of grants created by 'add' operations
IDs of all successfully processed grants (created, updated and removed combined)
IDs of grants deleted by 'remove' operations
IDs of grants modified by 'update' operations
Unauthorized
Internal Server Error
PUT /api/grants_bulk HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 243
{
"grants": [
{
"data_structure_external_id": "ds_external_1",
"detail": {},
"end_date": "2027-01-01",
"op": "add",
"source_user_name": "admin",
"start_date": "2026-01-01",
"user_id": 123
},
{
"end_date": "2027-06-01",
"id": 1,
"op": "update"
},
{
"id": 2,
"op": "remove"
}
]
}{
"created_ids": [
1
],
"errors": [
{
"grant_id": 999,
"message": "grant_not_found",
"op": "update"
}
],
"ids": [
1,
2,
3
],
"removed_ids": [
3
],
"updated_ids": [
2
]
}Accepts a bulk grants payload and processes each operation independently.
Supported operations: add, updateand remove.
Operations are processed independently. A failure in one item does not affect others. The endpoint always returns HTTP 200 even if some items fail. Reports per-item failures in the errors array instead of rejecting the whole request. The response includes:
ids– all processed grant IDs (created, updated, removed).created_ids,updated_ids,removed_ids– separate lists for each operation.errors– an array of objects describing each failed operation, including theop, the affectedid(if applicable), and amessage. RequiresManage grantspermission.
Request parameters: Each item in the grants array must include:
op– one of'add','update','remove'.For
add:user_id(required),data_structure_external_id(required), optionalstart_date,end_date,source_user_name,detail.For
update:id(required) and any fields to modify (start_date,end_date,source_user_name,detail).For
remove:id(required).
Grants processed
IDs of grants created by 'add' operations
IDs of all successfully processed grants (created, updated and removed combined)
IDs of grants deleted by 'remove' operations
IDs of grants modified by 'update' operations
Unauthorized
Internal Server Error
PATCH /api/grants_bulk HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 243
{
"grants": [
{
"data_structure_external_id": "ds_external_1",
"detail": {},
"end_date": "2027-01-01",
"op": "add",
"source_user_name": "admin",
"start_date": "2026-01-01",
"user_id": 123
},
{
"end_date": "2027-06-01",
"id": 1,
"op": "update"
},
{
"id": 2,
"op": "remove"
}
]
}{
"created_ids": [
1
],
"errors": [
{
"grant_id": 999,
"message": "grant_not_found",
"op": "update"
}
],
"ids": [
1,
2,
3
],
"removed_ids": [
3
],
"updated_ids": [
2
]
}Searches grants using the supplied criteria while filtering them by the current user's permissions.
Supports pagination, scrolling (scroll + scroll_id), and filtering (filters). page defaults to 0 and size defaults to 20. Sorting is by relevance unless specified via sort parameter.
The response includes a x-total-count header.
Soft‑deleted grants are excluded by default.
Requires 'View grants' permission.
020Grant search response
Unauthorized
Unprocessable Entity
Internal Server Error
POST /api/grants/search HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"filters": {
"status": [
"active"
]
},
"page": 0,
"query": "foo",
"size": 20
}{
"data": [
{
"data_structure": {
"id": 1
},
"id": 77,
"user_id": 123
}
],
"filters": {
"status": [
{
"count": 1,
"key": "active"
}
]
},
"scroll_id": null
}Generates an XLSX file containing grant data matching the request filters.
Request parameters:
search_by(required) – either'permissions'(use the caller's permission‑based view) or'user'(grants where the caller is the grantee).header_labels(required) – a map of original field names to custom column labels in the exported file.Optional:
filters(the export ignores pagination and returns all matching records up to 10 000).
Requires the 'View grants' permission. The export includes the matching grant records visible to the caller.
Locale used to translate deleted user/group labels. Defaults to the default locale.
esXLSX file downloaded
No grants available for download
Unauthorized
Unprocessable Entity
Internal Server Error
POST /api/grants/xlsx/download HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"header_labels": {
"data_structure_name": "Data Structure Name",
"user_name": "User Name"
},
"search_by": "permissions"
}binaryLast updated