latestOpenAPI 3.0.02026-08-0819201.1 MB

411f9f98c01e

flows

Update the Flow based on the specified Flow Id

You need workspaces.flow.edit permission to access this resource

patch/flows/{flow_id}

Path parameters

flow_idstring required

Flow identifier

Request body

Example request

{
  "data": {
    "id": "5b4f337bff4304610483ba67",
    "attributes": {
      "created_at": "2020-01-12T14:50:42.215Z",
      "last_modified": "2021-12-13T14:24:53.825Z",
      "name": "PetStore to Email Flow",
      "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "cron": "*/3 * * * *",
      "shut_down_timeout": 5,
      "graph": {
        "nodes": [
          {
            "name": "petStore",
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
            "command": "core/petStore:getPetsByStatus@51ff8236dd1d461f67111b145f69441bafdeb710",
            "id": "step_1",
            "credentials_id": "609e6f5164b6470011d26387",
            "selected_data_samples": [
              "5b4f337bff4304610483ba67"
            ]
          }
        ],
        "edges": [
          {
            "id": "mapper:step_1:step_2",
            "target": "step_2",
            "source": "step_1",
            "config": {
              "mapper_type": "jsonata"
            }
          }
        ]
      },
      "api_version": "2.0",
      "stats_enabled": true,
      "updated_at": "2021-12-13T14:24:53.825Z"
    }
  }
}

Response

OK

metaobject required

Example response

{
  "data": {
    "id": "5b4f337bff4304610483ba67",
    "links": {
      "self": "/v2/flows/5b4f337bff4304610483ba67"
    },
    "attributes": {
      "created_at": "2020-01-12T14:50:42.215Z",
      "last_modified": "2021-12-13T14:24:53.825Z",
      "name": "PetStore to Email Flow",
      "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
      "cron": "*/3 * * * *",
      "shut_down_timeout": 5,
      "graph": {
        "nodes": [
          {
            "name": "petStore",
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
            "command": "core/petStore:getPetsByStatus@51ff8236dd1d461f67111b145f69441bafdeb710",
            "id": "step_1",
            "credentials_id": "609e6f5164b6470011d26387",
            "selected_data_samples": [
              "5b4f337bff4304610483ba67"
            ]
          }
        ],
        "edges": [
          {
            "id": "mapper:step_1:step_2",
            "target": "step_2",
            "source": "step_1",
            "config": {
              "mapper_type": "jsonata"
            }
          }
        ]
      },
      "api_version": "2.0",
      "stats_enabled": true,
      "updated_at": "2021-12-13T14:24:53.825Z"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "5b4f337bff4304610483ba67"
        },
        "links": {
          "self": "/v2/users/5b4f337bff4304610483ba67"
        }
      },
      "workspace": {
        "data": {
          "id": "5b4f337bff4304610483ba67"
        },
        "links": {
          "self": "/v2/workspaces/5b4f337bff4304610483ba67"
        }
      },
      "versions": {
        "links": {
          "related": "/v2/flows/5b4f337bff4304610483ba67/versions"
        }
      },
      "latest_version": {
        "data": {
          "id": "e4b690fb0a65c37789e7be0bf523414e0f98a8e6"
        },
        "links": {
          "self": "/v2/flows/5b4f337bff4304610483ba67/versions/e4b690fb0a65c37789e7be0bf523414e0f98a8e6",
          "related": "/v2/flows/5b4f337bff4304610483ba67/versions/e4b690fb0a65c37789e7be0bf523414e0f98a8e6"
        }
      }
    }
  },
  "included": [
    {
      "id": "5b4f337bff4304610483ba67",
      "links": {
        "self": "/v2/flows/5b4f337bff4304610483ba67/flow-containers/5b4f337bff4304610483ba67_mapper:step_1:step_2"
      },
      "attributes": {
        "step_id": "mapper:step_1:step_2"
      },
      "relationships": {
        "flow": {
          "data": {
            "id": "5b4f337bff4304610483ba67"
          },
          "links": {
            "self": "/v2/flows/5b4f337bff4304610483ba67"
          }
        }
      }
    }
  ]
}