Skip to content

Latest commit

 

History

History
564 lines (433 loc) · 16.1 KB

ProcessorsApi.md

File metadata and controls

564 lines (433 loc) · 16.1 KB

IO.Swagger.Api.ProcessorsApi

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

Method HTTP request Description
ClearState POST /processors/{id}/state/clear-requests Clears the state for a processor
DeleteProcessor DELETE /processors/{id} Deletes a processor
GetProcessor GET /processors/{id} Gets a processor
GetProcessorDiagnostics GET /processors/{id}/diagnostics Gets diagnostics information about a processor
GetPropertyDescriptor GET /processors/{id}/descriptors Gets the descriptor for a processor property
GetState GET /processors/{id}/state Gets the state for a processor
TerminateProcessor DELETE /processors/{id}/threads Terminates a processor, essentially "deleting" its threads and any active tasks
UpdateProcessor PUT /processors/{id} Updates a processor
UpdateRunStatus PUT /processors/{id}/run-status Updates run status of a processor

ClearState

ComponentStateEntity ClearState (string id)

Clears the state for a processor

Example

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

namespace Example
{
    public class ClearStateExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.

            try
            {
                // Clears the state for a processor
                ComponentStateEntity result = apiInstance.ClearState(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.ClearState: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.

Return type

ComponentStateEntity

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]

DeleteProcessor

ProcessorEntity DeleteProcessor (string id, string version = null, string clientId = null, bool? disconnectedNodeAcknowledged = null)

Deletes a processor

Example

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

namespace Example
{
    public class DeleteProcessorExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.
            var version = version_example;  // string | The revision is used to verify the client is working with the latest version of the flow. (optional) 
            var 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. (optional) 
            var disconnectedNodeAcknowledged = true;  // bool? | Acknowledges that this node is disconnected to allow for mutable requests to proceed. (optional)  (default to false)

            try
            {
                // Deletes a processor
                ProcessorEntity result = apiInstance.DeleteProcessor(id, version, clientId, disconnectedNodeAcknowledged);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.DeleteProcessor: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor 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]
disconnectedNodeAcknowledged bool? Acknowledges that this node is disconnected to allow for mutable requests to proceed. [optional] [default to false]

Return type

ProcessorEntity

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]

GetProcessor

ProcessorEntity GetProcessor (string id)

Gets a processor

Example

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

namespace Example
{
    public class GetProcessorExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.

            try
            {
                // Gets a processor
                ProcessorEntity result = apiInstance.GetProcessor(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.GetProcessor: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.

Return type

ProcessorEntity

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]

GetProcessorDiagnostics

ProcessorEntity GetProcessorDiagnostics (string id)

Gets diagnostics information about a processor

Note: This endpoint is subject to change as NiFi and it's REST API evolve.

Example

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

namespace Example
{
    public class GetProcessorDiagnosticsExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.

            try
            {
                // Gets diagnostics information about a processor
                ProcessorEntity result = apiInstance.GetProcessorDiagnostics(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.GetProcessorDiagnostics: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.

Return type

ProcessorEntity

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]

GetPropertyDescriptor

PropertyDescriptorEntity GetPropertyDescriptor (string id, string propertyName, string clientId = null)

Gets the descriptor for a processor property

Example

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

namespace Example
{
    public class GetPropertyDescriptorExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.
            var propertyName = propertyName_example;  // string | The property name.
            var 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. (optional) 

            try
            {
                // Gets the descriptor for a processor property
                PropertyDescriptorEntity result = apiInstance.GetPropertyDescriptor(id, propertyName, clientId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.GetPropertyDescriptor: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.
propertyName string The property name.
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

PropertyDescriptorEntity

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]

GetState

ComponentStateEntity GetState (string id)

Gets the state for a processor

Example

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

namespace Example
{
    public class GetStateExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.

            try
            {
                // Gets the state for a processor
                ComponentStateEntity result = apiInstance.GetState(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.GetState: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.

Return type

ComponentStateEntity

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]

TerminateProcessor

ProcessorEntity TerminateProcessor (string id)

Terminates a processor, essentially "deleting" its threads and any active tasks

Example

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

namespace Example
{
    public class TerminateProcessorExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.

            try
            {
                // Terminates a processor, essentially \"deleting\" its threads and any active tasks
                ProcessorEntity result = apiInstance.TerminateProcessor(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.TerminateProcessor: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.

Return type

ProcessorEntity

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]

UpdateProcessor

ProcessorEntity UpdateProcessor (string id, ProcessorEntity body)

Updates a processor

Example

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

namespace Example
{
    public class UpdateProcessorExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.
            var body = new ProcessorEntity(); // ProcessorEntity | The processor configuration details.

            try
            {
                // Updates a processor
                ProcessorEntity result = apiInstance.UpdateProcessor(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.UpdateProcessor: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.
body ProcessorEntity The processor configuration details.

Return type

ProcessorEntity

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]

UpdateRunStatus

ProcessorEntity UpdateRunStatus (string id, ProcessorRunStatusEntity body)

Updates run status of a processor

Example

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

namespace Example
{
    public class UpdateRunStatusExample
    {
        public void main()
        {
            var apiInstance = new ProcessorsApi();
            var id = id_example;  // string | The processor id.
            var body = new ProcessorRunStatusEntity(); // ProcessorRunStatusEntity | The processor run status.

            try
            {
                // Updates run status of a processor
                ProcessorEntity result = apiInstance.UpdateRunStatus(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProcessorsApi.UpdateRunStatus: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string The processor id.
body ProcessorRunStatusEntity The processor run status.

Return type

ProcessorEntity

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]