Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 1.78 KB

TaskAPI.md

File metadata and controls

79 lines (49 loc) · 1.78 KB

\TaskAPI

All URIs are relative to http://localhost:8081

Method HTTP request Description
GetTask Get /task/{id} Get task status

GetTask

TaskStatus GetTask(ctx, id).Execute()

Get task status

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/onpremless/go-client"
)

func main() {
    id := "id_example" // string | task id

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

TaskStatus

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]