Related Documentation
- Junos Space
- Setting Up the Network Director API
- Additional Information
- Network Director API Setup Sample Files
- Sample API Scripts Overview
Understanding Common CRUD Operations
The Junos Space Network Director API application runs on the Junos Space Network Management Platform, and is exposed by the Network Director orchestration services.
This topic describes:
Common CRUD Operations
Requests are sent to the URI of the resource. For each resource, you can perform one or more of the four common CRUD operations. (A CRUD operation is also called a resource method.) Interactions with each resource follow specific formats, depending on the operation.
Table 1 describes the common CRUD operations.
Table 1: Common CRUD Operations
Operation | Description | Request Format | Response Format |
---|---|---|---|
Create (POST) | Creates an instance of the resource by sending an HTTP POST request to the designated URI for that resource type. | POST <resourceURI> HTTP/1.1 URL = https:// <server-ip>/api/ | HTTP/1.1 200 OK https:// <server-ip>/api/ |
Read (GET) | Retrieves the representation of a resource by sending an HTTP GET request to the resource URI. | GET <resourceURI> HTTP/1.1 URL = https:// <server-ip>/api/ | HTTP/1.1 200 OK <body of response> |
Update (PUT) | Updates the representation of a resource by sending an HTTP PUT request to the resource URI. Note: If the server detects that the request attempts to update a read-only attribute, the server ignores the update request, but does not generate an error. | PUT <resourceURI> HTTP/1.1 URL = https:// <server-ip>/api/ | HTTP/1.1 200 OK |
Delete (DELETE) | Deletes a resource by sending an HTTP DELETE request to the resource URI. | DELETE <resourceURI> HTTP/1.1 URL = https:// <server-ip>/api/ | HTTP/1.1 204 OK https:// <server-ip>/api/ |
Related Documentation
- Junos Space
- Setting Up the Network Director API
- Additional Information
- Network Director API Setup Sample Files
- Sample API Scripts Overview