Skip to content

Latest commit

 

History

History
152 lines (103 loc) · 3.76 KB

LabelsApi.md

File metadata and controls

152 lines (103 loc) · 3.76 KB

LabelsApi

All URIs are relative to http://localhost/nifi-api

Method HTTP request Description
getLabel GET /labels/{id} Gets a label
removeLabel DELETE /labels/{id} Deletes a label
updateLabel PUT /labels/{id} Updates a label

getLabel

LabelEntity getLabel(id)

Gets a label

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.LabelsApi;


LabelsApi apiInstance = new LabelsApi();
String id = "id_example"; // String | The label id.
try {
    LabelEntity result = apiInstance.getLabel(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LabelsApi#getLabel");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The label id.

Return type

LabelEntity

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json

removeLabel

LabelEntity removeLabel(id, version, clientId)

Deletes a label

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.LabelsApi;


LabelsApi apiInstance = new LabelsApi();
String id = "id_example"; // String | The label id.
String version = "version_example"; // String | The revision is used to verify the client is working with the latest version of the flow.
String clientId = "clientId_example"; // String | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response.
try {
    LabelEntity result = apiInstance.removeLabel(id, version, clientId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LabelsApi#removeLabel");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The label id.
version String The revision is used to verify the client is working with the latest version of the flow. [optional]
clientId String If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. [optional]

Return type

LabelEntity

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json

updateLabel

LabelEntity updateLabel(id, body)

Updates a label

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.LabelsApi;


LabelsApi apiInstance = new LabelsApi();
String id = "id_example"; // String | The label id.
LabelEntity body = new LabelEntity(); // LabelEntity | The label configuraiton details.
try {
    LabelEntity result = apiInstance.updateLabel(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LabelsApi#updateLabel");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The label id.
body LabelEntity The label configuraiton details.

Return type

LabelEntity

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json