URL

POST https://{api-url}/api/v2/tenants/{tenantId}/sites/{siteId}

Sample URLs

https://{api-url}/api/v2/tenants/client_8/sites/31

Parameters

FieldData TypeDescription
nameStringSite name.
descriptionString(Optional) Summary of the site.
addressString(Optional) Site address.
cityString(Optional) Site city.
stateString(Optional) Site state.
countryString(Optional) Site country.
zipString(Optional) Zip code.
phoneNumberString(Optional) Site phone number for communication.
phoneExtensionString(Optional) Site phone extension number.
parentid
  1. id
  2. name
String(Optional) Parent site. Required if creating a sub-site under a parent site:
  1. Parent site id
  2. Parent site name
primaryContact
  1. id
  2. loginName
String(Optional) Primary contact user information:
  1. User id
  2. User login name
resourcesid
  • id
String(Optional) ID of the resource stored in a site.
Example: b1d9536e-fa0c-459f-becf-97541bfebd48
filterCriteria
  1. matchType
  2. rules
    1. key
    2. value
    3. operator
    4. resourceType
String(Optional) Filter resources to add them to the sites.
  1. Match All or ANY of the rules to filter the resources.
    Example: ALL
  2. Filter resources with the below rules:
    1. Attribute name
    2. Attribute value of the resource
    3. Matching parameter.Supported operators: Contains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex, Is.For Is, "value" must be "TRUE" or "FALSE" and "key" must be "Agent Installed"
      Example: Contains
    4. Resource type. Example: DEVICE, LOAD BALANCER

Sample request

{
	"name": "SJ-North-East",
	"description": "Datacenter at SJ East",
	"address": "4th Cross, Blue Valley",
	"state": "California",
	"city": "San Jose",
	"country": "USA",
	"zip": "94088",
	"primaryContact": {
		"id": "USR0000000014",
		"loginName": "InsLab@myorganization.com"
	},
	"phoneNumber": "5232324543",
	"phoneExtension": "1",
	"resources": [{
			"id": "ad0a218d-7512-435c-9b58-614470ee8658"
		},
		{
			"id": "b7001583-db6a-4c7c-b4df-ab1ba6505d60"
		}
	],
	"filterCriteria": {
		"matchType": "ANY",
		"rules": [{
				"key": "Name",
				"operator": "Contains",
				"value": "HYD",
				"resourceType": "DEVICE"
			},
			{
				"key": "Name",
				"operator": "Regex",
				"value": "VM",
				"resourceType": "LOAD_BALANCER"
			},
			{
				"key": "Agent Installed",
				"operator": "Is",
				"value": "TRUE",
				"resourceType": "DEVICE"
			}
		]
	}
}

Sample response

{
	"id": 31,
	"name": "SJ-North-East",
	"parent": {
		"id": 4,
		"name": "OPSRAMP-BMVR",
		"description": "Resource in East",
		"address": "Bheemavaram"
	},
	"description": "Datacenter at SJ East",
	"address": "4th Cross, Blue Valley",
	"city": "San Jose",
	"state": "California",
	"country": "USA",
	"zip": "94088",
	"phoneNumber": "5232324543",
	"phoneExtension": "1",
	"primaryContact": {
		"id": "USR0000000014",
		"loginName": "InsLab@myorganization.com",
		"lastName": "Lab",
		"firstName": "Ins",
		"email": "inslab@gamil.com",
		"phoneNumber": "8096250653"
	},
	"resources": [{
			"id": "b7001583-db6a-4c7c-b4df-ab1ba6505d60",
			"name": "DESKTOP-V5DV65M",
			"ipAddress": "192.168.56.1",
			"type": "DEVICE"
		},
		{
			"id": "19a49e09-da18-4d91-92b7-01d6858ec2cf",
			"name": "opsrampdev",
			"ipAddress": "10.0.4.15",
			"type": "DEVICE"
		},
		{
			"id": "ad0a218d-7512-435c-9b58-614470ee8658",
			"name": "WORK-PC",
			"ipAddress": "192.168.126.1",
			"type": "DEVICE"
		}
	],
	"filterCriteria": {
		"id": 70,
		"matchType": "ANY",
		"rules": [{
				"id": 223,
				"key": "Name",
				"operator": "Contains",
				"value": "HYD",
				"resourceType": "DEVICE"
			},
			{
				"id": 224,
				"key": "Name",
				"operator": "Regex",
				"value": ".*VM.*",
				"resourceType": "LOAD_BALANCER"
			},
			{
				"id": 225,
				"key": "Agent Installed",
				"operator": "Is",
				"value": "TRUE",
				"resourceType": "DEVICE"
			}
		]
	}
}