Obtain a detailed list of fields and field groups for a given activity.
Prerequisite
- Obtain the
datasetId(e.g.activityId) by making a request to /datasets/activity.
Resource URL
/v2/applications/{communityApiKeyName}/datasets/activity/{datasetId}/fields
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 Shared responsibility.
Available methods
| Method | Description |
|---|---|
| GET | Obtain a list of fields and field groups for a Community survey or power survey. |
Available fields
| Element | Description |
|---|---|
dataType
|
The type of data answer values are stored as.
Possible values are:
This element can be found under the property container
|
description
|
The question text of a survey question. |
id
|
The field's GUID. |
isRequired
|
This element is returned as
true if the question was specified as required
during survey authoring. Otherwise, it is omitted.
This element can be found under the property container
|
isSensitive
|
The value determines whether the field
contains sensitive data. Possible values are:
|
isSystem
|
The value determines whether it is a system
question. Possible values are:
This element can be found under the property container
|
name
|
The name of the survey question.
Note: The survey question name is appended if it is one of the
following question types:
For more information, see Extract Activities. |
values
|
The options of a survey question.
Note:
values are only applicable to
enum and
set data types.
This element can be found under the property container
|
visibility
|
The visibility setting of the question.
Possible values are:
This element can be found under the property container
|
| Element | Description |
|---|---|
description
|
The question text of a survey question.
This element can be found under the property container
|
fieldIds
|
The list of field IDs included in the field group. |
id
|
The field group's GUID. |
name
|
The name of the survey question associated with the field group. |
Example
A response payload for a Single Choice Grid question with three rows and four answer option columns:
{
"fields": [
{
{
"id": <GUID of the field associated with row 1>,
"name": <the question name_name of row 1>,
"type": {
"dataType": <enum|string|double|datetime|identifier|set>,
"values": [
{
"id": <GUID of column 1>,
"name": <text from column 1>
},
{
"id": <GUID of column 2>,
"name": <text from column 2>
},
{
"id": <GUID of column 3>,
"name": <text from column 3>
},
{
"id": <GUID of column 4>,
"name": <text from column 4>
}
]
},
"isSensitive": <true|false>,
"meta": {
"description": <question text>
"visibility": <active|hidden>
"isSystem": <true|false>
"isRequired": <true|(omitted)>
}
},
{
"id": <GUID of the field associated with row 2>,
"name": <the question name_name of row 2>,
"type": {
"dataType": <enum|string|double|datetime|identifier|set>,
"values": [
{
"id": <GUID of column 1>,
"name": <text from column 1>
},
{
"id": <GUID of column 2>,
"name": <text from column 2>
},
{
"id": <GUID of column 3>,
"name": <text from column 3>
},
{
"id": <GUID of column 4>,
"name": <text from column 4>
}
]
},
"isSensitive": <true|false>,
"meta": {
"description": <question text>
"visibility": <active|hidden>
"isSystem": <true|false>
"isRequired": <true|(omitted)>
}
},
{
"id": <GUID of the field associated with row 3>,
"name": <the question name_name of row 3>,
"type": {
"dataType": <enum|string|double|datetime|identifier|set>,
"values": [
{
"id": <GUID of column 1>,
"name": <text from column 1>
},
{
"id": <GUID of column 2>,
"name": <text from column 2>
},
{
"id": <GUID of column 3>,
"name": <text from column 3>
},
{
"id": <GUID of column 4>,
"name": <text from column 4>
}
]
},
"isSensitive": <true|false>,
"meta": {
"description": <question text>
"visibility": <active|hidden>
"isSystem": <true|false>
"isRequired": <true|(omitted)>
}
}
],
"fieldGroups":[
{
"id": <GUID of the field group>,
"name": <question name>,
"fieldIds":[
<GUID of the field corresponding to row 1>,
<GUID of the field corresponding to row 2>,
<GUID of the field corresponding to row 3>
],
"meta": {
"description": <question text>
"isRequired": <true|(omitted)>
}
}
]
}