Data Products
Patch Data Product
Partially updates an existing data product. Each provided field is validated against the data product's current state and the caller's role. If any field cannot be updated, the entire request is rejected and no changes are applied.
patch/api/products/v2/{id}
Path parameters
idstring uuid required
Query parameters
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.
Request body
Example request
{
"name": {
"de": "Tierschutz",
"fr": "Protection des animaux",
"it": "Protezione degli animali"
},
"description": {
"de": "Dieses Datenprodukt enthält Angaben zu Kontrollen aus dem Kontrollbereich 03 Tierschutz mit den Ergebnissen pro Kontrollpunkt. Maximal die letzten 4 Jahre oder seit Bewirtschafterwechsel.",
"fr": "Ce produit de données contient des informations sur les contrôles du domaine de contrôle 03 Protection des animaux avec les résultats par point de contrôle. Maximum les 4 dernières années ou depuis le changement d'exploitant.",
"it": "Questo prodotto dati contiene informazioni sui controlli dell'area di controllo 03 Protezione degli animali con i risultati per punto di controllo. Massimo gli ultimi 4 anni o dal cambio di gestore."
},
"restClientPathTemplate": "v1/animal/{{uid}}",
"restClientRequestTemplate": "{\"search\":{\"uid\":\"{{uid}}\"}}",
"restClientChangeDetectionPathTemplate": "v1/animal-updates/{{uid}}?since={{LAST_CHANGED_SINCE}}",
"extendedDescription": {
"de": "Konkret werden folgende Daten übermittelt:\n- Datum der Erfassung bzw. der letzten Änderung dieses Datensatzes im kantonalen System\n- KT_ID_B Kantonale Identifikationsnummer der Betriebsform auf der Stufe, auf der die nachfolgenden Daten...",
"fr": "Concrètement, les données suivantes sont transmises :\n- Date resp. la saisie ou la dernière modification du jeu de données dans le système cantonal\n- KT_ID_B Numéro cantonal de la forme d’exploitation au niveau de laquelle les données suivantes ont été saisies...",
"it": "Concretamente vengono trasmessi i dati seguenti:\n- Data di registrazione o dell’ultima modifica di questo set di dati nel sistema cantonale\n- KT_ID_B Numero d’identificazione cantonale della forma di azienda al livello a cui sono stati registrati i dati..."
}
}Response
OK
Example response
{
"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}}"
}