> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/api-integrations/data-catalog-data-lineage-and-grants-apis/grant-requests.md).

# Grant Requests

## List grant requests

> Returns grant requests visible to the current user, optionally filtered by group, user, status, or action.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests":{"get":{"description":"Returns grant requests visible to the current user, optionally filtered by group, user, status, or action.","operationId":"TdDdWeb.GrantRequestController.index (2)","parameters":[{"description":"Grant request group ID (required only when accessing from group route)","in":"path","name":"grant_request_group_id","required":false,"schema":{"type":"integer"}},{"description":"Filter by current user (use 'me')","in":"query","name":"user","required":false,"schema":{"enum":["me"],"type":"string"}},{"description":"Filter by status","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Filter by action (e.g., 'approve')","in":"query","name":"action","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestListResponse"}}},"description":"List of grant requests"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"meta":{"additionalProperties":true,"nullable":true,"type":"object"},"permissions":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data"],"title":"GrantRequestListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Bulk approve grant requests

> Approves or rejects multiple grant requests in bulk according to the provided approval parameters and returns created approvals.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/bulk_approval":{"post":{"description":"Approves or rejects multiple grant requests in bulk according to the provided approval parameters and returns created approvals.","operationId":"TdDdWeb.GrantRequestBulkApprovalController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestBulkApprovalRequest"}}},"description":"Grant request bulk approval payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestBulkApprovalResponse"}}},"description":"Grant request approvals created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Bulk approve grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestBulkApprovalRequest":{"additionalProperties":false,"properties":{"comment":{"description":"Optional comment","nullable":true,"type":"string"},"filters":{"additionalProperties":true,"description":"Search filters for grant requests","nullable":true,"type":"object"},"is_rejection":{"default":false,"description":"Whether this is a rejection","type":"boolean"},"must":{"additionalProperties":true,"description":"Must conditions for search","nullable":true,"type":"object"},"role":{"description":"Approval role","type":"string"}},"required":["role"],"title":"GrantRequestBulkApprovalRequest","type":"object"},"GrantRequestBulkApprovalResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"comment":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","nullable":true,"type":"string"},"is_rejection":{"type":"boolean"},"role":{"type":"string"}},"required":["id","role","is_rejection"],"type":"object"},"type":"array"}},"required":["data"],"title":"GrantRequestBulkApprovalResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Reindex all grant requests

> Triggers a full reindex of grant requests for search.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/search/reindex_all":{"get":{"description":"Triggers a full reindex of grant requests for search.","operationId":"TdDdWeb.GrantRequestSearchController.reindex_all","parameters":[],"responses":{"202":{"description":"Reindexing accepted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Reindex all grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List grant request groups

> Returns grant request groups available to the current user, optionally filtered by a comma-separated list of IDs.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_request_groups":{"get":{"description":"Returns grant request groups available to the current user, optionally filtered by a comma-separated list of IDs.","operationId":"TdDdWeb.GrantRequestGroupController.index","parameters":[{"description":"Comma-separated list of group IDs to filter","in":"query","name":"ids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestGroupListResponse"}}},"description":"List of grant request groups"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant request groups","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestGroupListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["data"],"title":"GrantRequestGroupListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## List grant requests

> Returns grant requests visible to the current user, optionally filtered by group, user, status, or action.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_request_groups/{grant_request_group_id}/grant_requests":{"get":{"description":"Returns grant requests visible to the current user, optionally filtered by group, user, status, or action.","operationId":"TdDdWeb.GrantRequestController.index","parameters":[{"description":"Grant request group ID (required only when accessing from group route)","in":"path","name":"grant_request_group_id","required":false,"schema":{"type":"integer"}},{"description":"Filter by current user (use 'me')","in":"query","name":"user","required":false,"schema":{"enum":["me"],"type":"string"}},{"description":"Filter by status","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Filter by action (e.g., 'approve')","in":"query","name":"action","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestListResponse"}}},"description":"List of grant requests"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestListResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"meta":{"additionalProperties":true,"nullable":true,"type":"object"},"permissions":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data"],"title":"GrantRequestListResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Download grant requests as XLSX

