---
title: "Adding/Removing flow from users favorite list"
method: PATCH
path: "/flows/{flow_id}/toggle-favourite"
tags: ["flows"]
---

# Adding/Removing flow from users favorite list

`PATCH /flows/{flow_id}/toggle-favourite`

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

## Response `200`

OK

- object
  - `attributes` object, required
    - `favorite` boolean
    - `default_mapper_type` 'jsonata', required
    - `type` 'ordinary' | 'long_running', required — You need `workspaces.flow.toggleRealtime` permission to set `long_running` value
    - `nodes_config` object
      - `step_id` object — The Id of flow step. Format: step_1, step_2, step_n
        - `log_level` 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' — Log level of component running in this step
        - `replicas` integer — This parameter configures the maximum container replicas, that can be run simultaneously
        - `passthrough` object
          - `disabled` boolean, required — This parameter toggles passthrough for a step
        - `consume_raw_data` boolean — This parameter configures the parsing behaviour in the webhook step. In case it is true, webhook step receives input message in raw structure.
        - `prefetch` integer — This parameter configures the maximum amount of messages, that the step can process simultaneously
        - `disable_dynamic_flow_control` boolean — This parameter configures disabling publisher confirms in sailor. Supports only for components with sailor-jvm version above 3.3.5 and sailor-nodejs version above 2.6.10
        - `persistent_messages` boolean — This parameter configures messages persistence in sailor. Supports only for components with JVM sailor version above 3.4.0 and NodeJS sailor above 2.7.0
    - `created_at` string, date-time, required
    - `last_modified` string, date-time, required
    - `name` string, required — Name of your Flow
    - `description` string, nullable — Flow description
    - `cron` string, nullable, required
    - `variables` object — Flow Variables
    - `shut_down_timeout` integer — *Flow Shutdown Timeout* The maximum time, in minutes, that a flow will wait after processing the last message before terminating. If new messages are received during this time, the flow will continue processing them.
    - `graph` object, required — Flow graph representing component connections
      - `nodes` union[], required
        - union
          - object
            - `name` string
            - `description` string
            - `command` string, required
            - `fields` object
            - `error` boolean
            - `id` string, required
            - `credentials_id` string
            - `selected_data_samples` string[], required
          - object
            - `name` string
            - `description` string
            - `command` string, required
            - `error` boolean — Set to true if component used as error handler
            - `id` string, required
            - `selected_data_samples` string[], required
      - `edges` object[], required
        - `id` string, required
        - `target` string, required
        - `source` string, required
        - `config` object, required
          - `mapper_type` string
          - `mapper` object, required
          - `condition` string, nullable, required — condition for Content Based Router component
    - `api_version` string, required
    - `current_status` 'inactive', required
    - `status` 'inactive', required
    - `stats_enabled` boolean — *Flow Stats Toggle* By default each step of a flow generates stats about input/output messages and errors. You can see them on the Executions and Dashboard pages. To disable input/output message stats you can set flow's `attributes.stats_enabled` flag to `false`.
    - `updated_at` string, date-time
  - `id` string, required
  - `type` 'flow', required
  - `links` object, required
    - `self` string, required
  - `relationships` object, required
    - `user` object, required
      - `data` object, required
        - `id` string, required — User ID
        - `type` 'user', required
      - `links` object, required
        - `self` string, required
    - `workspace` object, required
      - `data` object, required
        - `id` string, required — Workspace ID
        - `type` 'workspace', required
      - `links` object, required
        - `self` string, required
    - `versions` object, required
      - `links` object, required
        - `related` string, required
    - `latest_version` object, required
      - `data` object, required
        - `id` string, required — Flow-version ID
        - `type` 'flow-version', required
      - `links` object, required
        - `self` string, required
        - `related` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
