SwitchSerializer

class apirest.switch_serializers.SwitchSerializer(instance=None, data=None, files=None, context=None, partial=False, many=False, allow_add_remove=False, **kwargs)

Read:

CURL Usage:

curl -u username:password -H 'Accept: application/json' http://localhost:8000/rest-api/switch/

curl -u username:password -H 'Accept: application/json' http://localhost:8000/rest-api/switch/%switch-id%/

Response:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "http://127.0.0.1:8000/rest-api/switch/1/",
            "name": "localhost",
            "ipaddress": "127.0.0.1",
            "key_uuid": "25116b72-b477-11e1-964f-000c296bd875"
        }
    ]
}