Get Subnet

Table 1. API: GET GCP Subnets
Element Description
API GetSubnet
Description API returns GCP subnet(s) Details in endpoint.
Method GET
URL Http(s)://{xx.xxxx.xx.xx:xxx}/v3/gcp/provisioningEndPoints/{endpointId}/subnets
URL Parameters (fields in curly {} braces)
  • endpointId (Mandatory): This is a unique identifier of Cloud Endpoint created in HCL BigFix CLM. It can be any value either PlatformEntityId or Name of the Platform available on Manage Provisioning Platform screen.
  • queryParams (Optional): It is used for filtering and sorting of records. It has three properties, which are as follows:
  • Filter: To filter records based on column name received from output. E.g. Filter="keyname='keyvalue'"
  • Sort Order: To define sorting order either ASC (Ascending) or DESC (descending). E.g. Sortorder="ASC".
  • Page Number: To get the records for related page number. Eg. Pagenumber="1”
  • Page Size: To get the number of records on selected page. Eg. Pagesize="10”
  • For e.g.
    {"filter": "purpose=’Private’","sortorder": "desc", "pagenumber" : "1", "pagesize" : "10"}
Header
  • Authorization Key: The initial step that needs to be performed before consuming HCL BigFix CLM API is to obtain the Token Value for an authorization key. Once a Token value is obtained, it remains valid for all API calls made in a session. For more information on how to do that, refer Token API description.
  • Content-type: application/json
Response

A Sample Response:

{
"totalRecords": 29,
 "records": [
 {
 "entityId": "SUB-0492EA5E-B005-4706-8CF1-51EA05B3C0EB",
 "name": "default",
 "subnetId": "3478815503124251561",
 "vpcLink": "https://www.googleapis.com/compute/v1/projects/xxxxxx/global/networks/default",
 "ipCidrRange": "xxxxxx/20",
 "gatewayAddress": "xxxxxx",
 "privateIpGoogleAccess": "false",
 "purpose": "PRIVATE",
 "kind": "compute#subnetwork",
 "region": "australia-southeast2",
 "projectId": "poc-242713",
 "selfLink": "https://www.googleapis.com/compute/v1/projects/xxxxxx/regions/australia-southeast2/subnetworks/default",
 "secondaryIpRanges": [],
 "associatedServicePlans": [
 {
 "servicePlanId": "1",
 "servicePlanName": "platinum"
 },
 {
 "servicePlanId": "2",
 "servicePlanName": "silver"
 }
 ]
 }
 ]
}
Response Parameters
  • Result:
  • entityId
  • name
  • subnetId
  • vpcLink
  • ipCidrRange
  • gatewayAddress
  • privateIpGoogleAccess
  • purpose
  • kind
  • region
  • projectId
  • selfLink
  • secondaryIpRanges
  • associatedServicePlans