Data Requests

Get Consent Requests Of Data Request

Changed on

Retrieves the consent requests of a specific data request. Accessible to the provider who owns the data request and to the consumer who owns the data request.

get/api/agreement/v1/data-requests/{id}/consent-requests

Request

  • The document declares no server URL.
  • Auth
    OpenID Connect (http://localhost:6999/realms/agate/.well-known/openid-configuration, scopes: agridata.ch.Agridata_Datenanbieter, agridata.ch.Agridata_Datenbezueger)

Path parameters

idstring uuid required

Query parameters

lastModifiedFromstring date-time
Example:2022-03-10T12:15:50

Only consent requests that were modified after this timestamp are returned.

pageinteger
searchTermstring
sizeinteger
sortBystring[]

Field names to sort by. Ascending by default; prefix with - for descending. Defaults to -lastModifiedDateTime.

actingRole'CONSUMER' | 'PROVIDER'

Selects the role in which the authenticated user acts for this request. Optional: if the authenticated user holds exactly one of the allowed roles, the value is auto-resolved. Returns 400 if the value is unknown, not allowed for this endpoint, or omitted while the user holds multiple matching roles. Returns 403 if the user does not hold the role specified in the parameter.

Response

OK

totalItemsinteger required

Total number of items across all pages.

totalPagesinteger required

Total number of pages available.

currentPageinteger required

Current page number (0-based ).

pageSizeinteger required

Number of items per page.

Example response

{
  "items": [
    {
      "dataProducerUid": "CHE123456789",
      "dataProducerBur": "A123456",
      "grantedDataPeriodFrom": "2022-03-10",
      "grantedDataPeriodTo": "2022-03-10",
      "lastModifiedDateTime": "2025-06-16T11:04:51.823889"
    }
  ],
  "totalItems": 42,
  "totalPages": 5,
  "currentPage": 1,
  "pageSize": 10
}

Changes

    • warning

      added the new EXPORT_CAPACITY_EXHAUSTED enum value to the response property for the response status

    • warning

      added the new EXPORT_CAPACITY_EXHAUSTED enum value to the response property for the response status

    • warning

      added the new EXPORT_LIMIT_EXCEEDED enum value to the response property for the response status

    • warning

      added the new EXPORT_LIMIT_EXCEEDED enum value to the response property for the response status

    • warning

      added the new WITHDRAWN enum value to the // response property for the response status