\TaskInstanceApi

All URIs are relative to http://localhost/api/v1

MethodHTTP requestDescription
GetExtraLinksGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/linksList extra links
GetLogGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{task_try_number}Get logs
GetMappedTaskInstanceGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}Get a mapped task instance
GetMappedTaskInstancesGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/listMappedList mapped task instances
GetTaskInstanceGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}Get a task instance
GetTaskInstancesGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstancesList task instances
GetTaskInstancesBatchPost /dags//dagRuns//taskInstances/listList task instances (batch)

GetExtraLinks

ExtraLinkCollection GetExtraLinks(ctx, dagId, dagRunId, taskId).Execute()

List extra links

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    taskId := "taskId_example" // string | The task ID.

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

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.
taskIdstringThe task ID.

Other Parameters

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

NameTypeDescriptionNotes

Return type

ExtraLinkCollection

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]

GetLog

InlineResponse200 GetLog(ctx, dagId, dagRunId, taskId, taskTryNumber).FullContent(fullContent).Token(token).Execute()

Get logs

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    taskId := "taskId_example" // string | The task ID.
    taskTryNumber := int32(56) // int32 | The task try number.
    fullContent := true // bool | A full content will be returned. By default, only the first fragment will be returned.  (optional)
    token := "token_example" // string | A token that allows you to continue fetching logs. If passed, it will specify the location from which the download should be continued.  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TaskInstanceApi.GetLog(context.Background(), dagId, dagRunId, taskId, taskTryNumber).FullContent(fullContent).Token(token).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TaskInstanceApi.GetLog``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetLog`: InlineResponse200
    fmt.Fprintf(os.Stdout, "Response from `TaskInstanceApi.GetLog`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.
taskIdstringThe task ID.
taskTryNumberint32The task try number.

Other Parameters

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

NameTypeDescriptionNotes

fullContent | bool | A full content will be returned. By default, only the first fragment will be returned. | token | string | A token that allows you to continue fetching logs. If passed, it will specify the location from which the download should be continued. |

Return type

InlineResponse200

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

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

GetMappedTaskInstance

TaskInstance GetMappedTaskInstance(ctx, dagId, dagRunId, taskId, mapIndex).Execute()

Get a mapped task instance

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    taskId := "taskId_example" // string | The task ID.
    mapIndex := int32(56) // int32 | The map index.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TaskInstanceApi.GetMappedTaskInstance(context.Background(), dagId, dagRunId, taskId, mapIndex).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TaskInstanceApi.GetMappedTaskInstance``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetMappedTaskInstance`: TaskInstance
    fmt.Fprintf(os.Stdout, "Response from `TaskInstanceApi.GetMappedTaskInstance`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.
taskIdstringThe task ID.
mapIndexint32The map index.

Other Parameters

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

NameTypeDescriptionNotes

Return type

TaskInstance

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]

GetMappedTaskInstances

TaskInstance GetMappedTaskInstances(ctx, dagId, dagRunId, taskId).Limit(limit).Offset(offset).ExecutionDateGte(executionDateGte).ExecutionDateLte(executionDateLte).StartDateGte(startDateGte).StartDateLte(startDateLte).EndDateGte(endDateGte).EndDateLte(endDateLte).DurationGte(durationGte).DurationLte(durationLte).State(state).Pool(pool).Queue(queue).OrderBy(orderBy).Execute()

List mapped task instances

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    taskId := "taskId_example" // string | The task ID.
    limit := int32(56) // int32 | The numbers of items to return. (optional) (default to 100)
    offset := int32(56) // int32 | The number of items to skip before starting to collect the result set. (optional)
    executionDateGte := time.Now() // time.Time | Returns objects greater or equal to the specified date.  This can be combined with execution_date_lte parameter to receive only the selected period.  (optional)
    executionDateLte := time.Now() // time.Time | Returns objects less than or equal to the specified date.  This can be combined with execution_date_gte parameter to receive only the selected period.  (optional)
    startDateGte := time.Now() // time.Time | Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period.  (optional)
    startDateLte := time.Now() // time.Time | Returns objects less or equal the specified date.  This can be combined with start_date_gte parameter to receive only the selected period.  (optional)
    endDateGte := time.Now() // time.Time | Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period.  (optional)
    endDateLte := time.Now() // time.Time | Returns objects less than or equal to the specified date.  This can be combined with start_date_gte parameter to receive only the selected period.  (optional)
    durationGte := float32(8.14) // float32 | Returns objects greater than or equal to the specified values.  This can be combined with duration_lte parameter to receive only the selected period.  (optional)
    durationLte := float32(8.14) // float32 | Returns objects less than or equal to the specified values.  This can be combined with duration_gte parameter to receive only the selected range.  (optional)
    state := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    pool := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    queue := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    orderBy := "orderBy_example" // string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order.  *New in version 2.1.0*  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TaskInstanceApi.GetMappedTaskInstances(context.Background(), dagId, dagRunId, taskId).Limit(limit).Offset(offset).ExecutionDateGte(executionDateGte).ExecutionDateLte(executionDateLte).StartDateGte(startDateGte).StartDateLte(startDateLte).EndDateGte(endDateGte).EndDateLte(endDateLte).DurationGte(durationGte).DurationLte(durationLte).State(state).Pool(pool).Queue(queue).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TaskInstanceApi.GetMappedTaskInstances``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetMappedTaskInstances`: TaskInstance
    fmt.Fprintf(os.Stdout, "Response from `TaskInstanceApi.GetMappedTaskInstances`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.
taskIdstringThe task ID.

Other Parameters

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

NameTypeDescriptionNotes

limit | int32 | The numbers of items to return. | [default to 100] offset | int32 | The number of items to skip before starting to collect the result set. | executionDateGte | time.Time | Returns objects greater or equal to the specified date. This can be combined with execution_date_lte parameter to receive only the selected period. | executionDateLte | time.Time | Returns objects less than or equal to the specified date. This can be combined with execution_date_gte parameter to receive only the selected period. | startDateGte | time.Time | Returns objects greater or equal the specified date. This can be combined with start_date_lte parameter to receive only the selected period. | startDateLte | time.Time | Returns objects less or equal the specified date. This can be combined with start_date_gte parameter to receive only the selected period. | endDateGte | time.Time | Returns objects greater or equal the specified date. This can be combined with start_date_lte parameter to receive only the selected period. | endDateLte | time.Time | Returns objects less than or equal to the specified date. This can be combined with start_date_gte parameter to receive only the selected period. | durationGte | float32 | Returns objects greater than or equal to the specified values. This can be combined with duration_lte parameter to receive only the selected period. | durationLte | float32 | Returns objects less than or equal to the specified values. This can be combined with duration_gte parameter to receive only the selected range. | state | []string | The value can be repeated to retrieve multiple matching values (OR condition). | pool | []string | The value can be repeated to retrieve multiple matching values (OR condition). | queue | []string | The value can be repeated to retrieve multiple matching values (OR condition). | orderBy | string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. New in version 2.1.0 |

Return type

TaskInstance

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]

GetTaskInstance

TaskInstance GetTaskInstance(ctx, dagId, dagRunId, taskId).Execute()

Get a task instance

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    taskId := "taskId_example" // string | The task ID.

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

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.
taskIdstringThe task ID.

Other Parameters

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

NameTypeDescriptionNotes

Return type

TaskInstance

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]

GetTaskInstances

TaskInstanceCollection GetTaskInstances(ctx, dagId, dagRunId).ExecutionDateGte(executionDateGte).ExecutionDateLte(executionDateLte).StartDateGte(startDateGte).StartDateLte(startDateLte).EndDateGte(endDateGte).EndDateLte(endDateLte).DurationGte(durationGte).DurationLte(durationLte).State(state).Pool(pool).Queue(queue).Limit(limit).Offset(offset).Execute()

List task instances

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dagRunId := "dagRunId_example" // string | The DAG run ID.
    executionDateGte := time.Now() // time.Time | Returns objects greater or equal to the specified date.  This can be combined with execution_date_lte parameter to receive only the selected period.  (optional)
    executionDateLte := time.Now() // time.Time | Returns objects less than or equal to the specified date.  This can be combined with execution_date_gte parameter to receive only the selected period.  (optional)
    startDateGte := time.Now() // time.Time | Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period.  (optional)
    startDateLte := time.Now() // time.Time | Returns objects less or equal the specified date.  This can be combined with start_date_gte parameter to receive only the selected period.  (optional)
    endDateGte := time.Now() // time.Time | Returns objects greater or equal the specified date.  This can be combined with start_date_lte parameter to receive only the selected period.  (optional)
    endDateLte := time.Now() // time.Time | Returns objects less than or equal to the specified date.  This can be combined with start_date_gte parameter to receive only the selected period.  (optional)
    durationGte := float32(8.14) // float32 | Returns objects greater than or equal to the specified values.  This can be combined with duration_lte parameter to receive only the selected period.  (optional)
    durationLte := float32(8.14) // float32 | Returns objects less than or equal to the specified values.  This can be combined with duration_gte parameter to receive only the selected range.  (optional)
    state := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    pool := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    queue := []string{"Inner_example"} // []string | The value can be repeated to retrieve multiple matching values (OR condition). (optional)
    limit := int32(56) // int32 | The numbers of items to return. (optional) (default to 100)
    offset := int32(56) // int32 | The number of items to skip before starting to collect the result set. (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TaskInstanceApi.GetTaskInstances(context.Background(), dagId, dagRunId).ExecutionDateGte(executionDateGte).ExecutionDateLte(executionDateLte).StartDateGte(startDateGte).StartDateLte(startDateLte).EndDateGte(endDateGte).EndDateLte(endDateLte).DurationGte(durationGte).DurationLte(durationLte).State(state).Pool(pool).Queue(queue).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TaskInstanceApi.GetTaskInstances``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTaskInstances`: TaskInstanceCollection
    fmt.Fprintf(os.Stdout, "Response from `TaskInstanceApi.GetTaskInstances`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
dagIdstringThe DAG ID.
dagRunIdstringThe DAG run ID.

Other Parameters

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

NameTypeDescriptionNotes

executionDateGte | time.Time | Returns objects greater or equal to the specified date. This can be combined with execution_date_lte parameter to receive only the selected period. | executionDateLte | time.Time | Returns objects less than or equal to the specified date. This can be combined with execution_date_gte parameter to receive only the selected period. | startDateGte | time.Time | Returns objects greater or equal the specified date. This can be combined with start_date_lte parameter to receive only the selected period. | startDateLte | time.Time | Returns objects less or equal the specified date. This can be combined with start_date_gte parameter to receive only the selected period. | endDateGte | time.Time | Returns objects greater or equal the specified date. This can be combined with start_date_lte parameter to receive only the selected period. | endDateLte | time.Time | Returns objects less than or equal to the specified date. This can be combined with start_date_gte parameter to receive only the selected period. | durationGte | float32 | Returns objects greater than or equal to the specified values. This can be combined with duration_lte parameter to receive only the selected period. | durationLte | float32 | Returns objects less than or equal to the specified values. This can be combined with duration_gte parameter to receive only the selected range. | state | []string | The value can be repeated to retrieve multiple matching values (OR condition). | pool | []string | The value can be repeated to retrieve multiple matching values (OR condition). | queue | []string | The value can be repeated to retrieve multiple matching values (OR condition). | limit | int32 | The numbers of items to return. | [default to 100] offset | int32 | The number of items to skip before starting to collect the result set. |

Return type

TaskInstanceCollection

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]

GetTaskInstancesBatch

TaskInstanceCollection GetTaskInstancesBatch(ctx).ListTaskInstanceForm(listTaskInstanceForm).Execute()

List task instances (batch)

Example

package main

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

func main() {
    listTaskInstanceForm := *openapiclient.NewListTaskInstanceForm() // ListTaskInstanceForm | 

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

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
listTaskInstanceFormListTaskInstanceForm

Return type

TaskInstanceCollection

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]