URL

POST https://{api-url}/api/v2/tenants/{tenantId}/policies/discovery

Sample URLs

https://{api-url}/api/v2/tenants/client_105261/policies/discovery
https://{api-url}/api/v2/tenants/msp_526/policies/discovery

Parameters

FieldData TypeDescription
nameStringDiscovery profile name.
credentialSetStringCredential set to be assigned to the discovery profile.
1. policy

rules

1. filterType
2. key
3. value
4. operator
5. resourceType

String(Optional) 1. Set of functions formed together as a policy and attached with the discovery profile.

Rules to filter the resources to which the discovery profile is attached:

1. Filtered resource type.
Example: EBS, WEBSITE, SQL_SERVER, SQL_DATABASE, RESOURCE_GROUP, REDIS_CACHE, DOCUMENT_DB.
2. Unique attribute name to filter the resource type. Example: Name, Region Name, Zone Name, Name.
3. Unique information of the resource.
4. Operating values to filter the resource type. Example: Contains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex, Is.
5. Resource type to which the discovery profile is attached.

2. schedule
  • patternType
  • pattern
  • startTime
String(Optional) 2. Define the discovery time of resources:
  • Discovery schedule pattern type. Example: HOURLY, DAILY, WEEKLY, MONTHLY, MINUTES.
  • Pattern of the schedule. Example: If pattern type is WEEKLY, then pattern is MON, WED.
  • Define start time of discovery.

Status code

200 OK

Azure basic discovery profile

Update a basic Azure discovery profile with credentials to administer the management of discovered resources:

Sample request

[{
	"id": 962,
	"name": "Azure Basic Discovery profile",
	"credentialSet": "Azure Credentials"
}]

Sample response

[{
	"id": 962,
	"name": "Azure Basic Discovery profile",
	"credentialSet": "Azure Credentials",
	"credential": {
		"credentialName": "Azure Credentials",
		"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef3"
	}
}]

Azure discovery profile with discovery schedule

Update an Azure discovery profile with a schedule to define the discovery time of resources:

Sample request

[{
	"id": 963,
	"name": "Azure discovery profile with schedule",
	"credentialSet": "Azure Credentials",
	"schedule": {
		"patternType": "HOURLY",
		"pattern": "2",
		"startTime": "02:00:00"
	}
}]

Sample response

[{
	"id": 963,
	"name": "Azure discovery profile with schedule",
	"credentialSet": "Azure Credentials",
	"credential": {
		"credentialName": "Azure Credentials",
		"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef3"
	},
	"schedule": {
		"patternType": "HOURLY",
		"pattern": "2",
		"startTime": "02:00:00"
	}
}]

Azure discovery profile with schedule and policy

Update Azure discovery profile with schedule and policy to schedule discovery of resources and define actions performed on the discovered devices:

Sample request

[{
	"id": 102183,
	"name": "Azure",
	"credentialSet": "Azure Credentials",
	"policy": {
		"id": 39733,
		"name": "Azure",
		"resourceType": "ALL",
		"matchType": "ANY",
		"rules": [{
				"filterType": "ANY_DEVICE"
			},
			{
				"filterType": "EBS"
			},
			{
				"filterType": "WEBSITE"
			},
			{
				"filterType": "SQL_SERVER"
			},
			{
				"filterType": "SQL_DATABASE"
			},
			{
				"filterType": "RESOURCE_GROUP"
			},
			{
				"filterType": "REDIS_CACHE"
			},
			{
				"filterType": "DOCUMENT_DB"
			}
		],
		"actions": [{
				"action": "MANAGE DEVICE",
				"items": []
			},
			{
				"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
				"items": [{
					"item": "24422",
					"parameters": {},
					"instances": {}
				}]
			},
			{
				"action": "INSTALL OPSRAMP AGENT",
				"items": [{
					"item": "169743",
					"parameters": {},
					"instances": {}
				}]
			},
			{
				"action": "SELECT GATEWAY",
				"items": [{
					"item": "24422",
					"parameters": {},
					"instances": {}
				}]
			}
		],
		"executionOrder": 0
	},
	"schedule": {
		"patternType": "MINUTES",
		"pattern": "30",
		"startTime": "00:30:00"
	}
}]

Sample response

[{
	"id": 102183,
	"name": "Azure",
	"credentialSet": "Azure Credentials",
	"credential": {
		"credentialName": "Azure Credentials",
		"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef3"
	},
	"policy": {
		"id": 39733,
		"name": "Azure",
		"resourceType": "ALL",
		"matchType": "ANY",
		"rules": [{
				"filterType": "ANY_DEVICE"
			},
			{
				"filterType": "EBS"
			},
			{
				"filterType": "WEBSITE"
			},
			{
				"filterType": "SQL_SERVER"
			},
			{
				"filterType": "SQL_DATABASE"
			},
			{
				"filterType": "RESOURCE_GROUP"
			},
			{
				"filterType": "REDIS_CACHE"
			},
			{
				"filterType": "DOCUMENT_DB"
			}
		],
		"actions": [{
				"action": "MANAGE DEVICE",
				"items": []
			},
			{
				"action": "ASSIGN GATEWAY MANAGEMENT PROFILE",
				"items": [{
					"item": "24422",
					"parameters": {},
					"instances": {}
				}]
			},
			{
				"action": "INSTALL OPSRAMP AGENT",
				"items": [{
					"item": "169743",
					"parameters": {},
					"instances": {}
				}]
			},
			{
				"action": "SELECT GATEWAY",
				"items": [{
					"item": "24422",
					"parameters": {},
					"instances": {}
				}]
			}
		],
		"executionOrder": 0
	},
	"schedule": {
		"patternType": "MINUTES",
		"pattern": "30",
		"startTime": "00:30:00"
	}
}]

Azure discovery profile with credentials, schedule, and policy

Update an Azure discovery profile with credentials, schedule, and policy to administer the management of resources, schedule discovery of resources, and define specific actions performed on the discovered resources:

Sample request

[{
	"id": 511,
	"name": "AZURE_1",
	"credential": {
		"credentialType": "Azure",
		"AzureType": "ARM",
		"SubscriptionId": "*******",
		"TenantId": "********",
		"ClientID": "*********",
		"SecretKey": "*******"
	},
	"policy": {
		"id": 736,
		"name": "Azure",
		"resourceType": "ALL",
		"matchType": "ANY",
		"rules": [{
			"filterType": "ANY_CLOUD_RESOURCE"
		}],
		"actions": [{
			"action": "MANAGE DEVICE",
			"items": []
		}],
		"executionOrder": 0
	},
	"schedule": {
		"patternType": "MINUTES",
		"pattern": "30",
		"startTime": "00:30:00"
	}
}]

Sample response

[{
	"id": 511,
	"name": "AZURE_1",
	"credentialSet": "Azure",
	"credential": {
		"credentialName": "Azure",
		"accountId": "9ee6993f-a036-4118-9eab-c66d9fda1ef2"
	},
	"policy": {
		"id": 736,
		"name": "Azure",
		"resourceType": "ALL",
		"matchType": "ANY",
		"rules": [{
			"filterType": "ANY_CLOUD_RESOURCE"
		}],
		"actions": [{
			"action": "MANAGE DEVICE",
			"items": []
		}],
		"executionOrder": 0
	},
	"schedule": {
		"patternType": "MINUTES",
		"pattern": "30",
		"startTime": "00:30:00"
	}
}]