All Collections
Paperless Forms | BI
Connectors creation
How to create an API for the Azure File Storage
How to create an API for the Azure File Storage

#EN #BI #Azure

Updated over a week ago

Definition

Creating an API for the Azure file storage will allow you to make uploads and downloads of the files within the Manage templates section of the Paperless Forms website.


/download

Description

Allows to download one or more files from an Azure File Storage in Paperless Forms.

URL Structure

https://paperless.datahex.ca/templatemanagement/download

Authentication

  • Basic authentication.

  • Use a Paperless Forms user that has the « API »* role.

*New role created only to allow the creation of an API with the Azure template management system and can be made accessible by our support team.

Example

curl -X POST https://paperless.datahex.ca/templatemanagement/download \ 
--header "Basic authentication <Basic auth token>" \
--header "Paperless-Api-Arg: {\"databaseid\":<Database API Key>,\"path\":\"/Document/Lists/Name of the file.xlsx\"}"

Parameters

{ 
"databaseid": "<Database API Key>"
"path": "/Document/Lists/Name of the file.xlsx"
}
  • databaseid : Database API key found in the Manage templates section of the Paperless Forms website.

  • path : This corresponds to the path in the directory where the file to download is located.


/upload

Description

Allows you to upload one or more files to an Azure File Storage in Paperless Forms.

URL Structure

https://paperless.datahex.ca/templatemanagement/upload

Authentication

  • Basic authentication.

  • Use a Paperless Forms user that has the « API »* role.

*New role created only to allow the creation of an API with the Azure template management system and can be made accessible by our support team.

Example

curl -X POST https://paperless.datahex.ca/templatemanagement/upload \ 
--header "Basic authentication <Basic auth token>" \
--header "Paperless-Api-Arg: {\"databaseid\":<Database API Key>,\"overwrite\":true,\"path\":\"/Document/Lists/Name of the file.xlsx\"}"
--header "Content-Type: application/octet-stream" \
--data-binary @local_file.xlsx

Parameters

{ 
"databaseid": "<Database API Key>",
"overwrite": true,
"path": "/Document/Lists/Name of the file.xlsx"
}
  • databaseid : Database API key found in the Manage templates section of the Paperless Forms website.

  • overwrite : Optional – Set to "true" to allow overwriting of a file of the same name if found, or "false" to create a new one.
    The "true" option is set by default.

  • path : This corresponds to the path in the directory where the file should be uploaded.

Did this answer your question?