> Generates an XLSX file containing grant requests matching the request filters.\
> \
> The payload mirrors \`POST /api/grant\_requests/search\` so that the active\
> view (Approve or Search) can be reused as-is. As in the search endpoint,\
> the Approve view filters (\`Search.apply\_approve\_filters/1\`) are applied\
> whenever the payload carries them, and the payload is used verbatim\
> otherwise. Results are always restricted to the domains and structures\
> the user can see, regardless of the payload.\
> \
> Every record matching the query is exported, so the pagination and\
> cursor properties of the search payload are ignored.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/xlsx/download":{"post":{"description":"Generates an XLSX file containing grant requests matching the request filters.\n\nThe payload mirrors `POST /api/grant_requests/search` so that the active\nview (Approve or Search) can be reused as-is. As in the search endpoint,\nthe Approve view filters (`Search.apply_approve_filters/1`) are applied\nwhenever the payload carries them, and the payload is used verbatim\notherwise. Results are always restricted to the domains and structures\nthe user can see, regardless of the payload.\n\nEvery record matching the query is exported, so the pagination and\ncursor properties of the search payload are ignored.\n","operationId":"TdDdWeb.GrantRequestController.download","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestsDownloadRequest"}}},"description":"Grant request download request","required":false},"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}}},"description":"XLSX file downloaded"},"204":{"description":"No grant requests available for download"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Download grant requests as XLSX","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestsDownloadRequest":{"additionalProperties":false,"description":"Request body for `POST /api/grant_requests/xlsx/download`.\n\nMirrors `GrantRequestSearchRequest` so that the payload sent by the\nManage grant requests view (Search or Approve) can be forwarded\nverbatim. Dynamic template fields are not listed here because the\nschema depends on the active templates at runtime; the headers for\neach dynamic column are returned in the same order produced by the\nserver, prefixed by the eight fixed columns.\n\nThe download always exports every record matching the query, so the\npagination and cursor properties of the search payload (`page`,\n`size`, `scroll`, `scroll_id`) are accepted but ignored.\n","properties":{"filters":{"additionalProperties":true,"nullable":true,"type":"object"},"header_labels":{"additionalProperties":{"type":"string"},"description":"Localized header labels keyed by column name.","type":"object"},"lang":{"description":"Locale used to translate the status and request type columns and the template fields. Defaults to the default locale.","nullable":true,"type":"string"},"must":{"additionalProperties":true,"nullable":true,"type":"object"},"must_not":{"additionalProperties":true,"nullable":true,"type":"object"},"page":{"description":"Accepted and ignored.","nullable":true,"type":"integer"},"query":{"nullable":true,"type":"string"},"scroll":{"description":"Accepted and ignored.","nullable":true,"type":"string"},"scroll_id":{"description":"Accepted and ignored.","nullable":true,"type":"string"},"search_by":{"default":"all","description":"Accepted and ignored. The Approve view filters are applied whenever the payload carries them, as in the search endpoint.","enum":["approve","all"],"type":"string"},"size":{"description":"Accepted and ignored.","nullable":true,"type":"integer"},"sort":{"description":"Sort criteria. A unique tiebreaker is appended when missing, so that the export cursor cannot skip records.","items":{"oneOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"nullable":true,"type":"array"}},"required":["header_labels"],"title":"GrantRequestsDownloadRequest","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Get grant request by ID

> Retrieves the grant request with the specified ID.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/{id}":{"get":{"description":"Retrieves the grant request with the specified ID.","operationId":"TdDdWeb.GrantRequestController.show","parameters":[{"description":"Grant request ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestShowResponse"}}},"description":"Grant request retrieved"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get grant request by ID","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestShowResponse":{"additionalProperties":false,"properties":{"data":{"properties":{"_embedded":{"additionalProperties":true,"type":"object"},"all_pending_roles":{"items":{"type":"string"},"nullable":true,"type":"array"},"approvals":{"items":{"type":"object"},"nullable":true,"type":"array"},"data_structure_id":{"nullable":true,"type":"integer"},"domain_ids":{"items":{"type":"integer"},"nullable":true,"type":"array"},"dynamic_content":{"additionalProperties":true,"type":"object"},"filters":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"inserted_at":{"format":"date_time","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"pending_roles":{"items":{"type":"string"},"nullable":true,"type":"array"},"request_type":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"status_reason":{"nullable":true,"type":"string"},"type":{"type":"string"},"updated_at":{"format":"date_time","nullable":true,"type":"string"}},"required":["id"],"type":"object"}},"required":["data"],"title":"GrantRequestShowResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Delete grant request

> Deletes the grant request identified by the provided ID.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/{id}":{"delete":{"description":"Deletes the grant request identified by the provided ID.","operationId":"TdDdWeb.GrantRequestController.delete","parameters":[{"description":"Grant request ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Grant request deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete grant request","tags":["Grant Requests"]}}},"components":{"schemas":{"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Get available grant request filters

> Returns the set of available filters for grant requests according to caller permissions and provided parameters.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests_filters/search":{"post":{"description":"Returns the set of available filters for grant requests according to caller permissions and provided parameters.","operationId":"TdDdWeb.GrantRequestFilterController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchRequest"}}},"description":"Grant request filter request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestFilterResponse"}}},"description":"Available filters"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get available grant request filters","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"properties":{"status":{"description":"Filter by status(es)","items":{"type":"string"},"type":"array"},"type":{"description":"Filter by type(s)","items":{"type":"string"},"type":"array"}},"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions for query","nullable":true,"type":"object"},"page":{"default":0,"description":"Page number (0-indexed)","minimum":0,"nullable":true,"type":"integer"},"query":{"description":"Search query string","nullable":true,"type":"string"},"scroll":{"description":"Scroll ID for pagination (e.g., '1m' for 1 minute)","nullable":true,"type":"string"},"scroll_id":{"description":"Scroll ID to continue a previous search","nullable":true,"type":"string"},"size":{"default":20,"description":"Page size","maximum":100,"minimum":1,"nullable":true,"type":"integer"}},"title":"GrantRequestSearchRequest","type":"object"},"GrantRequestFilterResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":true,"type":"object"}},"title":"GrantRequestFilterResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create grant request status

> Creates or updates the status of a grant request for the given request ID.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/{grant_request_id}/status":{"post":{"description":"Creates or updates the status of a grant request for the given request ID.","operationId":"TdDdWeb.GrantRequestStatusController.create","parameters":[{"description":"Grant request ID","in":"path","name":"grant_request_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestStatusCreateRequest"}}},"description":"Grant request status payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestStatusCreateResponse"}}},"description":"Grant request status created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create grant request status","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestStatusCreateRequest":{"additionalProperties":false,"properties":{"reason":{"nullable":true,"type":"string"},"status":{"enum":["approved","rejected","cancelled","processing"],"type":"string"}},"required":["status"],"title":"GrantRequestStatusCreateRequest","type":"object"},"GrantRequestStatusCreateResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":true,"description":"Embedded resources","type":"object"},"all_pending_roles":{"description":"All pending roles","items":{"type":"string"},"nullable":true,"type":"array"},"data_structure_id":{"description":"Data structure ID","nullable":true,"type":"integer"},"domain_ids":{"description":"Domain IDs","items":{"type":"integer"},"nullable":true,"type":"array"},"dynamic_content":{"additionalProperties":true,"description":"Dynamic content","type":"object"},"filters":{"additionalProperties":true,"description":"Applied filters","type":"object"},"id":{"description":"Grant request ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"metadata":{"additionalProperties":true,"description":"Request metadata","type":"object"},"pending_roles":{"description":"Pending roles for current user","items":{"type":"string"},"nullable":true,"type":"array"},"request_type":{"description":"Request type","nullable":true,"type":"string"},"status":{"description":"Current status","nullable":true,"type":"string"},"status_reason":{"description":"Reason for status change","nullable":true,"type":"string"},"type":{"description":"Type of grant request","nullable":true,"type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","inserted_at"],"type":"object"}},"required":["data"],"title":"GrantRequestStatusCreateResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Search grant requests

> Searches grant requests using the provided criteria and returns paginated results with total count and optional filters.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/search":{"post":{"description":"Searches grant requests using the provided criteria and returns paginated results with total count and optional filters.","operationId":"TdDdWeb.GrantRequestSearchController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchRequest"}}},"description":"Grant request search","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestSearchResponse"}}},"description":"Grant request search response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search grant requests","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria","nullable":true,"properties":{"status":{"description":"Filter by status(es)","items":{"type":"string"},"type":"array"},"type":{"description":"Filter by type(s)","items":{"type":"string"},"type":"array"}},"type":"object"},"must":{"additionalProperties":true,"description":"Must conditions for query","nullable":true,"type":"object"},"page":{"default":0,"description":"Page number (0-indexed)","minimum":0,"nullable":true,"type":"integer"},"query":{"description":"Search query string","nullable":true,"type":"string"},"scroll":{"description":"Scroll ID for pagination (e.g., '1m' for 1 minute)","nullable":true,"type":"string"},"scroll_id":{"description":"Scroll ID to continue a previous search","nullable":true,"type":"string"},"size":{"default":20,"description":"Page size","maximum":100,"minimum":1,"nullable":true,"type":"integer"}},"title":"GrantRequestSearchRequest","type":"object"},"GrantRequestSearchResponse":{"additionalProperties":false,"properties":{"_permissions":{"description":"User permissions for the search results","items":{"type":"string"},"nullable":true,"type":"array"},"data":{"description":"List of grant requests matching the search","items":{"additionalProperties":false,"properties":{"created_by":{"additionalProperties":false,"nullable":true,"properties":{"email":{"type":"string"},"full_name":{"type":"string"},"user_name":{"type":"string"}},"required":["email","full_name","user_name"],"type":"object"},"created_by_id":{"nullable":true,"type":"integer"},"current_status":{"nullable":true,"type":"string"},"data_structure_id":{"nullable":true,"type":"integer"},"data_structure_version":{"additionalProperties":false,"properties":{"data_structure_id":{"type":"integer"},"description":{"nullable":true,"type":"string"},"domain":{"additionalProperties":true,"nullable":true,"type":"object"},"external_id":{"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"mutable_metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"name":{"type":"string"},"note":{"nullable":true,"type":"string"},"path":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data_structure_id","external_id","name"],"type":"object"},"domain_ids":{"items":{"type":"integer"},"nullable":true,"type":"array"},"grant":{"additionalProperties":true,"nullable":true,"type":"object"},"group_id":{"type":"integer"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"metadata":{"additionalProperties":true,"type":"object"},"modification_grant_id":{"nullable":true,"type":"integer"},"request_type":{"nullable":true,"type":"string"},"user":{"additionalProperties":false,"properties":{"email":{"type":"string"},"full_name":{"type":"string"},"user_name":{"type":"string"}},"required":["email","full_name","user_name"],"type":"object"},"user_id":{"type":"integer"}},"required":["id","group_id","user_id","current_status","inserted_at","user"],"type":"object"},"type":"array"},"filters":{"additionalProperties":true,"description":"Aggregation filters available (facets)","nullable":true,"type":"object"},"scroll_id":{"description":"Scroll ID for pagination","nullable":true,"type":"string"}},"required":["data"],"title":"GrantRequestSearchResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```

