Documentation is now available for the Fall 2020 Update release!

Assign templates to resource

This endpoint is used to assign or update templates on a resource.

Leave Feedback

URL

POST https://{api-url}/api/v2/tenants/{tenantId}/resources/{resourceId}/templates

Sample URLs

2251

https://{api-url}/api/v2/tenants/client_93/resources/40ab0c03-b847-4707-8cb3-a326aaac4377/templates

For Synthetics, use Synthetics as the collector type.

https://api-2adc3.opsramp.com/api/v2/tenants/client_193/resources/6e9a4b2a-ee59-4fe2-8419-d984603f5b30/templates?collectorType=Synthetics</code>

Parameters

The parameter is optional:

FieldDefault Value
collectorTypeCollector types are:
  • Agent
  • Gateway
  • Cloud: AWS, Azure, Google
  • Service: Synthetics

Default: Agent

For Synthetics, specify Synthetics as the collector type.

Use the Search Templates API to get a list of available templates.

Status code

200 OK

Sample request

[{
	"id": 992
}, {
	"id": 1024,
	"configParameters": [{
		"parameter": {
			"id": 980,
			"name": "Port"
		},
		"value": "8086"
	}, {
		"parameter": {
			"id": 981,
			"name": "Additional Port"
		},
		"value": "8998"
	}]
}, {
	"id": 6741,
	"assignedInterfaces": [{
		"id": 244345
	}, {
		"id": 244346
	}]
}, {
	"id": 6742,
	"assignedInterfaces": [{
		"id": 244170
	}, {
		"id": 244078
	}],
	"configParameters": [{
		"parameter": {
			"id": 1395,
			"name": "ad_port_1"
		},
		"value": "8443"
	}, {
		"parameter": {
			"id": 1396,
			"name": "ad_port_2"
		},
		"value": "9443"
	}]
}]

Sample response

Null