Interface LabelsApi


@ThreadSafe public interface LabelsApi
The client of the InfluxDB 2.x that implement Labels HTTP API endpoint.
Author:
Jakub Bednar (bednar@github) (28/01/2019 10:37)
  • Method Details

    • createLabel

      @Nonnull Label createLabel(@Nonnull String name, @Nonnull Map<String,String> properties, String orgID)
      Creates a new label and sets Label.getId() with the new identifier.
      Parameters:
      name - name of a label
      properties - properties of a label
      orgID - ID of the org
      Returns:
      Label created
    • createLabel

      @Nonnull Label createLabel(@Nonnull LabelCreateRequest request)
      Create a label.
      Parameters:
      request - label to create
      Returns:
      Added label
    • updateLabel

      @Nonnull Label updateLabel(@Nonnull Label label)
      Updates a label's properties.
      Parameters:
      label - a label with properties to update
      Returns:
      updated label
    • updateLabel

      @Nonnull Label updateLabel(@Nonnull String labelID, @Nonnull LabelUpdate labelUpdate)
      Update a single label.
      Parameters:
      labelID - ID of label to update
      labelUpdate - label update
      Returns:
      updated label
    • deleteLabel

      void deleteLabel(@Nonnull Label label)
      Delete a label.
      Parameters:
      label - label to delete
    • deleteLabel

      void deleteLabel(@Nonnull String labelID)
      Delete a label.
      Parameters:
      labelID - ID of a label to delete
    • cloneLabel

      @Nonnull Label cloneLabel(@Nonnull String clonedName, @Nonnull String labelID)
      Clone a label.
      Parameters:
      clonedName - name of cloned label
      labelID - ID of label to clone
      Returns:
      cloned label
    • cloneLabel

      @Nonnull Label cloneLabel(@Nonnull String clonedName, @Nonnull Label label)
      Clone a label.
      Parameters:
      clonedName - name of cloned label
      label - label to clone
      Returns:
      cloned label
    • findLabelByID

      @Nonnull Label findLabelByID(@Nonnull String labelID)
      Retrieve a label.
      Parameters:
      labelID - ID of a label to get
      Returns:
      label details
    • findLabels

      @Nonnull List<Label> findLabels()
      Get all labels.
      Returns:
      all labels
    • findLabelsByOrg

      @Nonnull List<Label> findLabelsByOrg(@Nonnull Organization organization)
      Get all labels.
      Parameters:
      organization - specifies the organization of the resource
      Returns:
      all labels
    • findLabelsByOrgId

      @Nonnull List<Label> findLabelsByOrgId(@Nullable String orgID)
      Get all labels.
      Parameters:
      orgID - specifies the organization ID of the resource
      Returns:
      all labels