Skip to content

Latest commit

 

History

History
221 lines (140 loc) · 6.19 KB

PipelineApi.md

File metadata and controls

221 lines (140 loc) · 6.19 KB

\PipelineApi

All URIs are relative to https://localhost/api/v0

Method HTTP request Description
Command Post /pipeline/{pipeline_name}/command Execute a pipeline command
Get Get /pipeline/{pipeline_name} Get pipeline
List Get /pipeline List pipelines

Command

PipelineExecutionResponse Command(ctx, pipelineName).Request(request).Execute()

Execute a pipeline command

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/turbot/flowpipe-sdk-go"
)

func main() {
    pipelineName := "pipelineName_example" // string | The name of the pipeline
    request := *openapiclient.NewCmdPipeline("Command_example") // CmdPipeline | Pipeline command.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.PipelineApi.Command(context.Background(), pipelineName).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PipelineApi.Command``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Command`: PipelineExecutionResponse
    fmt.Fprintf(os.Stdout, "Response from `PipelineApi.Command`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
pipelineName string The name of the pipeline

Other Parameters

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

Name Type Description Notes

request | CmdPipeline | Pipeline command. |

Return type

PipelineExecutionResponse

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]

Get

FpPipeline Get(ctx, pipelineName).Execute()

Get pipeline

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/turbot/flowpipe-sdk-go"
)

func main() {
    pipelineName := "pipelineName_example" // string | The name of the pipeline

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
pipelineName string The name of the pipeline

Other Parameters

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

Name Type Description Notes

Return type

FpPipeline

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]

List

ListPipelineResponse List(ctx).Limit(limit).NextToken(nextToken).Execute()

List pipelines

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/turbot/flowpipe-sdk-go"
)

func main() {
    limit := int32(56) // int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. (optional) (default to 25)
    nextToken := "nextToken_example" // string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.PipelineApi.List(context.Background()).Limit(limit).NextToken(nextToken).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PipelineApi.List``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `List`: ListPipelineResponse
    fmt.Fprintf(os.Stdout, "Response from `PipelineApi.List`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit int32 The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. [default to 25]
nextToken string When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data.

Return type

ListPipelineResponse

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]