Skip to content

Latest commit

 

History

History
192 lines (146 loc) · 5.76 KB

SnippetsApi.md

File metadata and controls

192 lines (146 loc) · 5.76 KB

IO.Swagger.Api.SnippetsApi

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

CreateSnippet

SnippetEntity CreateSnippet (SnippetEntity body)

Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class CreateSnippetExample
    {
        public void main()
        {
            var apiInstance = new SnippetsApi();
            var body = new SnippetEntity(); // SnippetEntity | The snippet configuration details.

            try
            {
                // Creates a snippet. The snippet will be automatically discarded if not used in a subsequent request after 1 minute.
                SnippetEntity result = apiInstance.CreateSnippet(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SnippetsApi.CreateSnippet: " + e.Message );
            }
        }
    }
}

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteSnippet

SnippetEntity DeleteSnippet (string id, bool? disconnectedNodeAcknowledged = null)

Deletes the components in a snippet and discards the snippet

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class DeleteSnippetExample
    {
        public void main()
        {
            var apiInstance = new SnippetsApi();
            var id = id_example;  // string | The snippet id.
            var disconnectedNodeAcknowledged = true;  // bool? | Acknowledges that this node is disconnected to allow for mutable requests to proceed. (optional)  (default to false)

            try
            {
                // Deletes the components in a snippet and discards the snippet
                SnippetEntity result = apiInstance.DeleteSnippet(id, disconnectedNodeAcknowledged);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SnippetsApi.DeleteSnippet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The snippet id.
disconnectedNodeAcknowledged bool? Acknowledges that this node is disconnected to allow for mutable requests to proceed. [optional] [default to false]

Return type

SnippetEntity

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]

UpdateSnippet

SnippetEntity UpdateSnippet (string id, SnippetEntity body)

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

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UpdateSnippetExample
    {
        public void main()
        {
            var apiInstance = new SnippetsApi();
            var id = id_example;  // string | The snippet id.
            var body = new SnippetEntity(); // SnippetEntity | The snippet configuration details.

            try
            {
                // Move's the components in this Snippet into a new Process Group and discards the snippet
                SnippetEntity result = apiInstance.UpdateSnippet(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SnippetsApi.UpdateSnippet: " + e.Message );
            }
        }
    }
}

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]