...
All property values above is also indexed under the index key all in all indexes. For example in the search index you can query the all-key for both name, description, ip_addresses, as_number and hostname.
Anchor | ||||
---|---|---|---|---|
|
REST API
Note | ||
---|---|---|
| ||
Only L2VPN services are set up in this way. |
NOCLook REST API is driven by django-tastypie. Authentication is set per user as an API key.
...
Setting L2VPN service attributes
Only operational_status and description can be set for L2VPN services until more is needed.
Using curl
Code Block |
---|
curl -H "Authorization: ApiKey username:api_key" -H "Content-Type: application/json" -X PUT --data '{"operational_state": "In service", "description": "Test REST API call l2vpn"}' https://nidev-consumer.nordu.net/api/v1/l2vpn/NU-S000206/ Return: { "created": "2012-10-08T14:13:52.711006", "creator": "/api/v1/user/1/", "description": "Test REST API call l2vpn", "handle_id": 11099, "l2vpn_id": 1, "modified": "2012-10-08T14:32:38.686338", "modifier": "/api/v1/user/1/", "node": { "description": "Test REST API call l2vpn", "handle_id": 11099, "l2vpn_id": 1, "name": "NU-S000206", "node_type": "Service", "operational_state": "In service", "service_class": "MPLS", "service_type": "L2VPN" }, "node_id": 9245, "node_meta_type": "logical", "node_name": "NU-S000206", "node_type": "/api/v1/node_type/service/", "operational_state": "In service", "relationships": [ "/api/v1/relationship/32129/", "/api/v1/relationship/32130/", "/api/v1/relationship/32131/" ], "resource_uri": "/api/v1/l2vpn/NU-S000206/" } |
...