Skip to content

Latest commit

 

History

History
148 lines (96 loc) · 4.03 KB

TemplatesApi.md

File metadata and controls

148 lines (96 loc) · 4.03 KB

\TemplatesApi

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

Method HTTP request Description
ExportTemplate Get /templates/{id}/download Exports a template
RemoveTemplate Delete /templates/{id} Deletes a template

ExportTemplate

string ExportTemplate(ctx, id).Execute()

Exports a template

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | The template id.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TemplatesApi.ExportTemplate(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.ExportTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ExportTemplate`: string
    fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.ExportTemplate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The template id.

Other Parameters

Other parameters are passed through a pointer to a apiExportTemplateRequest struct via the builder pattern

Name Type Description Notes

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/xml

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

RemoveTemplate

TemplateEntity RemoveTemplate(ctx, id).DisconnectedNodeAcknowledged(disconnectedNodeAcknowledged).Execute()

Deletes a template

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | The template id.
    disconnectedNodeAcknowledged := true // bool | Acknowledges that this node is disconnected to allow for mutable requests to proceed. (optional) (default to false)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TemplatesApi.RemoveTemplate(context.Background(), id).DisconnectedNodeAcknowledged(disconnectedNodeAcknowledged).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.RemoveTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RemoveTemplate`: TemplateEntity
    fmt.Fprintf(os.Stdout, "Response from `TemplatesApi.RemoveTemplate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The template id.

Other Parameters

Other parameters are passed through a pointer to a apiRemoveTemplateRequest struct via the builder pattern

Name Type Description Notes

disconnectedNodeAcknowledged | bool | Acknowledges that this node is disconnected to allow for mutable requests to proceed. | [default to false]

Return type

TemplateEntity

Authorization

No authorization required

HTTP request headers

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

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