URL
POST https://{api-url}/api/v2/tenants/{tenantId}/resources
Sample URLs
https://{api-url}/api/v2/tenants/<clientId>/resources
Notes
There are special characters that can be used in a query string:
- (+) represents the next field and must be URL-encoded.
- (:) represents equals. An example is
key : value
. - Space characters must be URL-encoded.
- Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).
Parameters
All fields are mandatory:
Field | Data Type | Description |
---|---|---|
hostName/resourceName | String | Name of the host. |
resourceType | String | Type of resource. Use SYNTHETIC for synthetic. |
checkType | String | Specifies the category type. Example: http, https, ftp, and so on. |
url | String | URL of the synthetic. |
locationUuids | String | Array of UUIDs of locations you want to bind. |
credential
| String | Specifies the credentials. Examples:
|
Sample request
{
"resourceType":"SYNTHETIC",
"checkType" : "HTTP",
"resourceName" : "Indian",
"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
{
"resourceUUID": "32a6a17c-376a-421e-ad15-01d92803f40f",
"tenantID": "client_5"
}