Adding / Updating Region Collection
Adding / Updating Region Collection using Postman
Steps to Follow to Add / Update Region Collection-
Scope
- Can Create Region collections be using Postman
- Can Update Existing Region collections be using Postman.
Steps to Follow to Add / Update Region Collection-
Please find the sample data below for region collection.
Sample Region Collection
{ { #Add like the same above if there is more than once Analytics IP "providerName" : <Provider_Name0, "saseGateways": [ { "name": "<Name of your SASE Gateway>", "address": "<Address of your SASE Gateway>", "fqdn": "<FQDN of your SASE Gateway>", "zipcode": "<Zip Code>", "interface": "<>", -à Primary interface name unit for VSA. e.g, vni-0/0.0 "networkName": "<>",-à Primary interface network name for VSA. e.g, WAN1 "city": "<City>", "state": "<State", "country": "<Country>", "latitude": "<Lattitude>", "longitude": "<Longtitude>", "gatewayProvider": "<>", à If gateway is shared then we should use the primary/provider org for the gateway. Default is providername for the tenant. "redundantVSALink": [ à If gateway supports more than 1 WAN for VSA, please add all those below { "interface": "<>",-à Primary interface name unit for VSA. e.g, vni-0/1.0 "networkName": "<>" "<>",-à Primary interface network name for VSA. e.g, WAN2 } ]
} ], "regionDeviceVersion" : "20.2.3", |
GGet Access Token-
For all the region collection related API call’s we need an Access token to be added in the header. Follow the below steps to get new Access Token for your API calls. Replace <host_address> with the respective FQDN or IP address of the titan node.
Try to fetch access token using url https://<host_address>/oxauth/restv1/token
Method type: POST
Parameters and information to pass-
In body:
select format as x-www-form-urlencoded
in bulk or key value pair add these attributes
scope: openid+profile+email+uma_protection
password: <versaadmin user password>
username: versaadmin@versa.com
grant_type: password
in Authorization:
Select type as basic auth:
Username and password for gluu to identify trusted client request
username: @!5FA2.4677.F41A.A083!0001!32DA.E028!0008!D9DB.3A0C.A48D.789B
password: versa123
Once we hit we will get the sample response like below.
{ |
GGet all the Existing Regions -
URL - https://<host_address>/api/v1/organizations/regions
Method Type- GET
Authorization-
Select Bearer token as type and paste fetched access token in Token section.
Sample Data-
{ <Regions with the above sample Data> { <Another regions if there is any> } |
CCreate a New Region-
URL - https://<host_address>/api/v1/organizations/regions
Method Type- POST
Authorization-
Select Bearer token as type and paste fetched access token in Token section.
Note: We need to add square brackets while creating new regions with the above mentioned sample data.
Body-
[ { #Add like the same above if there is more than once Analytics IP "providerName" : <Provider_Name>, "saseGateways": [ { "name": "<Name of your SASE Gateway>", "address": "<Address of your SASE Gateway>", "fqdn": "<FQDN of your SASE Gateway>", "zipcode": "<Zip Code>", "interface": "<>", -à Primary interface name unit for VSA. e.g, vni-0/0.0 "networkName": "<>",-à Primary interface network name for VSA. e.g, WAN1 "city": "<City>", "state": "<State", "country": "<Country>", "latitude": "<Lattitude>", "longitude": "<Longtitude>", "gatewayProvider": "<>", à If gateway is shared then we should use the primary/provider org for the gateway. Default is providername for the tenant. "redundantVSALink": [ à If gateway supports more than 1 WAN for VSA, please add all those below { "interface": "<>",-à Primary interface name unit for VSA. e.g, vni-0/1.0 "networkName": "<>" "<>",-à Primary interface network name for VSA. e.g, WAN2 } ]
} ], "regionDeviceVersion" : "20.2.3", |
Sample Response - Region data with success response
UUpdate Existing Regions-
To update existing regions, we need to run the get all region api and need to find the region name. After getting the region, we need to follow the below steps
Note: There won’t be any square brackets (like we added while we are creating new region) while updating existing regions with the above-mentioned sample data.
URL - https://<host_address>/api/v1/organizations/region?region=<Region Name ex. East_Coast>
Method Type- PUT
Authorization-
Select Bearer token as type and paste fetched access token in Token section.
Body-
{ { #Add like the same above if there is more than once Analytics IP "providerName" : <Provider_Name0, "saseGateways": [ { "name": "<Name of your SASE Gateway>", "address": "<Address of your SASE Gateway>", "fqdn": "<FQDN of your SASE Gateway>", "zipcode": "<Zip Code>", "interface": "<>", -à Primary interface name unit for VSA. e.g, vni-0/0.0 "networkName": "<>",-à Primary interface network name for VSA. e.g, WAN1 "city": "<City>", "state": "<State", "country": "<Country>", "latitude": "<Lattitude>", "longitude": "<Longtitude>", "gatewayProvider": "<>", à If gateway is shared then we should use the primary/provider org for the gateway. Default is providername for the tenant. "redundantVSALink": [ à If gateway supports more than 1 WAN for VSA, please add all those below { "interface": "<>",-à Primary interface name unit for VSA. e.g, vni-0/1.0 "networkName": "<>" "<>",-à Primary interface network name for VSA. e.g, WAN2 } ] } ], "regionDeviceVersion" : "20.2.3", |
Sample Response - updated region with success response