Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 7.4.3

...

Info
titleTip!

Swagger displays cURL commands and request URLs in the execution response!

Use the "Try it Now" feature from your instance's Swagger page (Accessed from Admin → API Tab → APIv2 Swagger Documentation) for the endpoint/attribute changes you wish to make, and view the cURL command for that change. Copy the command text, and use it as a template for your next cURL execution of the command!

For help using Swagger to test endpoints, see "Testing Endpoints in Swagger" in this 34046545 APIv2 documentation page.


cURL Examples

...

Code Block
languagebash
curl -X POST "https://2-dev.6connect.com/qa-7.4.1/api/v2/resources/query" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"type\":\"entry\",\"attrs\":[{\"key\":\"_custom_id\",\"value\":\"101\",\"rule\":\"AND\"},{\"attr_rule\":\"AND\",\"attr_nested\":[{\"attr_key\":\"_section\",\"attr_value\":\"78\",\"attr_rule\":\"OR\"},{\"attr_key\":\"_section\",\"attr_value\":\"74\",\"attr_rule\":\"OR\"}]}]}"


Example: cURL APIv2 Attach Zone to a DNS Group

To attach a newly created DNS Zone to a DNS Group using APIv2, you need to make a Resource Link with the relation type "dnsZoneView":

Code Block
languagebash
curl -X POST "https://2-dev.6connect.com/qa-7.4.3/api/v2/resources/274/links" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"resource_id\":\"15648\",\"relation\":\"dnsZoneView\",\"data\":{}}"

Where resource #274 is the "Default Group" on the instance (your instance may vaey), and Resource #15648 is the resource ID for the new zone.  The two are now linked together. 

To attach a DNS server to a DNS Group you use the same process but the relation is "dnsViewServer". 

To attach a zone to a server directly the relation is either "dnsZoneMaster" or "dnsZoneSlave" depending on what you're doing.

Additional Information

See the following areas for additional information:

...