查询所有用户的信息

查询所有用户的信息

API调用URL地址

http://<serverName>:<portNumber>/api/v3/users
其中<serverName>:<portNumber>替换为您的环境下SDP所在的主机IP和对应端口

请求参数

方法:GET

参数名


位置

Input_data

<JSON_String>

URL路径

authtoken

<API Key>

header

 

<JSON_String>输入示例:

%7B%0A%20%20%20%20%22list_info%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22sort_field%22%3A%20%22name%22%2C%0A%20%20%20%20%20%20%20%20%22start_index%22%3A%201%2C%0A%20%20%20%20%20%20%20%20%22sort_order%22%3A%20%22asc%22%2C%0A%20%20%20%20%20%20%20%20%22row_count%22%3A%20%2225%22%2C%0A%20%20%20%20%20%20%20%20%22get_total_count%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22fields_required%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%22email_id%22%2C%0A%20%20%20%20%5D%0A%7D%0A

提示:以上为执行URLEncode之后的值,原值为:
{
    "list_info": {
        "sort_field": "name",
        "start_index": 1,
        "sort_order": "asc",
        "row_count": "25",
        "get_total_count": true,
 
    },
    "fields_required": [
        "email_id",
    ]
}

List_info中的值为API请求的参数,其中:
start_index“:1,为从第一个开始查询;
sort_order:”asc”,为升序排列;
”row_count”:”25”,为查询返回25个数据;
get_total_count:true,为获得所有数据计数。
search_fields:{“email_id”:”guest@zoho.com”},即搜索条件,以上示例为检索邮箱地址为guest@zoho.com的用户信息
fields_required中的值为响应结果需要的属性,其他属性会被过滤掉。如”email_id”为邮箱地址。

 

响应示例

{
    "response_status": [
        {
            "status_code"2000,
            "status""success"
        }
    ],
    "list_info": {
        "has_more_rows"false,
        "start_index"1,
        "sort_field""name",
        "total_count"4,
        "sort_order""asc",
        "get_total_count""true",
        "row_count"22
    },
    "users": [
        {
            "email_id""APItest@test.com",
            "is_technician"false,
            "id""1806",
            "type""User",
            "profile_pic_url"null,
            "citype": {
                "name""用户",
                "id"3
            }
        },
        {
            "email_id""APItest@test.com",
            "is_technician"false,
            "id""1804",
            "type""User",
            "profile_pic_url"null,
            "citype": {
                "name""用户",
                "id"3
            }
        },
        {
            "email_id""APItest@test.com",
            "is_technician"false,
            "id""1803",
            "type""User",
            "profile_pic_url"null,
            "citype": {
                "name""用户",
                "id"3
            }
        },
        {
            "email_id""APItest@test.com",
            "is_technician"false,
            "id""1808",
            "type""User",
            "profile_pic_url"null,
            "citype": {
                "name""用户",
                "id"3
            }
        },
    ]
}

 

Postman示例



2-3