Filter records by concept
The
id
field in the
concept
endpoint and the
columnId
in the
records
endpoint share the same value. Depending on the
question type, a concept can have more than one
columnId
in the record. For example, a grid question has a
columnId
for the question, and each row in the grid. Use
this page to help you identify which concept
id
to use when filtering the records on the
columnId
.
Use the appropriate regional endpoint to ensure that you comply with your organization's privacy policy, and applicable laws and regulations. For details about the available regional endpoints, and how to identify your organization's region, see API Access.
Get records for a concept in a survey
id
in the concepts endpoint and the
columnID
in the records endpoint are the same for the
following question types:
- Single and Multiple Choice
- Open End (Long and Short answers)
- Date
- Allocation
- Rank Order
- Phone Number
- Number
- Zip/Postal Code
Example concept ID | ||||
---|---|---|---|---|
The following table shows the concept ID for a Single Choice
question in a survey. Notice that the concept
|
Get records for a given concept |
---|
Using the Single Choice question in the example above, append the
value in the
GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId=beed94d4-82d7-d3d4-430e-b5cc2f222bfa |
Get records for a given set of concepts
Use a comma or ampersand to separate multiple concepts in the GET request.
Example: Comma separator |
---|
GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId={givenConceptId1},{givenConceptId2} |
Example: Ampersand separator |
---|
GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId={givenConceptId1}&conceptId={givenConceptId2} |
Get records for an other/specify answer
Text field ("other/specify") options in a Single or Multiple
Choice question have their own concept ID in the dataset. To get records for an
"other/specify" answer, use the
columnID
in the value pair.
The following table shows the concepts and records for a Single Choice
question with an
"other/specify" option. Notice that the concept
id
for
"answerType": "TextAnswer"
is the same as the
columnId
in the record.
/concepts
|
/records
|
---|---|
|
|
Get records for an other/specify option |
---|
Using the
"other/specify" answer in the example above, append the value in
the
GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId=129757e4-da43-bc04-cf1e-3d28b6dd4c9b |
Get records for rows in a Grid question
Each row in a grid question has its own concept ID. The GUID for grid
row's concept ID, is the same as the
columnId
in the concepts endpoint.
To get the records for all the rows in a Single or Multiple Choice
grid question, use the concept
id
.
Example: Concept ID for a grid question |
---|
The concept id for the Single Choice grid question named
"Frequency" is
|
Example: GET the records for all the rows in a grid question. |
---|
Using the Single Choice grid question in the example above, append
the question's concept
GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId=6b6cfa34-aa9f-017e-750f-8441b7693a90 |
After you get the records for the grid's parent concept, you can use
the GUID in the
columnID
field to get the records for the child
concepts.
Example |
---|
The concept ID for each row of the grid question is the GUID in the
columnId field.
|
Get the records for a row or rows in a grid question |
---|
Using the example above, append the value in the
Use a comma or ampersand to get the records for multiple rows. GET
https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/datasets/{datasetId}/records?conceptId=47b792bc-c4ed-58d1-847c-b647952d7877,c9b65815-aa26-a85b-22fb-5840b6828df6 |