The RedJade API is a standard REST endpoint. There is no need for permanent access, RedJade can be polled on an as needed basis.
The Study Data endpoint returns data in a JSON format. It is read-only, and initiated on the end-user side by simple web requests. This endpoint allows end-users to download all data collected in RedJade to enable further analysis or record keeping. RedJade groups data by "Sensory Test" and depending on the number of participants surveyed can make the test range in size anywhere between 1MB to 50MB.
The Participant Import endpoint uploads study participants and their associated demographic data to sensory tests within RedJade. The import is initiated on the end-user side by simple web requests. This endpoint allows end-users to use 3rd party systems to qualify and schedule participants, then add the selected participants to participate in RedJade sensory tests. You can import files up to 100MB in size.
Detailed documentation for RedJade API can be viewed at https://docs.redjade.net/index.html
NOTE – You must be set up as a company administrator in RedJade to manage API access. |
See the following:
Create an API Key
Create and API key to enable access to the RedJade API.
To create an API key:
- From the ADMIN section, select COMPANY from the left navigation pane.
- Click on [API KEYS].
- Click on [CREATE].
- Enter a Name and optional Description, then click [CREATE].
- The API key is created. Click on Show to expose the Client Secret key. Copy the Client ID and Client Secret and store them in a secure place.
NOTE – This is the only time that a secret access key can be viewed. You cannot recover it later. However, you can create new access keys at any time. NOTE – For your protection, you should never share your secret keys with anyone or post them on a public platform. As a best practice we recommend periodically rotating out your secret keys. If you loose or forget your secret key, you can not retrieve it. Instead, create a new access key and delete the old key.
Click on [FINISH]. - Refer to the RedJade API Documentation to get started with using the RedJade API.
Delete an API Key
Delete an API key to remove access to the RedJade API.
To delete an API key:
- From the ADMIN section, select COMPANY from the left navigation pane.
- Click on [API KEYS].
- Click the delete button.
- Type the client ID in the confirmation field then click on [I UNDERSTAND THE CONSEQUENCES, DELETE API KEY].
NOTE – Deleted access keys cannot be recovered. A new access key will need to be created and any applications where the key is used updated.
The key is removed.
Download Study Data
A typical use case for the API is to download a JSON file for every test in the system. Be sure you include your authorization header with each request.
To download study data:
- After registering your 3rd party application with RedJade you will be provided with a client_id and client_secret in the following format.
client_id: qm8c24a36ygj88azbwhr
client_secret: wbfbqaguuefg5g2jdn72qsrng4yxwsm6jbk8k5fk
Your integration will need to provide these credentials to log-in and obtain a bearer access token. This bearer token will be valid for 1 hour.REDJADE_CLIENT_ID=d5a72e97f20a561962f7
REDJADE_CLIENT_SECRET=9308b536c5bf047df8aabe245e7494ae715d427f
curl --request POST \
"https://app.redjade.net/api/v1/oauth/access_token?client_id=${REDJADE_CLIENT_ID}&client_secret=${REDJADE_CLIENT_SECRET}"
{
"response": {
"access_token": "bd384509c7e2aff770e83229f741c710be7db446c207ac89",
"token_type": "Bearer"
}
} Get a list of your tests:
BEARER_TOKEN=bd384509c7e2aff770e83229f741c710be7db446c207ac89
curl "https://app.redjade.net/api/v1/sensory_tests?page=1&per=10" \
-H "authorization: Bearer ${BEARER_TOKEN}"
{
"response":
[
{
"id": 1111,
"name": null,
"consumer_name": null,
"test_type": "acceptance",
"project_id": 2222,
"is_launched": true,
"title": "Acceptance Test",
"project_name": "Plots Are Trash",
"created_by_name": "Evan Lemke",
"created_at": "2024-01-10T15:15:26.760Z",
"updated_at": "2024-01-10T15:43:46.129Z",
"project_archived_at": null,
"status": "launched",
"analysis_ids":
[
3333
],
"data_collected_at": "2024-01-10T15:56:45.719Z"
},
{
"id": 1112,
"name": "acceptance data import",
"consumer_name": null,
"test_type": "acceptance",
"project_id": 2222,
"is_launched": true,
"title": "acceptance data import",
"project_name": "asdf",
"created_by_name": "Evan Lemke",
"created_at": "2024-01-10T14:51:55.311Z",
"updated_at": "2024-01-10T14:51:56.760Z",
"project_archived_at": null,
"status": "complete",
"analysis_ids":
[
3334,
3335,
],
"data_collected_at": null
}
...
],
"count": 10,
"pagination":
{
"current": 1,
"previous": null,
"next": 2,
"per_page": 10,
"pages": 68,
"count": 674
}
}Download the JSON file for each test:
TEST_ID=1111 BEARER_TOKEN=bd384509c7e2aff770e83229f741c710be7db446c207ac89
curl "https://app.redjade.net/api/v1/calcs/payload?sensory_test_id=${TEST_ID}" \ -H "authorization: Bearer ${BEARER_TOKEN}"
{ "samples": [ { "id": 597277, "code": "1", "name": "Current Control", }, { "id": 597278, "code": "2", "name": "Current Recipe", }, ], "participants": [ { "id": 7646350, "code": "1001", "name": "1001", }, { "id": 7646351, "code": "1002", "name": "1002", }, ], "surveys": [ { "id": 281594, "title": "A Survey", "questionnaire_type": "single_sample", "questions": [ { "id": 5485152, "question_type": "discrim:anota", "text": "Compared to the REFERENCE SAMPLE, this sample is…(Read responses carefully)Sample {{sample_code}}", "answers": [ { "id": "f66b6e42-b16f-4b48-f79b-32b5d4065b60", "text": "6-The same, I'm sure of it", "value": "same_sure", }, { "id": "4998f934-838c-4a16-ba74-a6a94d78cc7a", "text": "5-The same, but I'm not sure of it", "value": "same_not_sure", }, { "id": "ad295908-f134-4f82-bdad-99551cf003d8", "text": "4-I don't know, but guess it's the same", "value": "same_guess", }, { "id": "7f1374c2-c552-41db-83fb-fc7e5073e5c1", "text": "3-I don't know, but guess it's different", "value": "different_guess", }, { "id": "6c31cbb1-0074-4363-ef4c-b27a83be91e6", "text": "2-Different, but I'm not sure of it", "value": "different_not_sure", }, { "id": "59dacc85-6fe6-4d1d-f7f2-1ed465962024", "text": "1-Different, I'm sure of it", "value": "different_sure", } ], } ], "completed_surveys": [ { "participant_id": 7646409, "sample_ids": [ 597278 ], "questions": [ { "id": 5485152, "selected_answers": [ { "id": "f66b6e42-b16f-4b48-f79b-32b5d4065b60", "answered_at": 1688049772774 } ], }, ] }, ] } ] }