Data Products

Get Data Products Paginated

Changed on

Retrieves a paginated list of all available data products. Accessible to users with the producer, and admin. Supports pagination, sorting and column filtering on 'dataSourceSystemId' and 'dataProviderId', e.g. filter=dataProviderId:<uuid>,<uuid>;dataSourceSystemId:<uuid>.

get/api/products/v2

Request

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

Query parameters

filterobject

Column filters in the form '<column>:<value>[,<value>]', multiple filters separated by ';'. Values of the same column are combined with OR, filters on different columns with AND. Duplicate values are ignored. The filterable columns are documented per endpoint.

languagestring

language code for multilingual fields. Must be supported by application.

pageinteger

page number

searchTermstring

string to search for in the resource

sizeinteger

page size

sortByobject

List of field names to sort by. Default is ascending prefix with - for descending

actingRole'PROVIDER' | 'ADMIN'

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": [
    {
      "dataSourceSystemCode": "AGIS",
      "dataSourceSystem": {
        "code": "AGIS",
        "dataProvider": {
          "code": "BLW",
          "uid": "CHE123456789"
        }
      },
      "restClient": {
        "code": "AGIS_API",
        "displayName": "Agis",
        "url": "http://example.com/agis"
      },
      "deprecatedSince": "2022-03-10T12:15:50",
      "restClientChangeDetectionPathTemplate": "v1/animal-updates/{{uid}}?since={{LAST_CHANGED_SINCE}}",
      "consentRequired": true,
      "paymentRequired": true
    }
  ],
  "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 UID_CLAIM_MISSING enum value to the response property for the response status

    • warning

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