I am trying to integrate the RedCap System using model in Skuid.
Following API request is working fine external tool:
#!/bin/sh
DATA=“token=XXXXXXXXXXXX&content=project&format=json&returnFormat=json”
CURL=which curl
$CURL -H “Content-Type: application/x-www-form-urlencoded”
-H “Accept: application/json”
-X POST
-d $DATA
https://redcap.XXXX.org/api/
But, when I trying to build same request from Model with following, I am getting error:
- Model behavior: Read/Write
- Method Query:
Data source URL: /api/
Data source HTTP verb: POST
Request body contents: As templated request body
Custom request:
{
‘token’: ‘XXXXXXXXXXXX’,
‘content’: ‘project’,
‘format’: ‘json’,
‘returnFormat’: ‘json’
}
Please let me know what I am missing. Thanks in advance.