All URIs are relative to http://localhost/nifi-api
Method | HTTP request | Description |
---|---|---|
createSnippet | POST /snippets | Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute. |
deleteSnippet | DELETE /snippets/{id} | Deletes the components in a snippet and discards the snippet |
updateSnippet | PUT /snippets/{id} | Move's the components in this Snippet into a new Process Group and discards the snippet |
SnippetEntity createSnippet(body)
Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.SnippetsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");
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();
}
Name | Type | Description | Notes |
---|---|---|---|
body | SnippetEntity | The snippet configuration details. |
- Content-Type: application/json
- Accept: application/json
SnippetEntity deleteSnippet(id)
Deletes the components in a snippet and discards the snippet
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.SnippetsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");
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();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | The snippet id. |
- Content-Type: /
- Accept: application/json
SnippetEntity updateSnippet(id, body)
Move's the components in this Snippet into a new Process Group and discards the snippet
// Import classes:
//import com.github.hermannpencole.nifi.swagger.ApiClient;
//import com.github.hermannpencole.nifi.swagger.ApiException;
//import com.github.hermannpencole.nifi.swagger.Configuration;
//import com.github.hermannpencole.nifi.swagger.auth.*;
//import com.github.hermannpencole.nifi.swagger.client.SnippetsApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");
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();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | The snippet id. | |
body | SnippetEntity | The snippet configuration details. |
- Content-Type: application/json
- Accept: application/json