Hi everyone,
I have a large group of records ~20,000 that I need to import into my REDCap project. I would like to utilize the API playground and function in REDCap and make the connection via Alteryx since all my data has been cleaned and prepared in there. Has anyone done this in REDCap before and had success? Any tips/pointers would be really helpful!
Some questions I am running into include the import template I have set up in my REDCap project - does the data need to look like this format before it can be imported into REDCap? Can I feed the download tool in Alteryx with something besides the input text tool?
Thank you!
Hey @lamiah13 I'm not familiar with REDCap but have you taken a look at the documentation for this API?
If you're able to build a POST/PUT request I imagine this can be done with the download tool.
Cheers,
Hi! I'm trying to do the same thing (only export). The only API i have experience with is the Census API, and I can successfully have used the download tool in Alteryx to export ACS data. However, the documentation for REDCap is very different than the Census, and so I don't understand how to put together the API call.
An example CURL API call they have for REDCap is:
#!/bin/sh
. ./config
DATA="token=$API_TOKEN&content=record&format=json&type=flat"
$CURL -H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json" \
-X POST \
-d $DATA \
$API_URL
I have my token so I can replace that in the call. But where do I put in the URL (https://redcap.vumc.org/api/)? How do I put this information into the Download tool correctly? When I pull from the CEnsus, I have a single string I construct and feed into the download tool, and use that.
so I actually solved this using the Python tool instead, and just copied over the Python code from the API PLayground that REDCAP offers!
for learning purposes:
this ->
"token=$API_TOKEN&content=record&format=json&type=flat"
is the body of your payload -> it's a field you would feed into your download tool. note -> the &s represent different fields/form types). you would replace $API_TOKEN with your api token.
"Content-Type: application/x-www-form-urlencoded" \ -H "Accept: application/json" \
are headers you would hard code as key/value pairs (in this case Content_Type and Accept -> Postman auto generates them for you - Alteryx does not.
$API_URL
this is the URL of your api. presumably url coded if need be.
User | Count |
---|---|
60 | |
24 | |
24 | |
21 | |
21 |