Apply a tag to an object
/api/tags/objects/{notused}
Applies an existing tag to the specified pool or host.
To identify the host or resource pool, use the ID and kind parameters within the body of the request. Use the Tags parameter to identify the tags you want to apply to the host or resource pool.
Note: This endpoint is deprecated and will no longer be available in the future release.
Request
- application/json
-
notused: string
notused
-
Authorization: apiKey
Type:
apiKey
Response
- application/json
200 Response
Default Response
Examples
The following example shows how to apply a tag to a resource pool or host. You perform this task by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.
cURL Command
curl -sk
-X "POST"
-H "Authorization: Bearer b39f09c71c297f1d"
"https://rest_server_url/api/tags/objects/host_id"
-d '{"tags":["100"],"id":"host_id","kind":"host"}'
In this example, replace host_id with the ID of the host, which you can find by sending a GET method to the /api/hosts
endpoint.
Example of Response Body
{
"kind": "host",
"id": "host_id",
"tags": [
"100"
]
}