RESTAPICLIENT
Overview
The RESTAPICLIENT workflow application allows you to call REST API endpoints to exchange information with other applications through HTTP requests, and can be used to build integrations with extendable applications (such as Azure Services and Slack).
It also allows you to call a REST API endpoint using application/json or application/x-www-form-urlencoded payloads. RESTAPICLIENT will then receive and process the response from the external API by mapping the response content with defined OUT parameters.
How it works
The RESTAPICLIENT application requires the
APP_URLparameter, which corresponds to the REST API endpoint.The default request payload content type (
APP_REQUEST_CONTENT_TYPE) isapplication/json.application/x-www-form-urlencodedandmultipart/form-dataare also supported. Usemultipart/form-datafor file uploads (see themultipart/form-dataparameters section).The default HTTP request method (
APP_METHOD) isGET. Other request methods (POST,PUT,DELETE, etc.) are also supported.In case of error, when the
APP_RESPONSE_IGNORE_ERRORIN parameter is defined and hasYas its value, the error will be ignored and defined OUT parameters (APP_RESPONSE_STATUSorAPP_RESPONSE_CONTENT) will be mapped. Otherwise, an exception will be thrown.Since the application parameters are case sensitive, parameters must use the API’s accepted notation.
The default request timeout is 30,000 milliseconds (30 seconds); this default value can be modified by setting the
RestApiClientRequestTimeoutparameter value in theweb.configfile. The request timeout can also be defined in theAPP_TIMEOUTIN parameter; the maximum timeout is 3,600,000 milliseconds (1 hour).✏️ Note: This timeout value must be less than the IIS request timeout value.
The HTTP request headers can be defined with the
APP_HEADER_xxxparameters, wherexxxis the header field name. For more information, see the Header parameters section.The request payload can be defined in the
APP_REQUEST_CONTENT_FILEorAPP_REQUEST_CONTENTIN parameters. When both parameters are defined, theAPP_REQUEST_CONTENT_FILEparameter has priority. For more information on these parameters, see the Request payload section.The response from the REST API can be mapped to the
APP_RESPONSE_CONTENT_FILEorAPP_RESPONSE_CONTENTOUT parameters. Both parameters can be defined at the same time. For more information on these parameters, see the Response payload section.Besides the optional parameters listed below, you can also add additional custom IN and OUT parameters to send and receive custom user-defined data to and from the external API. For more information on and examples of these custom IN and OUT parameters, see the Request payload and Response payload sections.
The application supports the JSONPath query language (see https://github.com/json-path/JsonPath), which allows extraction of specific data from a JSON response (similar to XPath expressions in XML). For information on how to use this with the application along with examples, see the Response payload section.
Application logs are available and can be specified by setting the
RestApiClientLogLevelparameter value in theweb.configfile to0to disable logging (default),2for simple logs, or3for debug logs.The default maximum response length is 4194304 characters (4 MB); this default value can be modified by setting the
RestApiClientMaxResponseLengthparameter value in theweb.configfile.Automatic deletion of temporary files can be disabled by setting the
RestApiClientEnableFilesCleanUpparameter value toNin theweb.configfile; the default value isY.The
APP_RESPONSE_CONTENT_FILEparameter automatically detects binary content types (PDF, images, ZIP, etc.) and saves them correctly without corruption. UseAPP_RESPONSE_CONTENT_FILENAMEto specify a custom filename.Authorization headers are automatically masked in log files for security (displays
***followed by the last 4 characters of the token).Binary response content is summarized in logs (e.g.
[Binary content, 37228 bytes, application/octet-stream]) to prevent log file bloat and ensure readability.
Required parameter
Parameter
Type
Direction
Description
APP_URL
TEXT
IN
External API URL
Optional parameters
General
Parameter
Type
Direction
Description
APP_TIMEOUT
NUMERIC
IN
Maximum time interval between sending the request and receiving the response
The default is 30,000 milliseconds (30 seconds) and the maximum is 3,600,000 milliseconds (1 hour); the default can be modified by setting the RestApiClientRequestTimeout parameter value in the web.config file.
✏️ Note: This timeout value must be less than the IIS request timeout value.
APP_METHOD
TEXT
IN
API method
The default is GET. Supports POST, PUT, DELETE, HEAD, PATCH
APP_REQUEST_CONTENT_TYPE
TEXT
IN
Request content type supported by the external API
The application supports application/json, application/x-www-form-urlencoded, and multipart/form-data; the default is application/json. Use multipart/form-data for file uploads to APIs.
APP_RESPONSE_IGNORE_ERROR
TEXT
IN
When set to Y, the application will ignore the error when a WebException occurs or the external API returns a response status equal to or greater than 300; the default is N.
APP_URL optional parameters
APP_URL optional parametersParameter
Type
Direction
Description
APP_URL_xxx
TEXT
IN
API URL optional parameter where xxx is the URL parameter name
It must be defined in the APP_URL parameter value between brackets (e.g. APP_URL_subscriptionId for the URL https://management.azure.com/subscriptions/{subscriptionId})
📌 Example
Parameter
Type
Direction
Value
APP_URL
TEXT
IN
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
APP_URL_subscriptionId
TEXT
IN
457a2a46-7a7f-4afa-940d-8779e1425fa8
APP_URL_resourceGroupName
TEXT
IN
dev-group-advantys
APP_URL_topicName
TEXT
IN
dev-topic
The parameters defined above will generate the following URL in APP_URL:
Header parameters
Parameter
Type
Direction
Description
APP_HEADER_xxx
TEXT
IN
External API header parameters where xxx is the header field name
📌 Example
Parameter
Type
Direction
Value
APP_HEADER_Authorization
TEXT
IN
Bearer AbCdEf123456
APP_HEADER_location
TEXT
IN
canadaeast
The parameters defined above will generate two headers in the request payload:
Authorization parameters
The application also supports some predefined authorization header parameters in order to avoid adding these HTTP header parameters with the APP_HEADER_xxx parameter name.
Parameter
Type
Direction
Description
APP_AUTH_BASIC_USERNAME
TEXT
IN
API authorization Basic username
APP_AUTH_BASIC_PASSWORD
TEXT
IN
API authorization Basic password; must be used with APP_AUTH_BASIC_USERNAME parameter
APP_AUTH_BEARER_TOKEN
TEXT
IN
API authorization Bearer token
APP_AUTH_AZ_SAS_TOKEN
TEXT
IN
API authorization Azure SAS token
Only one authorization header can be defined, otherwise an exception is thrown.
APP_AUTH_BEARER_TOKENis equivalent to defining the header parameterAPP_HEADER_Authorization.
multipart/form-data parameters
multipart/form-data parametersWhen APP_REQUEST_CONTENT_TYPE is set to multipart/form-data, use the following parameters to upload files and send form data to APIs.
APP_FORMFILE_xxx
FILE
IN
File to upload where xxx is the form field name expected by the API (e.g. APP_FORMFILE_file creates a form field named file)
APP_FORMDATA_xxx
TEXT, NUMERIC, or DATETIME
IN
Form data field where xxx is the field name (e.g. APP_FORMDATA_purpose creates a field named purpose)
Supported data types for APP_FORMDATA_xxx
APP_FORMDATA_xxxTEXT
Sent as-is
NUMERIC
Formatted with invariant culture (e.g. 1234.56)
DATETIME
Formatted as ISO 8601 (e.g. 2026-01-09T12:30:00Z)
📌 Example: Upload file to OpenAI Files API
APP_URL
TEXT
IN
https://api.openai.com/v1/files
APP_METHOD
TEXT
IN
POST
APP_REQUEST_CONTENT_TYPE
TEXT
IN
multipart/form-data
APP_AUTH_BEARER_TOKEN
TEXT
IN
sk-xxx
APP_FORMFILE_file
FILE
IN
(file to upload)
APP_FORMDATA_purpose
TEXT
IN
assistants
id
TEXT
OUT
DATA_FILE_ID
The parameters defined above will generate a multipart request equivalent to:
📌 Example: Upload file to Mistral Files API (OCR)
APP_URL
TEXT
IN
https://api.mistral.ai/v1/files
APP_METHOD
TEXT
IN
POST
APP_REQUEST_CONTENT_TYPE
TEXT
IN
multipart/form-data
APP_AUTH_BEARER_TOKEN
TEXT
IN
Mistral API key
APP_FORMFILE_file
FILE
IN
PDF or image file
APP_FORMDATA_purpose
TEXT
IN
ocr
id
TEXT
OUT
DATA_FILE_ID
Mistral OCR supports PDF, images, Word (.docx), PowerPoint (.pptx), and EPUB files. HTML is not supported.
When
APP_REQUEST_CONTENT_TYPEis set tomultipart/form-data, standard IN parameters (not prefixed withAPP_FORMFILE_orAPP_FORMDATA_) are not included in the request.The file's original filename and content type are preserved in the upload.
Multiple files can be uploaded by defining multiple
APP_FORMFILE_xxxparameters with different field names.
Request payload
The request payload parameters described in this section apply to application/json and application/x-www-form-urlencoded content types. For multipart/form-data requests (file uploads), see the multipart/form-data parameters section.
There are two different ways to prepare the request payload. The first way is when you have access to the whole request payload (see Set the whole request payload via a parameter below); the second way is by building the JSON or URL encoded payload via IN parameters (see URL encoded request payload and JSON request payload below).
Set the whole request payload via a parameter
The following parameters can be used when you have access to the whole request payload, or the request content type is neither application/json nor application/x-www-form-urlencoded. You can set this request payload in a file/text data or directly in the text value.
Parameter
Type
Direction
Description
APP_REQUEST_CONTENT_FILE
FILE
IN
Request payload in a file
APP_REQUEST_CONTENT
TEXT
IN
Request payload
APP_REQUEST_CONTENT_FILEhas priority overAPP_REQUEST_CONTENT.APP_REQUEST_CONTENThas priority over IN parameters used to build a JSON or an URL encoded payload.
URL encoded request payload
The following examples show how to build a request payload with application/x-www-form-urlencoded as content type.
Standard URL encoded request payload
The following parameters are used to build a standard URL encoded request payload:
Parameter
Type
Direction
Description
param1
TEXT
IN
value1
param2
TEXT
IN
value2
The parameters defined above will generate the following request payload:
JSON request payload encoded into a key name
The following parameters are used to build a JSON payload encoded into a key name:
Parameter
Type
Direction
Description
param1
TEXT
IN
value1
param2
TEXT
IN
value2
APP_REQUEST_CONTENT_PAYLOAD_NAME
TEXT
IN
payload
The parameters defined above will generate the following request payload:
The APP_REQUEST_CONTENT_PAYLOAD_NAME parameter is only supported with the application/x-www-form-urlencoded request content type.
JSON request payload
The following examples show how to build a request payload with application/json as content type.
Standard JSON request payload
The following parameters are used to build a simple JSON request payload:
Parameter
Type
Direction
Value
person.address.street
TEXT
IN
160 Guy Street
person.address.zipcode
TEXT
IN
J4G 1U4
person.age
TEXT
IN
30
person.name
TEXT
IN
John
The parameters defined above will generate the following request payload:
If you want to convert this JSON into an array, you have to set the APP_REQUEST_CONTENT_IS_ARRAY parameter value to Y.
Parameter
Type
Direction
Description
APP_REQUEST_CONTENT_IS_ARRAY
TEXT
IN
When set to Y, the application will convert the JSON request payload into an array; the default is N
Only supported when building JSON request payload with IN parameters.
Setting the APP_REQUEST_CONTENT_IS_ARRAY parameter to Y will generate the following request payload:
To see how to build more complex JSON, see Setting a JSON array into a JSON property and Setting a JSON object/array into a JSON property using the __JSON suffix parameter sections below.
Setting a JSON array into a JSON property
To set an array into a JSON property, you have to define the property path (e.g. person.spokenlanguages) followed by the __X suffix, where X is the array index number.
The following parameters are used to set a JSON array into a JSON property:
Parameter
Type
Direction
Value
person.spokenlanguages__0
TEXT
IN
french
person.spokenlanguages__1
TEXT
IN
english
person.spokenlanguages__2
TEXT
IN
chinese
The parameters defined above will generate the following request payload:
If you want to set a JSON array of JSON objects (e.g. "spokenlanguages": [{"spokenlanguage":"french"}, {"spokenlanguage":"english"}]) into a JSON property, see the next section.
The array parameters will be ordered depending on their index number.
Index numbers have no limit (e.g.
person.spokenlanguages__9999).A correct index sequence is not mandatory (e.g.
person.spokenlanguages__90,person.spokenlanguages__30). The__30parameter value will be the first array parameter, and__90the second one.An exception will be thrown if there is more than one JSON property specified in the IN parameters (e.g.
person.spokenlanguagesandperson.spokenlanguages__0).The
__Xsuffix uses two underscore characters.The parameter value can only be a text value.
Setting a JSON object/array into a JSON property using the __JSON suffix parameter
__JSON suffix parameterTo set a JSON object/array into a JSON property, you have to define the property path (e.g. person.children) followed by the __JSON suffix with the JSON object/array as the parameter value.
The following parameters are used to set a JSON object/array into a JSON property:
Parameter
Type
Direction
Value
person.children__JSON
TEXT
IN
[{"name": "child 1"}, {"name": "child 2"}]
The parameters defined above will generate the following request payload:
An exception will be thrown if there is more than one JSON property specified in the IN parameters. (e.g.
person.childrenandperson.children__JSON).The
__JSONsuffix uses two underscore characters.
Response payload
The application supports OUT parameters to be mapped with the HTTP response:
Parameter
Type
Direction
Description
APP_RESPONSE_STATUS
TEXT/NUMERIC
OUT
Response status code
APP_RESPONSE_CONTENT_TYPE
TEXT
OUT
Response content type
APP_RESPONSE_CONTENT_FILE
FILE
OUT
Response payload saved as a file
Automatically detects binary content types (PDF, images, ZIP, etc.) and saves them correctly without corruption. Text content types (JSON, XML, HTML) are saved as UTF-8 text.
APP_RESPONSE_CONTENT_FILENAME
TEXT
IN
Optional. Specifies a custom filename for the APP_RESPONSE_CONTENT_FILE output. If not specified, the filename is determined from the Content-Disposition header or defaults to response.[extension] based on content type.
APP_RESPONSE_CONTENT
TEXT
OUT
Response payload or error message
APP_RESPONSE_CONTENT_IS_ARRAY
TEXT
OUT
Returns Y if the JSON payload is an array
Only supported for application/json content type responses.
Binary vs text content types
APP_RESPONSE_CONTENT_FILE automatically detects the content type and uses the appropriate save method:
Text content types (saved as UTF-8 text)
text/*(text/plain, text/html, text/csv, text/xml, etc.)application/json,application/ld+jsonapplication/xml,application/xhtml+xmlapplication/javascriptapplication/yaml,application/tomlapplication/sql,application/graphql
Binary content types (saved as raw bytes)
application/pdfapplication/octet-streamapplication/zip,application/gzip,application/x-tarapplication/vnd.*(Microsoft 365 documents:docx,xlsx,pptx)image/*(jpeg,png,gif,webp, etc.)audio/*(mp3,wav,ogg, etc.)video/*(mp4,webm,mov, etc.)
Filename resolution
The filename for APP_RESPONSE_CONTENT_FILE is determined in this priority order:
Content-Dispositionheader: If the API returnsContent-Disposition: attachment; filename="report.pdf", that filename is used.APP_RESPONSE_CONTENT_FILENAMEparameter: If specified by the user.Fallback:
response.[extension], whereextensionis derived from the content type (e.g.response.pdfforapplication/pdf;response.binforapplication/octet-stream).
📌 Example: Download file from OpenAI
APP_URL
TEXT
IN
https://api.openai.com/v1/files/{file_id}/content
APP_URL_file_id
TEXT
IN
file-abc123
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
sk-xxx
APP_RESPONSE_CONTENT_FILE
FILE
OUT
DATA_DOWNLOADED_FILE
OpenAI only allows downloading files with purpose: batch or purpose: fine-tune. Files with purpose: assistants or purpose: user_data cannot be downloaded via the /content endpoint.
📌 Example: Download file from Mistral (with custom filename)
APP_URL
TEXT
IN
https://api.mistral.ai/v1/files/{file_id}/content
APP_URL_file_id
TEXT
IN
File ID
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
Mistral API key
APP_RESPONSE_CONTENT_FILENAME
TEXT
IN
my_document.pdf
APP_RESPONSE_CONTENT_FILE
FILE
OUT
DATA_DOWNLOADED_FILE
Mistral's /content endpoint returns application/octet-stream without a Content-Disposition header. You must specify APP_RESPONSE_CONTENT_FILENAME to get the correct filename and extension. Without it, the file will be saved as response.bin.
Mapping a JSON response payload with OUT parameters
The application also supports additional custom OUT parameters to map simple JSON response payloads.
📌 Example
JSON response payload:
The following parameters allow you to map the response payload into different process data:
Parameter
Type
Direction
Retrieve the value into a data
person.address.street
TEXT
OUT
DATA_STREET
person.address.zipcode
TEXT
OUT
DATA_ZIPCODE
person.age
TEXT
OUT
DATA_AGE
person.name
TEXT
OUT
DATA_NAME
For mapping complex JSON, see the next section.
Mapping a JSON response payload with OUT parameters using JSONPath query language
The application supports the JSONPath query language (similar to XPath expressions in XML). This language allows you to retrieve specific data from a JSON. For more details regarding the JSONPath syntax, see https://github.com/json-path/JsonPath.
📌 Example
JSON response payload:
For example, here we want to get the names of Charles's grandchildren who are older than seven years old, and we also want these names separated by a | (using the APP_JSONPATH_DELIMITER IN parameter). At the same time, we are also getting Elizabeth's age and date of birth. To get the information, the following parameters must be defined:
APP_JSONPATH_DELIMITER
TEXT
IN
|
PARAM1__JSONPATH
TEXT
INOUT
person.children[?(@.name == 'Charles')].children[*].children[?(@.age > 7)].name
data DATA1_VALUE (value will be: George|Charlotte)
AGE__JSONPATH
TEXT
IN
$.person.age
AGE
NUMERIC
OUT
data AGE_VALUE (value will be: 85)
DOB__JSONPATH
TEXT
IN
$.person.dob
DOB
DATETIME
OUT
data DOB_VALUE (value will be: 1937-09-23T00:00:00Z)
In the
PARAM1__JSONPATHparameter name, thePARAM1name is not relevant, but it must be followed by the__JSONPATHsuffix (two underscores are used in the suffix).To retrieve a value into a Text process data, you can use a single INOUT Text parameter (e.g.
PARAM1__JSONPATHparameter as in the example above).To retrieve a value into a Numeric or DateTime process data, you must use separate parameters: an IN Text parameter for the JSONPath query and an OUT parameter that maps to the Numeric or DateTime process data. Both parameters must share the same name prefix (e.g.
AGE__JSONPATHandAGEparameters as in the example above).The default value of
APP_JSONPATH_DELIMITERis a comma (,) when this parameter is not defined.
Usage example with Azure REST API to obtain an OAuth 2.0 access token and then create an Event Grid topic
This example shows how to obtain an access token and use it to create an Event Grid topic. This can be done by creating a process with two actions having RESTAPICLIENT as application. The workflow below illustrates this example:

The next sections describe the parameters that must be declared for each action.
GET_TOKEN action: Obtaining an OAuth 2.0 access token
GET_TOKEN action: Obtaining an OAuth 2.0 access tokenThe following parameters are needed to get an access token to use the Azure Resource management API. This token will be stored in the access_token OUT parameter and will be used when creating an Event Grid topic in the next section.
Parameter
Type
Direction
Value
APP_URL
TEXT
IN
https://login.microsoftonline.com/{tenandId}/oauth2/token
APP_URL_tenantId
TEXT
IN
a6e70c61-fabd-4885-89f7-97121e92db7f
APP_METHOD
TEXT
IN
POST
APP_REQUEST_CONTENT_TYPE
TEXT
IN
application/x-www-form-urlencoded
grant_type
TEXT
IN
client_credentials
client_id
TEXT
IN
b7e29e2f-6e2b-4375-9684-8151431d4ca6
client_secret
TEXT
IN
lxy/IwKyTedHUWMeeUtyCtu7/YUy0rNGoY3NNWXXotI=
resource
TEXT
IN
https://management.core.windows.net/
access_token
Text
OUT
DATA_ACCESS_TOKEN
The parameters defined above will generate the following request payload:
Here's the response from the Azure API:
The access_token OUT parameter is mapped with the access_token JSON property.
For more details about how to get an access token to use the Azure Resource API, see https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#request-an-access-token.
CREATE_TOPIC action: Creating an Event Grid topic
CREATE_TOPIC action: Creating an Event Grid topicThe following parameters are needed to create an Event Grid topic using the Azure Resource management API.
Parameter
Type
Direction
Value
APP_URL
TEXT
IN
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}?api-version={api-version}
APP_URL_subscriptionId
TEXT
IN
235765d9-5d62-43f4-a730-2ed71a3f8adb
APP_URL_resourceGroupName
TEXT
IN
dev-group-advantys
APP_URL_topicName
TEXT
IN
new-topic-example
APP_URL_api-version
TEXT
IN
2018-09-15-preview
APP_METHOD
TEXT
IN
PUT
APP_REQUEST_CONTENT_TYPE
TEXT
IN
application/json
APP_AUTH_BEARER_TOKEN
TEXT
IN
DATA_ACCESS_TOKEN
location
TEXT
IN
canadaeast
The parameters defined above will generate the following request payload:
Here's the response from the Azure API:
For more information about how to create an Event Grid topic and the Azure REST API, see https://docs.microsoft.com/en-us/rest/api/eventgrid/topics/createorupdate.
Usage example with OpenAI Files API
This example shows how to upload a file to OpenAI, list files, download a file, and delete a file using RESTAPICLIENT.
UPLOAD_FILE action: Uploading a file
UPLOAD_FILE action: Uploading a fileAPP_URL
TEXT
IN
https://api.openai.com/v1/files
APP_METHOD
TEXT
IN
POST
APP_REQUEST_CONTENT_TYPE
TEXT
IN
multipart/form-data
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_FORMFILE_file
FILE
IN
File to upload
APP_FORMDATA_purpose
TEXT
IN
batch
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
id
TEXT
OUT
DATA_FILE_ID
filename
TEXT
OUT
DATA_FILENAME
Here's the response from the OpenAI API:
LIST_FILES action: Listing uploaded files
LIST_FILES action: Listing uploaded filesAPP_URL
TEXT
IN
https://api.openai.com/v1/files
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
APP_RESPONSE_CONTENT
TEXT
OUT
DATA_RESPONSE
object
TEXT
OUT
DATA_OBJECT
DOWNLOAD_FILE action: Downloading file content
DOWNLOAD_FILE action: Downloading file contentAPP_URL
TEXT
IN
https://api.openai.com/v1/files/{file_id}/content
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_CONTENT_FILE
FILE
OUT
DATA_DOWNLOADED_FILE
Only files with purpose: batch or purpose: fine-tune can be downloaded. Files with purpose: assistants or purpose: user_data will return a 400 error.
DELETE_FILE action: Deleting a file
DELETE_FILE action: Deleting a fileAPP_URL
TEXT
IN
https://api.openai.com/v1/files/{file_id}
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
DELETE
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
id
TEXT
OUT
DATA_FILE_ID
deleted
TEXT
OUT
DATA_DELETED
Usage example with Mistral Files API
This example shows how to upload a file to Mistral for OCR, get a signed download URL, download the file, and delete it.
UPLOAD_FILE action: Uploading a file for OCR
UPLOAD_FILE action: Uploading a file for OCRAPP_URL
TEXT
IN
https://api.mistral.ai/v1/files
APP_METHOD
TEXT
IN
POST
APP_REQUEST_CONTENT_TYPE
TEXT
IN
multipart/form-data
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_FORMFILE_file
FILE
IN
PDF or image file
APP_FORMDATA_purpose
TEXT
IN
ocr
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
id
TEXT
OUT
DATA_FILE_ID
filename
TEXT
OUT
DATA_FILENAME
Mistral OCR supports PDF, images, Word (.docx), PowerPoint (.pptx), and EPUB files. HTML is not supported.
RETRIEVE_FILE action: Getting file metadata
RETRIEVE_FILE action: Getting file metadataAPP_URL
TEXT
IN
https://api.mistral.ai/v1/files/{file_id}
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
filename
TEXT
OUT
DATA_FILENAME
purpose
TEXT
OUT
DATA_PURPOSE
GET_SIGNED_URL action: Getting a signed download URL
GET_SIGNED_URL action: Getting a signed download URLGet a temporary signed URL for downloading the file. This is useful for sharing or delayed downloads.
APP_URL
TEXT
IN
https://api.mistral.ai/v1/files/{file_id}/url
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
url
TEXT
OUT
DATA_SIGNED_URL
Here's the response from the Mistral API:
The signed URL expires after 24 hours by default. Add ?expiry=48 to the request URL for a custom expiry (in hours).
DOWNLOAD_FILE action: Downloading file content directly
DOWNLOAD_FILE action: Downloading file content directlyAPP_URL
TEXT
IN
https://api.mistral.ai/v1/files/{file_id}/content
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
GET
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_CONTENT_FILENAME
TEXT
IN
DATA_FILENAME
APP_RESPONSE_CONTENT_FILE
FILE
OUT
DATA_DOWNLOADED_FILE
You must specify APP_RESPONSE_CONTENT_FILENAME when downloading from Mistral. The API returns application/octet-stream without a filename. Use the filename from the retrieve/upload response, or specify your own (e.g., document.pdf).
DELETE_FILE action: Deleting a file
DELETE_FILE action: Deleting a fileAPP_URL
TEXT
IN
https://api.mistral.ai/v1/files/{file_id}
APP_URL_file_id
TEXT
IN
DATA_FILE_ID
APP_METHOD
TEXT
IN
DELETE
APP_AUTH_BEARER_TOKEN
TEXT
IN
API key
APP_RESPONSE_STATUS
NUMERIC
OUT
DATA_STATUS
id
TEXT
OUT
DATA_FILE_ID
deleted
TEXT
OUT
DATA_DELETED
Enabling SSL/TLS
In case of a Could not create SSL/TLS secure channel error, strong encryption must be enabled by executing the following code in PowerShell:
Restart your IIS server after executing the commands.
Last updated