Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Label applyLabels request


Description

This API applies a label object.

API stability classification

Uncommitted

API overview

HTTP
method

URI

Return
type

Return type
multiplicity

POST
csm/Label/applyLabels

0..*

HTTP request message

Query string parameters

This API does not use query string parameters.

Request message headers

This API uses only common headers listed in HTTP-request-and-response-headers.

Request message body

This API uses the following objects in the request message body JSON. 

Top-level objects

Name

Type

Multi-
plicity

Description

callbackURL
String

0..1

URL to call when the operation finishes

postCallout
String

0..1

Identifier of a callout to run after the operation executes

preCallout
String

0..1

Identifier of a callout to run before the operation executes

timeout
Integer

0..1

Timeout setting. For more information about using the timeout, see Synchronous-and-asynchronous-operations. Timeout values:

  • 0: Immediate timeout
  • -1: Uses the system default timeout value
  • 1..*: Times out in the specified number of seconds
operationParams

1

Array of input parameters. For information about setting up the input parameters, see Passing-input-parameters-with-an-API-request.


Example

The following example shows an HTTP request for the API that applies a label, removes a label, and lists all the label names.

{
               "timeout": -1,
               "preCallout": "",
               "postCallout": "",
               "callbackURL": "",
               "operationParams": [{
                                               "name": "addedLabels",
                                               "multiplicity": "0..*",
                                               "type": "java.lang.String",
                                               "value": ["TestLabel_API"]
                                },
                                {
                                               "name": "removedLabels",
                                               "multiplicity": "0..*",
                                               "type": "java.lang.String",
                                               "value": []
                                },
                                {
                                               "name": "resourceURIs",
                                               "multiplicity": "1..*",
                                               "type": "java.lang.String",
                                               "value": ["<DISK_URI>"]      For example: /localdisk/ec67c24c-0285-42ae-b27b-3f3d15a31762
                                }
                ]
}


Response message body

The response message body is empty.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*