EXAMPLE
We will know more about the API through the example below:
Request
I will call API to create new Agent:
Code Block |
---|
curl \
-H "X-Auth-Token: eyaskjksadkasd9.9123kjsadhkj123jhasdjajsjsdhKS.IH5uHASSJsadnbads980asTHo9dhljM" \
-X PATCH -d "{ \t\"email\": \"[email protected]\"}" \
"http://88.99.175.131:8000/v1/user/1795"
|
Response
Code Block |
---|
{
"payload": {
"user_id": 1795,
"passwd": "$2b$12$Z4Rs3ZKUzJwnoqaRS472D.UF5ZBMdAmAWd8umjZHMud3ulAh/GSgi",
"user_type": "agent",
"active": true,
"carrier_name": null,
"default_mod": "",
"reseller_id": null,
"outbound_report": true,
"client_limits": [],
"last_name": null,
"role_id": null,
"last_login_time": null,
"all_termination": true,
"report_fields": "string",
"client": null,
"report_count": "1 Hour",
"name": "dnhai",
"first_name": "string",
"cdr_expire": null,
"is_preload": true,
"landing_page": "string",
"login_ip": null,
"default_mod2": "string",
"avatar_id": null,
"create_user_id": 1,
"create_time": "2018-02-26T22:39:43.438420+00:00",
"agent": null,
"report_group": true,
"auth_ip": [],
"default_billing_decimal": 4,
"card_id": 0,
"email": "[email protected]",
"last_seen": null,
"is_online": 2,
"role_name": "",
"client_id": null,
"fullname": null,
"cdr_api_token": null,
"show_carrier_trunk_drop_only": true
},
"success": true
} |
...