Skip to content

Latest commit

 

History

History
148 lines (99 loc) · 3.59 KB

SnippetsApi.md

File metadata and controls

148 lines (99 loc) · 3.59 KB

SnippetsApi

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

Method HTTP request Description
createSnippet POST /snippets Creates a snippet
deleteSnippet DELETE /snippets/{id} Deletes the components in a snippet and drops the snippet
updateSnippet PUT /snippets/{id} Move's the components in this Snippet into a new Process Group and drops the snippet

createSnippet

SnippetEntity createSnippet(body)

Creates a snippet

Example

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


SnippetsApi apiInstance = new SnippetsApi();
SnippetEntity body = new SnippetEntity(); // SnippetEntity | The snippet configuration details.
try {
    SnippetEntity result = apiInstance.createSnippet(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnippetsApi#createSnippet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body SnippetEntity The snippet configuration details.

Return type

SnippetEntity

Authorization

No authorization required

HTTP request headers

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

deleteSnippet

SnippetEntity deleteSnippet(id)

Deletes the components in a snippet and drops the snippet

Example

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


SnippetsApi apiInstance = new SnippetsApi();
String id = "id_example"; // String | The snippet id.
try {
    SnippetEntity result = apiInstance.deleteSnippet(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnippetsApi#deleteSnippet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The snippet id.

Return type

SnippetEntity

Authorization

No authorization required

HTTP request headers

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

updateSnippet

SnippetEntity updateSnippet(id, body)

Move's the components in this Snippet into a new Process Group and drops the snippet

Example

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


SnippetsApi apiInstance = new SnippetsApi();
String id = "id_example"; // String | The snippet id.
SnippetEntity body = new SnippetEntity(); // SnippetEntity | The snippet configuration details.
try {
    SnippetEntity result = apiInstance.updateSnippet(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling SnippetsApi#updateSnippet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String The snippet id.
body SnippetEntity The snippet configuration details.

Return type

SnippetEntity

Authorization

No authorization required

HTTP request headers

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