Component Labels REST API - v2

The Component Labels API adds or removes labels for components of an application. The API was Introduced in IQ Server 1.48.

Adding Application Component Labels

Adding an application component label requires the component hash, label name, and internal application ID for the component label.

Construct a POST REST request with the following path:

  • componentHash - A sha1 hash of the component, which can be found in the source repository.
  • labelName - The name of an existing label that can be applied to the application.
  • applicationId - The internal ID of the application.  Obtained from an 'applications' REST API call with: GET /api/v2/applications?publicId={YourPublicId}.
POST /api/v2/components/{componentHash}/labels/{labelName}/applications/{applicationId}

The server will respond with a 204 status upon success.

Example Adding Application Component Labels

curl -u admin:admin123 -X POST 'http://localhost:8070/api/v2/components/1249e25aebb15358bedd/labels/Architecture-Deprecated/applications/5065550c24514129bf66f9afd5c7be60'

Deleting Application Component Labels

Deleting an application component label requires the component hash, label name, and internal application ID for the component label.

Construct a DELETE REST request with the following path:

  • componentHash - A sha1 hash of the component, which can be found in the source repository.
  • labelName - The name of an existing label that can be applied to the application.
  • applicationId - The internal ID of the application.  Obtained from an 'applications' REST API call.
DELETE /api/v2/components/{componentHash}/labels/{labelName}/applications/{applicationId}

The server will respond with a 204 status upon success.

Example Deleting Application Component Labels

curl -u admin:admin123 -X DELETE 'http://localhost:8070/api/v2/components/1249e25aebb15358bedd/labels/Architecture-Deprecated/applications/5065550c24514129bf66f9afd5c7be60'