Handling Preview Operations
When a any workflow is about to get executed, MineOS makes an API call to the URL set in the Preview URL field. The HTTP request is of the following form:
POST https://example.com/endpoint HTTP/1.1
X-Mine-Signature: 4r4ClKnSeGWvTGQzMCUcEEK9uF528mvOlN/jtKMQ==
Content-type: application/json
{
"traceId": "123456789abcdefghijklm",
"integrationId": "0c36xnykgewwbzfukh1jkq",
"isTest": true
...
}
The receiving endpoint is expected to return 200 OK with a JSON response body that includes a summary of user data records found. This data will not be shared with the requesting user, and is used as internal information to help you choose how to handle the request.
The response JSON must satisfy match the following structure:
{
"records": [
{
"name": "firstRecord",
"properties": [
{
"name": "fieldName",
"value": "fieldValue"
},
{
"name": "anotherName",
"value": "anotherValue"
}
]
},
...
]
}
Notes
- You can returns as many records as you want
- You can only return up to 3 properties for each record.
- All property types should be string.
- The request object does not always exist in a preview request.
Updated 4 days ago