Skip to content

Latest commit

 

History

History
213 lines (133 loc) · 5.96 KB

WorkflowTemplatesBetaApi.md

File metadata and controls

213 lines (133 loc) · 5.96 KB

\WorkflowTemplatesBetaApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
CreateWorkflowTemplate Post /api/v2/templates Create workflow template
DeleteWorkflowTemplate Delete /api/v2/templates/{templateKey} Delete workflow template
GetWorkflowTemplates Get /api/v2/templates Get workflow templates

CreateWorkflowTemplate

WorkflowTemplateOutput CreateWorkflowTemplate(ctx).CreateWorkflowTemplateInput(createWorkflowTemplateInput).Execute()

Create workflow template

Example

package main

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

func main() {
    createWorkflowTemplateInput := *openapiclient.NewCreateWorkflowTemplateInput("Key_example") // CreateWorkflowTemplateInput | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createWorkflowTemplateInput CreateWorkflowTemplateInput

Return type

WorkflowTemplateOutput

Authorization

ApiKey

HTTP request headers

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

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

DeleteWorkflowTemplate

DeleteWorkflowTemplate(ctx, templateKey).Execute()

Delete workflow template

Example

package main

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

func main() {
    templateKey := "templateKey_example" // string | The template key

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.WorkflowTemplatesBetaApi.DeleteWorkflowTemplate(context.Background(), templateKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `WorkflowTemplatesBetaApi.DeleteWorkflowTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

GetWorkflowTemplates

WorkflowTemplatesListingOutputRep GetWorkflowTemplates(ctx).Summary(summary).Search(search).Execute()

Get workflow templates

Example

package main

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

func main() {
    summary := true // bool | Whether the entire template object or just a summary should be returned (optional)
    search := "search_example" // string | The substring in either the name or description of a template (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.WorkflowTemplatesBetaApi.GetWorkflowTemplates(context.Background()).Summary(summary).Search(search).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `WorkflowTemplatesBetaApi.GetWorkflowTemplates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetWorkflowTemplates`: WorkflowTemplatesListingOutputRep
    fmt.Fprintf(os.Stdout, "Response from `WorkflowTemplatesBetaApi.GetWorkflowTemplates`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
summary bool Whether the entire template object or just a summary should be returned
search string The substring in either the name or description of a template

Return type

WorkflowTemplatesListingOutputRep

Authorization

ApiKey

HTTP request headers

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

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