Grants
Creates a new grant for the specified data structure.
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: 61
{
"grant": {
"start_date": "2026-05-01T00:00:00Z",
"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 or visible to the current user.
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 available grant filters for the caller based on permissions and provided search criteria.
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 the grant with the given ID, including allowed actions for the current user.
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 the specified grant using the provided action or grant payload.
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
}
}Deletes the grant identified by the given ID.
Grant ID
Grant deleted
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/grants/{id} HTTP/1.1
Accept: */*
No content
Updates the specified grant using the provided action or grant payload.
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 Accepted when the job is enqueued.
Reindexing accepted
No content
Unauthorized
Forbidden
Internal Server Error
GET /api/grants/search/reindex_all HTTP/1.1
Accept: */*
No content
Returns available grant filters for grants associated with the current user, based on their permissions and provided search criteria.
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
}
]
}
}Returns all active grants visible to the current user.
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. Supports 'add', 'update' and 'remove' operations. Each operation is processed independently: the endpoint always responds with 200 and reports per-item failures in the errors array rather than failing the whole batch.
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. Supports 'add', 'update' and 'remove' operations. Each operation is processed independently: the endpoint always responds with 200 and reports per-item failures in the errors array rather than failing the whole batch.
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 provided criteria and returns results filtered by the current user's permissions.
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.
XLSX 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