Data Products

Add Data Product Document

Changed on

Uploads a document to a data product. Accessible to the owning provider and admins.

post/api/products/v2/{id}/documents

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_Admin)

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 multipart/form-data

documentstring binary

Response

OK

idstring uuid required
fileNamestring required

Filename of the document

sizeBytesinteger required

Filesize of the document

scanStatus'PENDING_SCAN' | 'AVAILABLE' | 'REJECTED' | 'SCAN_FAILED' required

Example response

{
  "fileName": "example.pdf",
  "sizeBytes": 1024
}

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