Skip to main content
REST API reference
A newer release of this product is available.

Create a tag for a resource

POST /resource-tags/{resource_tag.value}/resources

Introduced In: 9.13

Creates a new tag on a specific resource.

Parameters

Name Type In Required Description

resource_tag.value

string

path

True

  • format: key:value

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

Request Body

Name Type Description

href

string

This property provides the address in the API at which the tagged resource is available. Additional queries can be made on this endpoint to fetch the resource's properties.

Example request
{
  "href": "string"
}

Response

Status: 201, Created

Headers

Name Description Type

Location

Useful for tracking the resource location

string

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

262257

The API specified in the href cannot be found.

262258

The resource specified in the href does not support tagging.

262259

The specified href cannot be parsed.

262260

The provided href is missing a key to a specific resource.

262261

The specified href points to a resource that does not exist.

Definitions

See Definitions

href

Name Type Description

href

string

svm

If the tagged resource belongs to an SVM, this property will be set. If the resource does not belong to an SVM (i.e. it belongs to the cluster as a whole), then this property will be empty and unreturned.

Name Type Description

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

resource_tag_resource

This object provides a pointer to the tagged resource in the API. Details about the tagged object are available by querying the address of the href property.

Name Type Description

href

string

This property provides the address in the API at which the tagged resource is available. Additional queries can be made on this endpoint to fetch the resource's properties.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.