CallerID Group API¶
-
apirest.callerid_group_serializers.CallerIDGroupSerializer¶ CallerIDGroup API to read and create CallerIDGroup.
Create:
CURL Usage:
curl -u areski:areski --dump-header - -H "Content-Type:application/json" -X POST --data '{"name": "CIDGroup", "description": "", "user": "/rest-api/users/1/"}' http://127.0.0.1:8000/rest-api/callerid_group/
Response:
HTTP/1.0 201 Created Content-Length: 242 x-xss-protection: 1; mode=block Content-Language: en Vary: Accept, Accept-Language, Cookie Location: http://127.0.0.1:8000/rest-api/callerid_group/2/ Allow: GET, POST, HEAD, OPTIONS X-Frame-Options: ALLOWALL Content-Type: application/json Server: Werkzeug/0.14.1 Python/2.7.18 Date: Thu, 05 Dec 2024 08:00:32 GMT {"url":"http://127.0.0.1:8000/rest-api/callerid_group/2/","name":"CIDGroup","description":"","created_date":"2024-12-05T09:00:32.534617+01:00","updated_date":"2024-12-05T09:00:32.534645+01:00","user":"http://127.0.0.1:8000/rest-api/users/1/"}
Read:
CURL Usage:
curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/callerid_group/
Response:
{ "count": 2, "next": null, "previous": null, "results": [ { "url": "http://127.0.0.1:8000/rest-api/callerid_group/2/", "name": "CIDGroup-01", "description": "", "created_date": "2018-08-08T16:01:54.358902+02:00", "updated_date": "2018-08-08T16:01:54.358924+02:00", "user": "http://127.0.0.1:8000/rest-api/users/2/" }, { "url": "http://127.0.0.1:8000/rest-api/callerid_group/3/", "name": "CIDGroup", "description": "", "created_date": "2018-09-20T10:37:58.346277+02:00", "updated_date": "2018-09-20T10:37:58.346317+02:00", "user": "http://127.0.0.1:8000/rest-api/users/1/" } ] }