SMSGateway API

apirest.sms_gateway_serializers.SMSGatewaySerializer

Create:

CURL Usage:

curl -u username:password --dump-header - -H "Content-Type:application/json" -X POST --data '{"name": "My_Gateway", "description": "", "addprefix": "", "removeprefix": "", "gateways": "user/,user", "gateway_codecs": "PCMA,PCMU", "gateway_timeouts": "10,10", "gateway_retries": "2,1"}' http://HOSTNAME_IP/rest-api/sms-gateway/

Response:

HTTP/1.0 201 CREATED
Date: Fri, 14 Jun 2013 09:52:27 GMT
Server: WSGIServer/0.1 Python/2.7.3
Vary: Accept, Accept-Language, Cookie
Content-Type: application/json; charset=utf-8
Content-Language: en-us
Allow: GET, POST, HEAD, OPTIONS

Read:

CURL Usage:

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/sms-gateway/

curl -u username:password -H 'Accept: application/json' http://HOSTNAME_IP/rest-api/sms-gateway/%gateway-id%/

Response:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "http://HOSTNAME_IP/rest-api/sms-gateway/1/",
            "name": "Default_Gateway"
        }
    ]
}