Reply

Create a postman collection of example REST api calls

Techie
Posts: 3
513     0

I am going to go out on a limb and assume that everybody here is already aware of the tool Postman.  I was thinking that it would be really helpful if a postman collection full of example and REST api examples was available for users to download from downloads.  Or even in this community board.  Just my two cents.

Re: Create a postman collection of example REST api calls

Adviser
Posts: 183
513     0

Hi,

 

This is already available: https://blogs.infoblox.com/community/getting-started-with-wapis-using-postman/

 

Let me know if any new examples need to be added.

 

Regards,

Krishna Vasudevan

Re: Create a postman collection of example REST api calls

Member
Posts: 1
513     0

Deletion of a DHCP lease would be great. It would be nice to have in the docs as well, but the API collection has been terrific! 

Are there any sandboxes available for the general public?

Re: Create a postman collection of example REST api calls

Adviser
Posts: 463
514     0

Learning Mock Server in Postman and see if that can build a sandbox.

I know or Product Management team is working on that for us Smiley Happy

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Create a postman collection of example REST api calls

Techie
Posts: 10
514     0

I would like a better understanding of Structs vs. Objects so having examples using Structs would be great.  Specifically, pulling NTP (Grid & Member) data would be very helpful.

Re: Create a postman collection of example REST api calls

Adviser
Posts: 183
514     0

Hi,

 

You can get the NTP setting at the grid level using the following API:

curl -k -u uname:pwd "https://grid-master/wapi/v2.11/grid?_return_fields%2B=ntp_setting"

For the member NTP settings, you can use the below API:

curl -k -u uname:pwd "https://grid-master/wapi/v2.11/member?_return_fields%2B=ntp_setting"

Objects are the API endpoints and Structs are the format of the parameters that are returned, when not a string/int.

 

Hope this helps,

Krishna Vasudevan

Re: Create a postman collection of example REST api calls

Techie
Posts: 10
514     0

Hello Krishna,

Thank you for your quick reply.  That worked!

My follow up (and more important) question is as follows:

From the WAPI Documentation (linked from the Grid), how would one be able to come up with your answer?

I see this:  

Said differently, if there is a particular syntax I could follow, I could figure out other things on my own (you would be teaching me how to fish).

 

I had to figure out logging categories on my own

NOTE:  The WAPI Documentation needs to change loggingcategories to logging_categories

 

I came up with this: 

https://{{grid_master}}/wapi/v2.10.5/member:dns?_return_fields%2b=logging_categories

 

When I compare the syntax of the GET for logging_categories and NTP, they don't follow a specific pattern which makes it difficult to use the API.

Re: Create a postman collection of example REST api calls

[ Edited ]
Community Manager
Community Manager
Posts: 204
514     0

Note that logging_categories is a field, and loggingcategories is a structure.

 

You can ask for the schema of an oject, and all the available fields will be returned.

 

For example:

 

https://{{grid_master}}/wapi/v2.10.5/member:dns?_schema

will return all the available fields for the Member :: DNS object:

 

...
        {
            "is_array": false, 
            "name": "logging_categories", 
            "overridden_by": "use_logging_categories", 
            "standard_field": false, 
            "supports": "rwu", 
            "type": [
                "grid:loggingcategories"
            ]
        }, 
...

Note that loggingcategories is a structure.

 

Think of an object is a "thing", such as a DNS record, a member (appliance), or a member's DNS properties.

 

Think of a field as a setting, such as a hostname, an IP address or a more complex setting ( a structure).

 

Many field types are a simple string.  Some field types are a complex structure containing several strings, integers, boolean variables, or object references.

 

 

 

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You