For the complete documentation index, see llms.txt. This page is also available as Markdown.

Grants

Create grant

post

Creates a new grant for the specified data structure.

Path parameters
data_structure_idstringRequired

Data Structure external ID

Body
Responses
201

Grant created

application/json
post/api/data_structures/{data_structure_id}/grants
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
  }
}

Search grants for current user

post

Searches grants owned by or visible to the current user.

Body
pageintegerOptionalDefault: 0
querystring · nullableOptional
scrollstring · nullableOptional
scroll_idstring · nullableOptional
sizeintegerOptionalDefault: 20
sortstring · nullableOptional
Other propertiesanyOptional
Responses
200

Grant search response

application/json
scroll_idstring · nullableOptional
post/api/grants/search/mine
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
}

Get available grant filters

post

Returns available grant filters for the caller based on permissions and provided search criteria.

Body
pageintegerOptionalDefault: 0
querystring · nullableOptional
scrollstring · nullableOptional
scroll_idstring · nullableOptional
sizeintegerOptionalDefault: 20
sortstring · nullableOptional
Other propertiesanyOptional
Responses
200

Available filters

application/json
post/api/grant_filters/search
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
      }
    ]
  }
}

Get grant by ID

get

Retrieves the grant with the given ID, including allowed actions for the current user.

Path parameters
idintegerRequired

Grant ID

Responses
200

Grant retrieved

application/json
get/api/grants/{id}
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
  }
}

Update grant

put

Updates the specified grant using the provided action or grant payload.

Path parameters
idintegerRequired

Grant ID

Body
actionstring · enumOptional

Action to perform (optional, when action instead of grant update)

Possible values:
Responses
200

Grant updated

application/json
put/api/grants/{id}
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
  }
}

Delete grant

delete

Deletes the grant identified by the given ID.

Path parameters
idintegerRequired

Grant ID

Responses
204

Grant deleted

No content

delete/api/grants/{id}
DELETE /api/grants/{id} HTTP/1.1
Accept: */*

No content

Update grant

patch

Updates the specified grant using the provided action or grant payload.

Path parameters
idintegerRequired

Grant ID

Body
actionstring · enumOptional

Action to perform (optional, when action instead of grant update)

Possible values:
Responses
200

Grant updated

application/json
patch/api/grants/{id}
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
  }
}

Reindex all grants

get

Schedules a full reindex of grants and returns 202 Accepted when the job is enqueued.

Responses
202

Reindexing accepted

No content

get/api/grants/search/reindex_all
GET /api/grants/search/reindex_all HTTP/1.1
Accept: */*

No content

Get available grant filters for current user

post

Returns available grant filters for grants associated with the current user, based on their permissions and provided search criteria.

Body
pageintegerOptionalDefault: 0
querystring · nullableOptional
scrollstring · nullableOptional
scroll_idstring · nullableOptional
sizeintegerOptionalDefault: 20
sortstring · nullableOptional
Other propertiesanyOptional
Responses
200

Available filters

application/json
post/api/grant_filters/search/mine
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
      }
    ]
  }
}

List all active grants

get

Returns all active grants visible to the current user.

Responses
200

List of grants

application/json
get/api/grants
GET /api/grants HTTP/1.1
Accept: */*
{
  "data": [
    {
      "data_structure": {
        "external_id": "ds_ext",
        "id": 456
      },
      "id": 77,
      "pending_removal": false,
      "user_id": 789
    }
  ]
}

Bulk create, update and delete grants

put

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.

Body
Responses
200

Grants processed

application/json
created_idsinteger[]Required

IDs of grants created by 'add' operations

idsinteger[]Required

IDs of all successfully processed grants (created, updated and removed combined)

removed_idsinteger[]Required

IDs of grants deleted by 'remove' operations

updated_idsinteger[]Required

IDs of grants modified by 'update' operations

put/api/grants_bulk
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
  ]
}

Bulk create, update and delete grants

patch

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.

Body
Responses
200

Grants processed

application/json
created_idsinteger[]Required

IDs of grants created by 'add' operations

idsinteger[]Required

IDs of all successfully processed grants (created, updated and removed combined)

removed_idsinteger[]Required

IDs of grants deleted by 'remove' operations

updated_idsinteger[]Required

IDs of grants modified by 'update' operations

patch/api/grants_bulk
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
  ]
}

Search grants by permissions

post

Searches grants using the provided criteria and returns results filtered by the current user's permissions.

Body
pageintegerOptionalDefault: 0
querystring · nullableOptional
scrollstring · nullableOptional
scroll_idstring · nullableOptional
sizeintegerOptionalDefault: 20
sortstring · nullableOptional
Other propertiesanyOptional
Responses
200

Grant search response

application/json
scroll_idstring · nullableOptional
post/api/grants/search
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
}

Download grants as XLSX

post

Generates an XLSX file containing grant data matching the request filters.

Body
pageintegerOptional
search_bystring · enumRequiredPossible values:
sizeintegerOptional
Responses
200

XLSX file downloaded

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
string · binaryOptional
post/api/grants/xlsx/download
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"
}
binary

Last updated