Get User Survey List
API Overview
- Function: Get survey list for individual users or teams
- Request Method: GET
- Request URL: /api/surveys?appid={appid}&access_token={access_token}&user_id={50000000001}
Request Parameters
Parameter Name | Type | Location | Description | Example |
---|---|---|---|---|
user_id | integer | queryString | User ID or Team ID. For team authorization, you can use this parameter. Team ID can be found in the top-right avatar - Team Management at https://wesurvey.com | 292192 |
openid | string | queryString | Unique user identifier, can be used with third-party application authorization, obtained from web authorization callback | abcdefg |
page | integer | queryString | Current page number | 1 |
per_page | integer | queryString | Items per page | 20 |
Response Parameters
Parameter Name | Type | Description |
---|---|---|
total | integer | Total count |
list | array[object] | Survey list |
list[_].id | integer | Survey ID |
list[_].hash | string | hash |
list[_].title | string | Survey title |
list[_].state | integer | Status, 0: Draft, 2: Collecting, 3: Paused |
Response Examples
- Successful Request
{
"code": "OK",
"error": {
"type": "",
},
"data": {
"total": 3,
"list": [
{
"id": 292189,
"hash": "65c6",
"title": "Survey Title",
"state": 2
},
{
"id": 292190,
"hash": "5e13",
"title": "Survey Title",
"state": 2
},
{
"id": 292192,
"hash": "d082",
"title": "Survey Title",
"state": 2
}
]
},
"request_id": "e4b27037-d876-427d-95c7-d5a737dd1677"
}
- Failed Request
{
"code": "InvalidArgument",
"error": {
"type": "invalid_argument",
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}
Error Codes
error.type Error Code | Description |
---|---|
claim_error | Permission verification error |
invalid_argument | Parameter validation failed |