orchestrator-swagger-go-client/docs/UserSourceApi.md

6.4 KiB

\UserSourceApi

All URIs are relative to /api/v1

Method HTTP request Description
PlugTaskPlugIdentifierPost Post /plug/task/{plug_identifier} Start a plug task
PlugTaskPlugIdentifierTaskIdDelete Delete /plug/task/{plug_identifier}/{task_id} Stop a plug task
PlugTaskPlugIdentifierTaskIdGet Get /plug/task/{plug_identifier}/{task_id} Gets the status of a plug task

PlugTaskPlugIdentifierPost

TaskResponse PlugTaskPlugIdentifierPost(ctx, plugIdentifier).Task(task).Execute()

Start a plug task

Example

package main

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

func main() {
    plugIdentifier := "plugIdentifier_example" // string | Plug Identifier
    task := *openapiclient.NewTaskStartTask() // TaskStartTask | Task Details

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
plugIdentifier string Plug Identifier

Other Parameters

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

Name Type Description Notes

task | TaskStartTask | Task Details |

Return type

TaskResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

PlugTaskPlugIdentifierTaskIdDelete

TaskResponse PlugTaskPlugIdentifierTaskIdDelete(ctx, plugIdentifier, taskId).Execute()

Stop a plug task

Example

package main

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

func main() {
    plugIdentifier := "plugIdentifier_example" // string | Plug Identifier
    taskId := "taskId_example" // string | Task ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
plugIdentifier string Plug Identifier
taskId string Task ID

Other Parameters

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

Name Type Description Notes

Return type

TaskResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

PlugTaskPlugIdentifierTaskIdGet

TaskResponse PlugTaskPlugIdentifierTaskIdGet(ctx, plugIdentifier, taskId).Execute()

Gets the status of a plug task

Example

package main

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

func main() {
    plugIdentifier := "plugIdentifier_example" // string | Plug Identifier
    taskId := "taskId_example" // string | Task ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
plugIdentifier string Plug Identifier
taskId string Task ID

Other Parameters

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

Name Type Description Notes

Return type

TaskResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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