\DAGApi

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

MethodHTTP requestDescription
DeleteDagDelete /dags/{dag_id}Delete a DAG
GetDagGet /dags/{dag_id}Get basic information about a DAG
GetDagDetailsGet /dags/{dag_id}/detailsGet a simplified representation of DAG
GetDagSourceGet /dagSources/{file_token}Get a source code
GetDagsGet /dagsList DAGs
GetTaskGet /dags/{dag_id}/tasks/{task_id}Get simplified representation of a task
GetTasksGet /dags/{dag_id}/tasksGet tasks for DAG
PatchDagPatch /dags/{dag_id}Update a DAG
PatchDagsPatch /dagsUpdate DAGs
PostClearTaskInstancesPost /dags/{dag_id}/clearTaskInstancesClear a set of task instances
PostSetTaskInstancesStatePost /dags/{dag_id}/updateTaskInstancesStateSet a state of task instances

DeleteDag

DeleteDag(ctx, dagId).Execute()

Delete a DAG

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

Return type

(empty response body)

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]

GetDag

DAG GetDag(ctx, dagId).Execute()

Get basic information about a DAG

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

Return type

DAG

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]

GetDagDetails

DAGDetail GetDagDetails(ctx, dagId).Execute()

Get a simplified representation of DAG

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

Return type

DAGDetail

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]

GetDagSource

InlineResponse2001 GetDagSource(ctx, fileToken).Execute()

Get a source code

Example

package main

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

func main() {
    fileToken := "fileToken_example" // string | The key containing the encrypted path to the file. Encryption and decryption take place only on the server. This prevents the client from reading an non-DAG file. This also ensures API extensibility, because the format of encrypted data may change. 

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

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
fileTokenstringThe key containing the encrypted path to the file. Encryption and decryption take place only on the server. This prevents the client from reading an non-DAG file. This also ensures API extensibility, because the format of encrypted data may change.

Other Parameters

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

NameTypeDescriptionNotes

Return type

InlineResponse2001

Authorization

No authorization required

HTTP request headers

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

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

GetDags

DAGCollection GetDags(ctx).Limit(limit).Offset(offset).OrderBy(orderBy).Tags(tags).OnlyActive(onlyActive).DagIdPattern(dagIdPattern).Execute()

List DAGs

Example

package main

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

func main() {
    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)
    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)
    tags := []string{"Inner_example"} // []string | List of tags to filter results.  *New in version 2.2.0*  (optional)
    onlyActive := true // bool | Only filter active DAGs.  *New in version 2.1.1*  (optional) (default to true)
    dagIdPattern := "dagIdPattern_example" // string | If set, only return DAGs with dag_ids matching this pattern.  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DAGApi.GetDags(context.Background()).Limit(limit).Offset(offset).OrderBy(orderBy).Tags(tags).OnlyActive(onlyActive).DagIdPattern(dagIdPattern).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DAGApi.GetDags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDags`: DAGCollection
    fmt.Fprintf(os.Stdout, "Response from `DAGApi.GetDags`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
limitint32The numbers of items to return.[default to 100]
offsetint32The number of items to skip before starting to collect the result set.
orderBystringThe 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
tags[]stringList of tags to filter results. New in version 2.2.0
onlyActiveboolOnly filter active DAGs. New in version 2.1.1[default to true]
dagIdPatternstringIf set, only return DAGs with dag_ids matching this pattern.

Return type

DAGCollection

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]

GetTask

Task GetTask(ctx, dagId, taskId).Execute()

Get simplified representation of a task

Example

package main

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

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

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

Return type

Task

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]

GetTasks

TaskCollection GetTasks(ctx, dagId).OrderBy(orderBy).Execute()

Get tasks for DAG

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    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.DAGApi.GetTasks(context.Background(), dagId).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DAGApi.GetTasks``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTasks`: TaskCollection
    fmt.Fprintf(os.Stdout, "Response from `DAGApi.GetTasks`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

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

TaskCollection

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]

PatchDag

DAG PatchDag(ctx, dagId).DAG(dAG).UpdateMask(updateMask).Execute()

Update a DAG

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    dAG := *openapiclient.NewDAG() // DAG | 
    updateMask := []string{"Inner_example"} // []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields.  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DAGApi.PatchDag(context.Background(), dagId).DAG(dAG).UpdateMask(updateMask).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DAGApi.PatchDag``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchDag`: DAG
    fmt.Fprintf(os.Stdout, "Response from `DAGApi.PatchDag`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

dAG | DAG | | updateMask | []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. |

Return type

DAG

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]

PatchDags

DAGCollection PatchDags(ctx).DagIdPattern(dagIdPattern).DAG(dAG).Limit(limit).Offset(offset).Tags(tags).UpdateMask(updateMask).OnlyActive(onlyActive).Execute()

Update DAGs

Example

package main

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

func main() {
    dagIdPattern := "dagIdPattern_example" // string | If set, only update DAGs with dag_ids matching this pattern. 
    dAG := *openapiclient.NewDAG() // DAG | 
    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)
    tags := []string{"Inner_example"} // []string | List of tags to filter results.  *New in version 2.2.0*  (optional)
    updateMask := []string{"Inner_example"} // []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields.  (optional)
    onlyActive := true // bool | Only filter active DAGs.  *New in version 2.1.1*  (optional) (default to true)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.DAGApi.PatchDags(context.Background()).DagIdPattern(dagIdPattern).DAG(dAG).Limit(limit).Offset(offset).Tags(tags).UpdateMask(updateMask).OnlyActive(onlyActive).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DAGApi.PatchDags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchDags`: DAGCollection
    fmt.Fprintf(os.Stdout, "Response from `DAGApi.PatchDags`: %v\n", resp)
}

Path Parameters

Other Parameters

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

NameTypeDescriptionNotes
dagIdPatternstringIf set, only update DAGs with dag_ids matching this pattern.
dAGDAG
limitint32The numbers of items to return.[default to 100]
offsetint32The number of items to skip before starting to collect the result set.
tags[]stringList of tags to filter results. New in version 2.2.0
updateMask[]stringThe fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields.
onlyActiveboolOnly filter active DAGs. New in version 2.1.1[default to true]

Return type

DAGCollection

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]

PostClearTaskInstances

TaskInstanceReferenceCollection PostClearTaskInstances(ctx, dagId).ClearTaskInstance(clearTaskInstance).Execute()

Clear a set of task instances

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    clearTaskInstance := *openapiclient.NewClearTaskInstance() // ClearTaskInstance | Parameters of action

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

clearTaskInstance | ClearTaskInstance | Parameters of action |

Return type

TaskInstanceReferenceCollection

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]

PostSetTaskInstancesState

TaskInstanceReferenceCollection PostSetTaskInstancesState(ctx, dagId).UpdateTaskInstancesState(updateTaskInstancesState).Execute()

Set a state of task instances

Example

package main

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

func main() {
    dagId := "dagId_example" // string | The DAG ID.
    updateTaskInstancesState := *openapiclient.NewUpdateTaskInstancesState() // UpdateTaskInstancesState | Parameters of action

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

Path Parameters

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

Other Parameters

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

NameTypeDescriptionNotes

updateTaskInstancesState | UpdateTaskInstancesState | Parameters of action |

Return type

TaskInstanceReferenceCollection

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]