...
APIv2 documentation includes:
- IPAM APIAPI
Includes actions for LIRs, IP aggregate and block management, VLAN, IP Rules, and SWIP. - Resource APIAPI
Includes actions for managing the ProVision the ProVision Resource System.
The resource API provides CRUD endpoints for resources, resource attributes, resource attachments and resource backups. - DNS API
ProVision DNS API allows you to manage DNS Zones, Records, Servers, Groups and ACLS. - Users API
Includes actions for ProVision Users, permissions and actions. - Usergroups API
Includes actions for ProVision Groups, permissions and actions - Scheduler API
The API Allows you to easily schedule tasks. - API Composer Platform
API Composer Platform (ACP) is an additional module in ProVision to help automate frequently used combinations of calls.
...
Viewing APIv2 Information
On the 6connect Provision the Provision API Swagger home page, click on the name link for the API family that you wish to browse (IPAM, Resource, DNS, etc).
Expand Once on an API Family page, verify that the displayed server name is correct for your instance/local server.
Expand In most situations, only one ProVision instance/server will be displayed, with authentication already provided from your ProVision login. If your ProVision session has ended, or the server changed, you may need to re-provide ProVision credentials by clicking the "Authorize" button. Scroll further down the page and begin reviewing available APIv2 calls and details. Clicking on any call will expand it to view parameter details - you can even test call responses (using your instance data) by clicking "Try it Out"!
Expand
The detail information includes a description, parameter list (required parameters are marked with a *), and response informationSome calls that involve a JSON request body payload (PUT, PATCH, etc) will display "Example Value" and "Model" information under a "Request Body" section - additional parameter descriptions may be displayed under "Model" Information.
Expand
Clicking on "Example Value" will show an example of a JSON request body for that call.
Clicking on "Model" will display details and descriptions of the request body parameters, if available.Additional "Model" examples are available at the bottom of the page with additional descriptive information.
Expand At the bottom of the page, click on "Models".
Then, click on the "Model" you wish to view. Some models may contain additional information that you can expand to view, such as valid values for a parameter. In the example below, the circled "array" will display valid RIR values.
...
- Invoke cURL:
curl -X PATCH "https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
- Use the Request Flag (-X):
curl -X PATCH "https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
- This specifies a custom request method to use when communicating with the HTTP server. The specified request method will be used instead of the method otherwise used (which defaults to GET)
- Specify the HTTP Action:
curl -X PATCH "https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
- In quotes, specify the URL of the APIv2 endpoint you are executing. This should be similar to: "https://[ProVisionInstance]/api/v2/[endpoint family-action]"
curl -X PATCH "https://https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
- Use the Header Flag (-H):
curl -X PATCH "https://https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
- Denotes an extra header to include in the request when sending HTTP to a server. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do.
- Add endpoint-specific data, such as specifying a JSON payload or attribute setting. This may involve one or more additional flags or information sets, depending on the endpoint:
curl -X PATCH "https://https://your-instance-domain/instance-name/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}"
...
Code Block | ||
---|---|---|
| ||
curl -X GET "https://2-dev.6connectexample.com/qa-7.3.0/api/v2/config" -H "accept: */*" -u testing@6connecttesting@example.com |
This will ask for a password. To hard-code it with a password, add it to the end like so:
...
Code Block | ||
---|---|---|
| ||
curl -X GET "https://2-dev.6connectexample.com/qa-7.3.0/api/v2/config" -H "accept: */*" -u testing@6connecttesting@example.com:password |
APIv2 commands are executed as the user provided, so their permissions must be set appropriately. The Swagger "execute" feature produces CURL strings that can be used to test specific API commands.
...
Code Block | ||
---|---|---|
| ||
curl -X PATCH "https://2-dev.6connectexample.com/qa-7.3.0/api/v2/config" -H "Content-Type:application/json;charset=utf-8" -u testing@6connecttesting@example.com:password -d "{\"auto_merge_limits\":\"10\"}" |
...