swagger_client.LabelsApi
All URIs are relative to http://localhost/nifi-api
Method | HTTP request | Description |
---|---|---|
get_label | GET /labels/{id} | Gets a label |
remove_label | DELETE /labels/{id} | Deletes a label |
update_label | PUT /labels/{id} | Updates a label |
get_label
LabelEntity get_label(id)
Gets a label
Example
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.LabelsApi()
id = 'id_example' # str | The label id.
try:
# Gets a label
api_response = api_instance.get_label(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling LabelsApi->get_label: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | The label id. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: /
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_label
LabelEntity remove_label(id, version=version, client_id=client_id)
Deletes a label
Example
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.LabelsApi()
id = 'id_example' # str | The label id.
version = 'version_example' # str | The revision is used to verify the client is working with the latest version of the flow. (optional)
client_id = 'client_id_example' # str | If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. (optional)
try:
# Deletes a label
api_response = api_instance.remove_label(id, version=version, client_id=client_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling LabelsApi->remove_label: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | The label id. | |
version | str | The revision is used to verify the client is working with the latest version of the flow. | [optional] |
client_id | str | 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
Authorization
No authorization required
HTTP request headers
- Content-Type: /
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_label
LabelEntity update_label(id, body)
Updates a label
Example
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.LabelsApi()
id = 'id_example' # str | The label id.
body = swagger_client.LabelEntity() # LabelEntity | The label configuration details.
try:
# Updates a label
api_response = api_instance.update_label(id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling LabelsApi->update_label: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | str | The label id. | |
body | LabelEntity | The label configuration details. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]