URL

POST https://{api-url}/api/v2/tenants/{tenantId}/agentPolicies/{policyId}/devices

Sample URLs

https://{api-url}/api/v2/tenants/client_5/agentPolicies/1/devices

Parameters

FieldData TypeDescription
resourceTypeStringType of resource.
Example: server, SYNTHETICS
checkTypeStringSpecifies the category type.
Example: http, https, ftp, and so on.
credential
  • securityLevel
  • oauthClientKey
  • oauthClientSecret
  • oauthAccessTokenUrl
  • oauthGrantType
String(Optional) Specifies the credentials.
Examples:
  • securityLevel: oauth2
  • oauthClientKey: client key generated
  • oauthClientSecret: secret key generated
  • oauthAccessTokenUrl: auth/oauth token
  • oauthGrantType: credentials of the client
sslCertPathString(Optional) Path of the SSL Certificate
SslCertKeyPathString(Optional) Path of the SSL certificate key.
downloadFilePathString(Optional) Specifies the path where you want to download the file.
scriptString

Sample request

{
	"resourceType":"SYNTHETIC",
	"checkType" : "HTTP",
	"resourceName" : "Indians",
	"url" : "www.oriental.com",
	"credential" :{
			"securityLevel" : "oauth2",
			"oauthClientKey" : "kHSageRP9CTeCFP7Wfrzzc45pFJZ99N4",
			"oauthClientSecret" : "5w6rKEAgYpsYDdd8vm5PnUMsQWqTnh423FArQYxGW6V3zqDcTG2z7UvjV3YBMq9Y",
			"oauthAccessTokenUrl" : "auth/oauth/token",
			"oauthGrantType" : "client_credentials"
			},
	"locationUuids" :
	   [ "7b77f37f-5eb0-4ec2-bd19-15cc6853e3ca"]  
}

Sample response

Null