noark5_upload_file
Upload a local file to a Noark 5 entity that exposes a fil relation, and retrieve the created or updated archive objects in the response.
Instructions
Upload a file to an entity that has a fil relation key.
Any entity whose _links contains the relation key https://rel.arkivverket.no/noark5/v5/api/arkivstruktur/fil/ supports upload. (Use noark5_entity_links or noark5_list_children to discover this.)
Resolves the href of the fil relation from the entity's _links, then POSTs raw binary content to that URL. The server returns JSON containing all created and updated instances — typically a dokumentobjekt with file metadata (filnavn, mimeType, checksum, etc), plus any other entities it created during the upload (e.g., an embedded dokumentbeskrivelse when uploading from a registrering).
Args: entity_url: The self-href URL of any entity with a fil relation key. file_path: Path to a local file to upload. mime_type: MIME type of the uploaded file (default: application/octet-stream).
Returns details of all created/updated entities from the server response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| mime_type | No | application/octet-stream | |
| entity_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |