\XComApi

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

MethodHTTP requestDescription
GetXcomEntriesGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntriesList XCom entries
GetXcomEntryGet /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}Get an XCom entry

GetXcomEntries

XComCollection GetXcomEntries(ctx, dagId, dagRunId, taskId).Limit(limit).Offset(offset).Execute()

List XCom entries

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.
    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.XComApi.GetXcomEntries(context.Background(), dagId, dagRunId, taskId).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `XComApi.GetXcomEntries``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetXcomEntries`: XComCollection
    fmt.Fprintf(os.Stdout, "Response from `XComApi.GetXcomEntries`: %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 apiGetXcomEntriesRequest 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. |

Return type

XComCollection

Authorization

Basic, Kerberos

HTTP request headers

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

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

GetXcomEntry

XCom GetXcomEntry(ctx, dagId, dagRunId, taskId, xcomKey).Deserialize(deserialize).Execute()

Get an XCom entry

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.
    xcomKey := "xcomKey_example" // string | The XCom key.
    deserialize := true // bool | Whether to deserialize an XCom value when using a custom XCom backend.  The XCom API endpoint calls `orm_deserialize_value` by default since an XCom may contain value that is potentially expensive to deserialize in the web server. Setting this to true overrides the consideration, and calls `deserialize_value` instead.  This parameter is not meaningful when using the default XCom backend.  *New in version 2.4.0*  (optional) (default to false)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.XComApi.GetXcomEntry(context.Background(), dagId, dagRunId, taskId, xcomKey).Deserialize(deserialize).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `XComApi.GetXcomEntry``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetXcomEntry`: XCom
    fmt.Fprintf(os.Stdout, "Response from `XComApi.GetXcomEntry`: %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.
xcomKeystringThe XCom key.

Other Parameters

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

NameTypeDescriptionNotes

deserialize | bool | Whether to deserialize an XCom value when using a custom XCom backend. The XCom API endpoint calls `orm_deserialize_value` by default since an XCom may contain value that is potentially expensive to deserialize in the web server. Setting this to true overrides the consideration, and calls `deserialize_value` instead. This parameter is not meaningful when using the default XCom backend. New in version 2.4.0 | [default to false]

Return type

XCom

Authorization

Basic, Kerberos

HTTP request headers

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

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