API Documentation
<access-service>/api/v1/labels/{labelId}/priority

URL structure

https://access-service.xy-company.com/api/v1/labels/{labelId}/priority

where {labelId} is the ID of a label.

Supported methods and overview

  • PUT - used to shift the priority of a label either up or down, based on that label's ID.

Detailed description

This API endpoint shifts the priority of a label either up or down, using that label's ID. The label's ID can be obtained by calling the GET method of the <access-service>/api/v1/labels API endpoint, which retrieves a list of field information for all existing labels on the Covata Platform.

A priority is defined by a series of consecutive positive integer numbers called priority integer values. These values are used for sorting labels from the highest priority (i.e. a priority integer value of 1) through to the lowest priority (i.e. the highest priority integer value, which equals the total number of all existing labels on the Covata Platform).

When a new label is added, it is automatically given the lowest priority (i.e. the highest priority integer number). When any label (except for the label with the lowest priority) is deleted, then the priority integer numbers of all other labels with a lower priority are automatically decreased by a value of 1.

When a label's priority is shifted:

  • up - then the priority integer values of this label and its neighboring label (i.e. with the next lowest priority integer value) switch their priority values.
  • down - then the priority integer values of this label and its neighboring label (i.e. with the next highest priority integer value) switch their priority values.

Supported roles

This API endpoint supports the following Covata user roles (as described in the Covata Platform Administrator's Guide):

The Covata Platform's resources available to one of these Covata users (above) is determined by the access token passed in the header of requests to this endpoint.

Required headers

The appropriate access token as the Bearer token:

  • Authorization: Bearer a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6

Required parameters

The following required parameters must be sent in the URL of the PUT request:

  • direction - up or down

    Example ():

Returns

A JSON-formatted response containing the following members:

  • id - .
  • name - .
  • description - .
  • priority - .

    Example (response from ...):