## Create grant request approval

> Creates an approval record for the specified grant request.

```json
{"openapi":"3.0.0","info":{"title":"td-dd","version":"Truedat 8.9.1"},"paths":{"/api/grant_requests/{grant_request_id}/approvals":{"post":{"description":"Creates an approval record for the specified grant request.","operationId":"TdDdWeb.GrantRequestApprovalController.create","parameters":[{"description":"Grant request ID","in":"path","name":"grant_request_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestApprovalCreateRequest"}}},"description":"Grant request approval payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestApprovalCreateResponse"}}},"description":"Grant request approval created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDdInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create grant request approval","tags":["Grant Requests"]}}},"components":{"schemas":{"GrantRequestApprovalCreateRequest":{"additionalProperties":false,"properties":{"approval":{"additionalProperties":false,"properties":{"comment":{"description":"Optional comment","nullable":true,"type":"string"},"role":{"description":"Approval role","type":"string"}},"required":["role"],"type":"object"}},"required":["approval"],"title":"GrantRequestApprovalCreateRequest","type":"object"},"GrantRequestApprovalCreateResponse":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"_embedded":{"additionalProperties":false,"properties":{"user":{"additionalProperties":true,"type":"object"}},"type":"object"},"comment":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"is_rejection":{"type":"boolean"},"role":{"type":"string"}},"required":["id","role","is_rejection","inserted_at"],"type":"object"}},"required":["data"],"title":"GrantRequestApprovalCreateResponse","type":"object"},"TdDdUnauthorizedResponse":{"anyOf":[{"$ref":"#/components/schemas/TdDdUnauthorizedMessageResponse"},{"$ref":"#/components/schemas/TdDdUnauthorizedErrorResponse"}],"description":"Unauthorized response from auth plug or error view","title":"TdDdUnauthorizedResponse"},"TdDdUnauthorizedMessageResponse":{"additionalProperties":false,"properties":{"message":{"type":"string"}},"required":["message"],"title":"TdDdUnauthorizedMessageResponse","type":"object"},"TdDdUnauthorizedErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnauthorizedErrorResponse","type":"object"},"TdDdForbiddenResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdForbiddenResponse","type":"object"},"TdDdUnprocessableEntityObjectResponse":{"additionalProperties":false,"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"required":["errors"],"title":"TdDdUnprocessableEntityObjectResponse","type":"object"},"TdDdInternalServerErrorResponse":{"additionalProperties":false,"properties":{"errors":{"additionalProperties":false,"properties":{"detail":{"type":"string"}},"required":["detail"],"type":"object"}},"required":["errors"],"title":"TdDdInternalServerErrorResponse","type":"object"}}}}
```
