{
    "openapi": "3.1.0",
    "info": {
        "title": "hotglue API",
        "version": "1.2"
    },
    "servers": [
        {
            "url": "https://api.hotglue.com"
        }
    ],
    "components": {
        "securitySchemes": {
            "sec0": {
                "type": "apiKey",
                "in": "header",
                "name": "x-api-key"
            }
        },
        "schemas": {
            "QueuedJob": {
                "type": "object",
                "required": [
                    "id",
                    "env_id",
                    "tenant_id",
                    "flow_id",
                    "status",
                    "created_at",
                    "updated_at"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 101
                    },
                    "env_id": {
                        "type": "string",
                        "example": "test-env"
                    },
                    "tenant_id": {
                        "type": "string",
                        "example": "tenant-123"
                    },
                    "flow_id": {
                        "type": "string",
                        "example": "customer-sync"
                    },
                    "status": {
                        "type": "string",
                        "example": "QUEUED"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-01-02T03:04:05+00:00"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-01-02T03:05:06+00:00"
                    },
                    "job_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "Nightly customer sync"
                    },
                    "override_start_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "2026-01-01T00:00:00Z"
                    },
                    "override_end_date": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "example": "2026-01-01T00:00:00Z"
                    },
                    "override_selected_tables": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "boolean"
                        },
                        "example": {
                            "customer": true,
                            "orders": false
                        }
                    },
               
                    "override_field_map": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "example": null
                    },
                    "override_env_vars": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "example": {
                            "DEBUG": "true"
                        }
                    },
                    "override_source_config": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "example": null
                    },
                    "override_target_config": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "example": null
                    },
                    "override_connector_config": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": true,
                        "example": null
                    },
                    "override_lifecycle_webhook": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "url": {
                                "type": "string",
                                "description": "The URL to send lifecycle webhooks to.",
                                "example": "https://example.com"
                            },
                            "secret": {
                                "type": "string",
                                "description": "An optional secret to include with the webhook for verification.",
                                "example": "some-secret"
                            }
                        },
                        "required": [
                            "url"
                        ],
                        "description": "If present, this must be an object containing a required 'url' field. Set to null to remove.",
                        "example": {
                            "url": "https://example.com",
                            "secret": "some-secret"
                        }
                    }
               
                }
            },
            "QueuedJobsResponse": {
                "type": "object",
                "required": [
                    "queued_jobs"
                ],
                "properties": {
                    "queued_jobs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/QueuedJob"
                        }
                    }
                }
            }
        }
    },
    "security": [
        {
            "sec0": []
        }
    ],
    "paths": {
        "/{env_id}/{flow_id}/{tenant}/linkedSources": {
            "get": {
                "summary": "Retrieve linked source",
                "description": "Fetch the linked source for a tenant. This can be useful for fetching credentials and flags, and to confirm that a user is properly connected.",
                "operationId": "linked-sources-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "description": "JWT token generated with your private signing key. Required if config is requested",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "config",
                        "in": "query",
                        "description": "Request the underlying config for the linked source",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "tap": "asana",
                                                "domain": "asana.com",
                                                "label": "Asana",
                                                "tap_url": "https://app.asana.com/-/oauth_authorize?response_type=code&client_id=*********",
                                                "auth_url": "https://app.asana.com/-/oauth_token",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/asana.svg",
                                                "type": "oauth",
                                                "client_id": "**********",
                                                "fieldMap": {
                                                    "tasks": {
                                                        "name": "tasks",
                                                        "selected": [
                                                            "gid",
                                                            "modified_at",
                                                            "resource_type",
                                                            "name",
                                                            "approval_status",
                                                            "assignee_status",
                                                            "completed",
                                                            "completed_at",
                                                            "completed_by",
                                                            "created_at",
                                                            "dependencies",
                                                            "dependents",
                                                            "due_at",
                                                            "due_on",
                                                            "external",
                                                            "hearted",
                                                            "hearts",
                                                            "html_notes",
                                                            "is_rendered_as_seperator",
                                                            "liked",
                                                            "likes",
                                                            "memberships",
                                                            "notes",
                                                            "num_hearts",
                                                            "num_likes",
                                                            "num_subtasks",
                                                            "resource_subtype",
                                                            "start_on",
                                                            "assignee",
                                                            "custom_fields",
                                                            "followers",
                                                            "parent",
                                                            "permalink_url",
                                                            "projects",
                                                            "tags",
                                                            "workspace"
                                                        ]
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "tap": {
                                                "type": "string",
                                                "example": "asana"
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "asana.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Asana"
                                            },
                                            "tap_url": {
                                                "type": "string",
                                                "example": "https://app.asana.com/-/oauth_authorize?response_type=code&client_id=*********"
                                            },
                                            "auth_url": {
                                                "type": "string",
                                                "example": "https://app.asana.com/-/oauth_token"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/asana.svg"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "oauth"
                                            },
                                            "client_id": {
                                                "type": "string",
                                                "example": "**********"
                                            },
                                            "fieldMap": {
                                                "type": "object",
                                                "properties": {
                                                    "tasks": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "example": "tasks"
                                                            },
                                                            "selected": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string",
                                                                    "example": "gid"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "post": {
                "summary": "Link a source",
                "description": "Create a new connection for a tenant by passing a config object, along with an optional schedule or field_map",
                "operationId": "linked-sources-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "source"
                                ],
                                "properties": {
                                    "source": {
                                        "type": "object",
                                        "description": "The source & settings info you wish to link",
                                        "required": [
                                            "tap"
                                        ],
                                        "properties": {
                                            "tap": {
                                                "type": "string",
                                                "description": "Name of tap"
                                            },
                                            "config": {
                                                "type": "object",
                                                "description": "JSON object containing settings for the source"
                                            },
                                            "symlink": {
                                                "type": "object",
                                                "description": "Symlink allows you to share credentials with a connection from another flow",
                                                "properties": {
                                                    "entity": {
                                                        "type": "string",
                                                        "description": "The name of the connector that is already linked"
                                                    },
                                                    "id": {
                                                        "type": "string",
                                                        "description": "The previously linked flow_id containing a user's credentials"
                                                    },
                                                    "tenant": {
                                                        "type": "string",
                                                        "description": "Optional. If using subtenants, the tenant id that has the linked connector."
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "schedule": {
                                        "type": "object",
                                        "description": "The schedule expression to sync on",
                                        "properties": {
                                            "schedule_expression": {
                                                "type": "string",
                                                "description": "A CRON expression defining how often to run jobs for the tenant"
                                            },
                                            "state": {
                                                "type": "string",
                                                "description": "Whether the schedule should be enabled or disabled",
                                                "enum": [
                                                    "ENABLED",
                                                    "DISABLED"
                                                ]
                                            }
                                        }
                                    },
                                    "field_map": {
                                        "type": ["object", "null"],
                                        "required": false,
                                        "description": "The field map to use (if not provided, will use default)"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Unlink a source",
                "description": "Permanently delete your tenant's connection. This cannot be undone.",
                "operationId": "linked-sources-delete",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap to unlink",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "patch": {
                "summary": "Update linked sources",
                "description": "Modify the field map or change the config for a linked source",
                "operationId": "linked-sources-update",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "tap"
                                ],
                                "properties": {
                                    "tap": {
                                        "type": "string",
                                        "description": "Name of tap to update"
                                    },
                                    "field_map": {
                                        "type": ["object", "null"],
                                        "required": false,
                                        "description": "JSON object representing all fields to pull"
                                    },
                                    "config": {
                                        "type": ["object", "null"],
                                        "required": false,
                                        "description": "JSON object containing config values to update"
                                    },
                                    "delete_fields": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "required": false,
                                        "description": "List of configuration fields to delete"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/flows/supported": {
            "get": {
                "summary": "Retrieve supported flows",
                "description": "Returns all flows in an environment and their connectors",
                "operationId": "supported-flows-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "id": "cxEkB6bLZ",
                                                "name": "Sales",
                                                "description": "Sales records from your system",
                                                "taps": [
                                                    "salesforce",
                                                    "hubspot",
                                                    "file"
                                                ],
                                                "targets": [
                                                    "s3"
                                                ]
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string",
                                                "example": "cxEkB6bLZ"
                                            },
                                            "name": {
                                                "type": "string",
                                                "example": "Sales"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "Sales records from your system"
                                            },
                                            "taps": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "salesforce"
                                                }
                                            },
                                            "targets": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "s3"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/flows/linked": {
            "post": {
                "summary": "Create linked flows",
                "description": "Link a flow for a specific tenant",
                "operationId": "linked-flows-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "flow",
                                    "user_id"
                                ],
                                "properties": {
                                    "flow": {
                                        "type": "string",
                                        "description": "ID of flow to link"
                                    },
                                    "user_id": {
                                        "type": "string",
                                        "description": "ID of tenant"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Retrieve linked flows",
                "description": "Returns the flows that are currently linked for a specific tenant",
                "operationId": "linked-flows-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "description": "ID of tenant",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "id": "cxEkB6bLZ",
                                                "name": "Sales",
                                                "description": "Sales records from your system",
                                                "taps": [
                                                    "salesforce",
                                                    "hubspot",
                                                    "file"
                                                ],
                                                "targets": [
                                                    "s3"
                                                ]
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string",
                                                "example": "cxEkB6bLZ"
                                            },
                                            "name": {
                                                "type": "string",
                                                "example": "Sales"
                                            },
                                            "description": {
                                                "type": "string",
                                                "example": "Sales records from your system"
                                            },
                                            "taps": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "salesforce"
                                                }
                                            },
                                            "targets": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "s3"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenant/{env_id}/{tenant}": {
            "delete": {
                "summary": "Delete a tenant",
                "description": "Delete all of a tenants data and optionally revoke OAuth connections",
                "operationId": "tenants-delete",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "revoke",
                        "in": "query",
                        "description": "Revokes all OAuth connections if set to true",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenants/{env_id}": {
            "get": {
                "summary": "Retrieve tenants",
                "description": "Returns a list of tenants that exist in an environment",
                "operationId": "tenants-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            123,
                                            456,
                                            789
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "string",
                                        "example": 123
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenants/{env_id}/schedule": {
            "put": {
                "summary": "Toggle schedule",
                "description": "Disable, enable, and manage schedules across tenants in your environment",
                "operationId": "tenants-toggle-schedule",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "mode",
                        "in": "query",
                        "description": "By default, the toggle endpoint only applies to tenants who already have (or had) schedules. Passing ?mode=upsert will apply schedules to tenants whether or not they currently have schedules",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "upsert"
                            ]
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "toggle": {
                                        "type": "string",
                                        "description": "Used to toggle all schedules in this environment",
                                        "enum": [
                                            "enable",
                                            "disable"
                                        ]
                                    },
                                    "flows": {
                                        "type": "array",
                                        "description": "List of flow ids to apply this operation for",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "tenants": {
                                        "type": "array",
                                        "description": "List of tenants to apply this operation for",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "expression": {
                                        "type": "string",
                                        "description": "Can be \"default\" to use the admin schedule or a cron expression. Will be applied for all tenants"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "toggle": "enabled",
                                            "updated": 1
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "toggle": {
                                            "type": "string",
                                            "example": "enable"
                                        },
                                        "updated": {
                                            "type": "integer",
                                            "example": 1,
                                            "default": 0
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenant/{env_id}/{tenant}/snapshots": {
            "delete": {
                "summary": "Delete Snapshot",
                "description": "Delete all existing snapshots for a particular tenant\n\nLearn more about snapshots [here](/transformation/snapshots).",
                "operationId": "tenants-delete-snapshot",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Get Snapshots",
                "description": "Retrieve either a list of snapshot files or a specific snapshot file for a tenant.\n\nLearn more about snapshots [here](/transformation/snapshots).",
                "operationId": "tenants-get-snapshots",
                "parameters": [
                    {
                    "name": "env_id",
                    "in": "path",
                    "description": "ID of environment",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                    },
                    {
                    "name": "tenant",
                    "in": "path",
                    "description": "ID of tenant",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                    },
                    {
                    "name": "file",
                    "in": "query",
                    "description": "Name of the specific snapshot file to retrieve. If provided, the response will include the base64 encoded file contents. If not provided, a list of downloadable snapshot files will be returned.",
                    "required": false,
                    "schema": {
                        "type": "string"
                    }
                    },
                    {
                    "name": "folder",
                    "in": "query",
                    "description": "Folder within the snapshots directory to list files from. If not provided, all files will be returned.",
                    "required": false,
                    "schema": {
                        "type": "string"
                    }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "List Files": {
                                        "value": [
                                            {
                                            "file": "contacts_abcd.snapshot.parquet",
                                            "last_updated": "2024-06-02T12:34:56Z"
                                            },
                                            {
                                                "file": "companies_abcd.snapshot.parquet",
                                                "last_updated": "2024-06-02T14:34:56Z"
                                            }
                                        ]
                                    },
                                    "Single File": {
                                        "value": {
                                            "data": "<base64-encoded-string>",
                                            "mime_type": "application/json"
                                        }
                                    }
                                },
                                "schema": {
                                    "oneOf": [
                                    {
                                        "type": "array",
                                        "items": {
                                        "type": "object",
                                        "properties": {
                                            "file": { "type": "string" },
                                            "last_updated": { "type": "string", "format": "date-time" }
                                        }
                                        }
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                        "data": { "type": "string" },
                                        "mime_type": { "type": "string" }
                                        }
                                    }
                                    ]
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow}/{user_id}/jobs/queued": {
            "get": {
                "summary": "Fetch queued jobs",
                "description": "Returns queued jobs for a specific environment, flow, and user/tenant.",
                "operationId": "queued-jobs-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "ID of user/tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "queued_jobs": [
                                                {
                                                    "id": 101,
                                                    "env_id": "test-env",
                                                    "tenant_id": "tenant-123",
                                                    "flow_id": "customer-sync",
                                                    "status": "QUEUED",
                                                    "created_at": "2026-01-02T03:04:05+00:00",
                                                    "updated_at": "2026-01-02T03:05:06+00:00",
                                                    "job_name": "Nightly customer sync",
                                                    "override_start_date": "2026-01-01T00:00:00Z",
                                                    "override_end_date": null,
                                                    "override_selected_tables": {
                                                        "customer": true,
                                                        "orders": false
                                                    },
                                                    "override_field_map": null,
                                                    "override_env_vars": {
                                                        "DEBUG": "true"
                                                    },
                                                    "override_source_config": null,
                                                    "override_target_config": null,
                                                    "override_connector_config": null,
                                                    "override_lifecycle_webhook": {
                                                        "url": "https://example.com",
                                                        "secret": "some-secret"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/QueuedJobsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/jobs/queued": {
            "get": {
                "summary": "Fetch environment queued jobs",
                "description": "Returns queued jobs for an environment across flows/users.",
                "operationId": "environment-queued-jobs-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "queued_jobs": [
                                                {
                                                    "id": 101,
                                                    "env_id": "test-env",
                                                    "tenant_id": "tenant-123",
                                                    "flow_id": "customer-sync",
                                                    "status": "QUEUED",
                                                    "created_at": "2026-01-02T03:04:05+00:00",
                                                    "updated_at": "2026-01-02T03:05:06+00:00",
                                                    "job_name": "Nightly customer sync",
                                                    "override_start_date": "2026-01-01T00:00:00Z",
                                                    "override_end_date": null,
                                                    "override_selected_tables": {
                                                        "customer": true,
                                                        "orders": false
                                                    },
                                                    "override_field_map": null,
                                                    "override_env_vars": {
                                                        "DEBUG": "true"
                                                    },
                                                    "override_source_config": null,
                                                    "override_target_config": null,
                                                    "override_connector_config": null,
                                                    "override_lifecycle_webhook": {
                                                        "url": "https://example.com",
                                                        "secret": "some-secret"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/QueuedJobsResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow}/{user_id}/jobs/queued/{queued_job_id}": {
            "delete": {
                "summary": "Cancel queued job",
                "description": "Cancels a queued job.",
                "operationId": "queued-job-cancel",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "ID of user/tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "queued_job_id",
                        "in": "path",
                        "description": "ID of queued job",
                        "schema": {
                            "oneOf": [
                                {
                                    "type": "string"
                                },
                                {
                                    "type": "integer"
                                }
                            ]
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "id": 101,
                                            "env_id": "test-env",
                                            "tenant_id": "tenant-123",
                                            "flow_id": "customer-sync",
                                            "status": "QUEUED",
                                            "created_at": "2026-01-02T03:04:05+00:00",
                                            "updated_at": "2026-01-02T03:05:06+00:00",
                                            "job_name": "Nightly customer sync",
                                            "override_start_date": "2026-01-01T00:00:00Z",
                                            "override_end_date": null,
                                            "override_selected_tables": {
                                                "customer": true,
                                                "orders": false
                                            },
                                            "override_field_map": null,
                                            "override_env_vars": {
                                                "DEBUG": "true"
                                            },
                                            "override_source_config": null,
                                            "override_target_config": null,
                                            "override_connector_config": null,
                                            "override_lifecycle_webhook": {
                                                "url": "https://example.com",
                                                "secret": "some-secret"
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "$ref": "#/components/schemas/QueuedJob"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "BadRequestError",
                                            "Message": "Queued job not found"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Queued job not found"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/latest": {
            "get": {
                "summary": "Get latest job",
                "description": "Fetch the most recent job for a given tenant in a given flow",
                "operationId": "jobs-latest",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "job_id": "lmaEbA",
                                            "env_id": "dev.example-env.hotglue.xyz",
                                            "job_name": "test_job:_V-vgdlLN",
                                            "tenant": "default",
                                            "started_by": "default",
                                            "flow": "l8odS2mce",
                                            "s3_root": "default/flows/l8odS2mce/jobs/lmaEbA",
                                            "start_time": "2020-12-30T18:01:01.828266+00:00",
                                            "state": {},
                                            "tap": "quickbooks:sandbox",
                                            "status": "ETL_FAILED",
                                            "message": "ETL error...",
                                            "last_updated": "2020-12-30T20:31:00.081282+00:00"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "job_id": {
                                            "type": "string",
                                            "example": "lmaEbA"
                                        },
                                        "env_id": {
                                            "type": "string",
                                            "example": "dev.example-env.hotglue.xyz"
                                        },
                                        "job_name": {
                                            "type": "string",
                                            "example": "test_job:_V-vgdlLN"
                                        },
                                        "tenant": {
                                            "type": "string",
                                            "example": "default"
                                        },
                                        "started_by": {
                                            "type": "string",
                                            "example": "default"
                                        },
                                        "flow": {
                                            "type": "string",
                                            "example": "l8odS2mce"
                                        },
                                        "s3_root": {
                                            "type": "string",
                                            "example": "default/flows/l8odS2mce/jobs/lmaEbA"
                                        },
                                        "start_time": {
                                            "type": "string",
                                            "example": "2020-12-30T18:01:01.828266+00:00"
                                        },
                                        "state": {
                                            "type": "object",
                                            "properties": {}
                                        },
                                        "tap": {
                                            "type": "string",
                                            "example": "quickbooks:sandbox"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "ETL_FAILED",
                                            "enum": [
                                                "JOB_CREATED",
                                                "DISCOVER_STARTED",
                                                "DISCOVER_FAILED",
                                                "SYNC_STARTED",
                                                "SYNC_FAILED",
                                                "SYNC_SUCCESS",
                                                "ETL_STARTED",
                                                "ETL_FAILED",
                                                "ETL_SUCCESS",
                                                "EXPORT_STARTED",
                                                "EXPORT_FAILED",
                                                "JOB_COMPLETED"
                                              ]                                              
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "ETL error..."
                                        },
                                        "last_updated": {
                                            "type": "string",
                                            "example": "2020-12-30T20:31:00.081282+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs": {
            "post": {
                "summary": "Run a V1 job",
                "description": "Kicks off a job for a given tenant. When using the API tap, you can pass a payload in the `state` object to be written to the target. When `queue_if_active_job` is set to true in the request body, hotglue queues the job if another job is already running for the same tenant or flow.",
                "operationId": "jobs-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "object",
                                        "description": "Pass extra context to be used in the job. Often used with the unified schema for write jobs. Note that this is different from the source state."
                                    },
                                    "tap": {
                                        "type": "string",
                                        "description": "The source of the job. For write jobs, this is usually \"api.\""
                                    },
                                    "job_name": {
                                        "type": "string",
                                        "description": "Name for job. If not provided, name is autogenerated"
                                    },
                                    "override_start_date": {
                                        "type": "string",
                                        "description": "Date to start syncing data from (e.g. 2022-08-08T00:00:00.000Z)",
                                        "format": "date-time"
                                    },
                                    "reset_source_state": {
                                        "type": "boolean",
                                        "description": "Runs the job as a \"full_sync\" by clearing the `state` on the linkedSource"
                                    },
                                    "streaming_job": {
                                        "type": "boolean",
                                        "description": "If true, the job will run in streaming mode and skip the ETL step. This feature is in beta."
                                    },
                                    "override_selected_tables": {
                                        "type": "object",
                                        "description": "For use with the unified schema. Define a temporary selection of unified schema objects to override the default selection. Does not affect your selection for future jobs. E.G. `{\"Vendors\":true}`"
                                    },
                                    "override_field_map": {
                                        "type": "object",
                                        "description": "Define a temporary field map to be used in the job, different from the configured field map."
                                    },
                                    "override_end_date": {
                                        "type": "string",
                                        "description": "Date to sync data until (e.g. 2022-08-08T00:00:00.000Z). Note that `end_date` is only supported for certain connectors.",
                                        "format": "date-time"
                                    },
                                    "override_source_config": {
                                        "type": "object",
                                        "description": "Override the source connector configuration for this job only. Does not affect the saved configuration."
                                    },
                                    "override_target_config": {
                                        "type": "object",
                                        "description": "Override the target connector configuration for this job only. Does not affect the saved configuration."
                                    },
                                    "ignore_parallel_jobs": {
                                        "type": "boolean",
                                        "description": "If true, the job will ignore restrictions on parallel job execution for this connector."
                                    },
                                    "queue_if_active_job": {
                                        "type": "boolean",
                                        "description": "If set to true, queues the job when another job is already running for the same tenant or flow. If omitted or set to false, the API returns an error when an active job blocks creation."
                                    },
                                    "environment_variables": {
                                        "type": "object",
                                        "description": "Override environment variables for the job execution. Does not affect saved configuration."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "job_id": "37g_DK",
                                            "env_id": "mydomain.hotglue.xyz",
                                            "flow_id": "l8odS2mce",
                                            "job_name": "l8odS2mce-chargebee-20220119-153011",
                                            "tenant": "12598713",
                                            "started_by": "12598713",
                                            "s3_root": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK",
                                            "start_time": "2022-01-19T15:30:11.731333+00:00",
                                            "state": {},
                                            "tap": "chargebee",
                                            "status": "JOB_CREATED",
                                            "scheduled_job": true,
                                            "message": "...",
                                            "last_updated": "2022-01-19T15:35:13.982380+00:00",
                                            "processed_rows": 0
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "job_id": {
                                            "type": "string",
                                            "example": "37g_DK"
                                        },
                                        "env_id": {
                                            "type": "string",
                                            "example": "mydomain.hotglue.xyz"
                                        },
                                        "flow_id": {
                                            "type": "string",
                                            "example": "l8odS2mce"
                                        },
                                        "job_name": {
                                            "type": "string",
                                            "example": "l8odS2mce-chargebee-20220119-153011"
                                        },
                                        "tenant": {
                                            "type": "string",
                                            "example": 12598713
                                        },
                                        "started_by": {
                                            "type": "string",
                                            "example": 12598713
                                        },
                                        "s3_root": {
                                            "type": "string",
                                            "example": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK"
                                        },
                                        "start_time": {
                                            "type": "string",
                                            "example": "2022-01-19T15:30:11.731333+00:00"
                                        },
                                        "state": {
                                            "type": "object",
                                            "properties": {}
                                        },
                                        "tap": {
                                            "type": "string",
                                            "example": "chargebee"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "JOB_CREATED",
                                            "enum": [
                                                "JOB_CREATED",
                                                "DISCOVER_STARTED",
                                                "DISCOVER_FAILED",
                                                "SYNC_STARTED",
                                                "SYNC_FAILED",
                                                "SYNC_SUCCESS",
                                                "ETL_STARTED",
                                                "ETL_FAILED",
                                                "ETL_SUCCESS",
                                                "EXPORT_STARTED",
                                                "EXPORT_FAILED",
                                                "JOB_COMPLETED"
                                              ]                                              
                                        },
                                        "scheduled_job": {
                                            "type": "boolean",
                                            "example": true,
                                            "default": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "..."
                                        },
                                        "last_updated": {
                                            "type": "string",
                                            "example": "2022-01-19T15:35:13.982380+00:00"
                                        },
                                        "processed_rows": {
                                            "type": "integer",
                                            "example": 0,
                                            "default": 0
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Job queued because another job is already running",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Queued Job": {
                                        "value": {
                                            "message": "Job has been queued. It will run when available",
                                            "reason": "There is a job currently running"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Job has been queued. It will run when available"
                                        },
                                        "reason": {
                                            "type": "string",
                                            "example": "There is a job currently running"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Fetch jobs",
                "description": "Returns a list of job details for a specified tenant. Note that this endpoint does not return raw data fetched in jobs.",
                "operationId": "jobs-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "count",
                        "in": "query",
                        "description": "Number of jobs to return (sorted chronologically)",
                        "schema": {
                            "type": "integer",
                            "format": "int32",
                            "default": 5
                        }
                    },
                    {
                        "name": "scheduled",
                        "in": "query",
                        "description": "Query for scheduled jobs only",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "job_type",
                        "in": "query",
                        "description": "For V2 flows, define whether you fetch \"read\" or \"write\" type jobs",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "read",
                                "write"
                            ]
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Pagination key used to fetch additional records. Defaults to page=1",
                        "schema": {
                            "type": "integer",
                            "format": "int32",
                            "default": 1
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Start date filter (ISO 8601 format)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "End date filter (ISO 8601 format)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "include_state",
                        "in": "query",
                        "description": "Include job state in response if true",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "include_export_details",
                        "in": "query",
                        "description": "Include export details in response if true",
                        "schema": {
                            "type": "boolean",
                            "default": true
                        }
                    },
                    {
                        "name": "ignore_empty_jobs",
                        "in": "query",
                        "description": "Ignore jobs with no records processed",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "sync_type",
                        "in": "query",
                        "description": "Type of sync",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "incremental_sync",
                                "auto_sync",
                                "full_sync",
                                "real_time_sync"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "job_id": "lmaEbA",
                                                "env_id": "dev.example-env.hotglue.xyz",
                                                "job_name": "test_job:_V-vgdlLN",
                                                "tenant": "default",
                                                "started_by": "default",
                                                "flow": "l8odS2mce",
                                                "s3_root": "default/flows/l8odS2mce/jobs/lmaEbA",
                                                "start_time": "2020-12-30T18:01:01.828266+00:00",
                                                "state": {},
                                                "tap": "quickbooks:sandbox",
                                                "status": "ETL_FAILED",
                                                "message": "ETL error...",
                                                "last_updated": "2020-12-30T20:31:00.081282+00:00"
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "job_id": {
                                                "type": "string",
                                                "example": "lmaEbA"
                                            },
                                            "env_id": {
                                                "type": "string",
                                                "example": "dev.example-env.hotglue.xyz"
                                            },
                                            "job_name": {
                                                "type": "string",
                                                "example": "test_job:_V-vgdlLN"
                                            },
                                            "tenant": {
                                                "type": "string",
                                                "example": "default"
                                            },
                                            "started_by": {
                                                "type": "string",
                                                "example": "default"
                                            },
                                            "flow": {
                                                "type": "string",
                                                "example": "l8odS2mce"
                                            },
                                            "s3_root": {
                                                "type": "string",
                                                "example": "default/flows/l8odS2mce/jobs/lmaEbA"
                                            },
                                            "start_time": {
                                                "type": "string",
                                                "example": "2020-12-30T18:01:01.828266+00:00"
                                            },
                                            "state": {
                                                "type": "object",
                                                "properties": {}
                                            },
                                            "tap": {
                                                "type": "string",
                                                "example": "quickbooks:sandbox"
                                            },
                                            "status": {
                                                "type": "string",
                                                "example": "ETL_FAILED",
                                                "enum": [
                                                    "JOB_CREATED",
                                                    "DISCOVER_STARTED",
                                                    "DISCOVER_FAILED",
                                                    "SYNC_STARTED",
                                                    "SYNC_FAILED",
                                                    "SYNC_SUCCESS",
                                                    "ETL_STARTED",
                                                    "ETL_FAILED",
                                                    "ETL_SUCCESS",
                                                    "EXPORT_STARTED",
                                                    "EXPORT_FAILED",
                                                    "JOB_COMPLETED"
                                                  ]
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "ETL error..."
                                            },
                                            "last_updated": {
                                                "type": "string",
                                                "example": "2020-12-30T20:31:00.081282+00:00"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/status": {
            "get": {
                "summary": "Poll job status",
                "description": "Check on the status of a job, using the `job_root` returned by your initial Run Job call. Read about the possible job statuses [here](/key-concepts/jobs/life-cycle).",
                "operationId": "jobs-status",
                "parameters": [
                    {
                        "name": "job_root",
                        "in": "query",
                        "description": "S3 root of this job",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "job_id": "lmaEbA",
                                            "env_id": "dev.example-env.hotglue.xyz",
                                            "job_name": "test_job:_V-vgdlLN",
                                            "tenant": "default",
                                            "started_by": "default",
                                            "flow": "l8odS2mce",
                                            "s3_root": "default/flows/l8odS2mce/jobs/lmaEbA",
                                            "start_time": "2020-12-30T18:01:01.828266+00:00",
                                            "state": {},
                                            "tap": "quickbooks:sandbox",
                                            "status": "ETL_FAILED",
                                            "message": "ETL error...",
                                            "last_updated": "2020-12-30T20:31:00.081282+00:00"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "job_id": {
                                            "type": "string",
                                            "example": "lmaEbA"
                                        },
                                        "env_id": {
                                            "type": "string",
                                            "example": "dev.example-env.hotglue.xyz"
                                        },
                                        "job_name": {
                                            "type": "string",
                                            "example": "test_job:_V-vgdlLN"
                                        },
                                        "tenant": {
                                            "type": "string",
                                            "example": "default"
                                        },
                                        "started_by": {
                                            "type": "string",
                                            "example": "default"
                                        },
                                        "flow": {
                                            "type": "string",
                                            "example": "l8odS2mce"
                                        },
                                        "s3_root": {
                                            "type": "string",
                                            "example": "default/flows/l8odS2mce/jobs/lmaEbA"
                                        },
                                        "start_time": {
                                            "type": "string",
                                            "example": "2020-12-30T18:01:01.828266+00:00"
                                        },
                                        "state": {
                                            "type": "object",
                                            "properties": {}
                                        },
                                        "tap": {
                                            "type": "string",
                                            "example": "quickbooks:sandbox"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "ETL_FAILED",
                                            "enum": [
                                                "JOB_CREATED",
                                                "DISCOVER_STARTED",
                                                "DISCOVER_FAILED",
                                                "SYNC_STARTED",
                                                "SYNC_FAILED",
                                                "SYNC_SUCCESS",
                                                "ETL_STARTED",
                                                "ETL_FAILED",
                                                "ETL_SUCCESS",
                                                "EXPORT_STARTED",
                                                "EXPORT_FAILED",
                                                "JOB_COMPLETED"
                                              ]                                              
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "ETL error..."
                                        },
                                        "last_updated": {
                                            "type": "string",
                                            "example": "2020-12-30T20:31:00.081282+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "Error",
                                            "Message": "Invalid job_root supplied - job does not exist!"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "Error"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Invalid job_root supplied - job does not exist!"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/schedule": {
            "put": {
                "summary": "Create jobs schedule",
                "description": "Create a new schedule for a tenant",
                "operationId": "jobs-schedule",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "schedule_expression"
                                ],
                                "properties": {
                                    "schedule_expression": {
                                        "type": "string",
                                        "description": "cron expression defining how often sync should occur e.g. `cron(0 0 * * *)`"
                                    },
                                    "job_type": {
                                        "type": "string",
                                        "description": "For v2 flows, defines the type of job. Accepts \"read\" or \"write.\"",
                                        "enum": [
                                            "read",
                                            "write"
                                        ]
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Whether this schedule should be DISABLED or ENABLED",
                                        "default": "ENABLED",
                                        "enum": [
                                            "DISABLED",
                                            "ENABLED"
                                        ]
                                    },
                                    "connector_id": {
                                        "type": "string",
                                        "description": "Optional specific connector or tap ID to set the schedule on"
                                    },
                                    "override_start_date": {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Optional override for the `start_date` that jobs will run with. This will ignore state bookmarks and any `start_date` in the config."
                                    },
                                    "override_selected_tables": {
                                        "type": "object",
                                        "description": "Override the unified schema selection for this schedule"
                                    },
                                    "override_field_map": {
                                        "type": "object",
                                        "description": "Override the field map selection for this schedule"
                                    },
                                    "environment_variables": {
                                        "type": "object",
                                        "description": "Set optional environment variables for the job to use (generally for use in the ETL)."
                                    },
                                    "schedule_jitter_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 720,
                                        "description": "Jitter window in minutes for default schedules. Only allowed when tenant is `default`; set to null to clear."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "BadRequestError",
                                            "Message": "Invalid cron expression!"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Invalid cron expression!"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Retrieve jobs schedule",
                "description": "Fetch the schedule for a tenant",
                "operationId": "jobs-schedule-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "job_type",
                        "in": "query",
                        "description": "Type of job to retrieve (Bidirectional flows only)",
                        "schema": {
                            "type": "string",
                            "enum": ["read", "write"],
                            "default": "read"
                        },
                        "required": false
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "ID of connector to retrieve. If not provided, flow level schedule will be returned.",
                        "schema": {
                            "type": "string"
                        },
                        "required": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "ScheduleExpression": "cron(0 0 ? * SUN *)",
                                            "State": "DISABLED",
                                            "ScheduleJitterMinutes": 60,
                                            "ExtraArgs": {
                                                "override_start_date": "2000-01-01"
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ScheduleExpression": {
                                            "type": "string",
                                            "example": "cron(0 0 ? * SUN *)"
                                        },
                                        "State": {
                                            "type": "string",
                                            "example": "DISABLED"
                                        },
                                        "ScheduleJitterMinutes": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "example": 60
                                        },
                                        "ExtraArgs": {
                                            "type": "object",
                                            "example": {
                                                "override_start_date": "2000-01-01"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete jobs schedule",
                "description": "Delete or disable a schedule for a tenant",
                "operationId": "delete-jobs-schedule",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "hard_delete",
                        "in": "query",
                        "description": "If `true`, permanently deletes the schedule when `tenant` is `default`. For any other tenant, the schedule is only disabled. If `false` or omitted, disables the schedule without deleting it.",
                        "schema": {
                            "type": "string"
                        },
                        "required": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/download": {
            "get": {
                "summary": "Trigger download",
                "description": "Jobs Download",
                "operationId": "jobs-download-trigger",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "job_id",
                        "in": "query",
                        "description": "ID of job",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "job_root",
                        "in": "query",
                        "description": "Job root path (listed as s3_root in job details)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "content",
                        "in": "query",
                        "description": "Comma separated list of what to include in download can include: `details,sync,etl,snapshot`",
                        "schema": {
                            "type": "string",
                            "default": "details,sync,etl,snapshot"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "task_id": "arn:aws:ecs:us-east-1:581362835603:task/hg-hotglue-qa/982f4a997c1b48ba99f98e666bcddb75"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "task_id": {
                                            "type": "string",
                                            "example": "arn:aws:ecs:us-east-1:581362835603:task/hg-hotglue-qa/982f4a997c1b48ba99f98e666bcddb75"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/rollback": {
            "post": {
                "summary": "Rollback job",
                "description": "Reset the the configuration to the state before a given job ran. This affects the `source state` (bookmarks) and the `snapshots`.",
                "operationId": "jobs-rollback",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "job_root",
                                    "tap",
                                    "job_id"
                                ],
                                "properties": {
                                    "job_root": {
                                        "type": "string",
                                        "description": "S3 root for job"
                                    },
                                    "tap": {
                                        "type": "string",
                                        "description": "ID of tap"
                                    },
                                    "job_id": {
                                        "type": "string",
                                        "description": "ID of job"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/linkedSources/state": {
            "get": {
                "summary": "Retrieve source state",
                "description": "Fetch the current bookmarks for your tenant's linked source",
                "operationId": "linked-sources-state-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "bookmarks": {
                                                "ProfitAndLoss": {
                                                    "modified_since": "2021-08-15T14:29:26+00:00"
                                                }
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "bookmarks": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "put": {
                "summary": "Set source state",
                "description": "Overwrite the source state with your own bookmarks to re-sync or ignore data",
                "operationId": "linked-sources-state-set",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap to update",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "object",
                                        "description": "State object containing bookmark timestamps"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete source state",
                "description": "Clearing the source state means that the next job will be a full sync",
                "operationId": "linked-sources-state-delete",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap to update",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/linkedSources/discover": {
            "get": {
                "summary": "Run Discover",
                "description": "Run a discover to generate a `catalog` of available tables and fields",
                "operationId": "linked-sources-catalog-discover",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap to discover",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/linkedSources/discover/poll": {
            "get": {
                "summary": "Poll Discover",
                "description": "Check the status of a running discover. If empty, no discover is currently running.",
                "operationId": "linked-sources-catalog-poll-discover",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tap_name",
                        "in": "query",
                        "description": "Name of tap to query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "RUNNING"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "RUNNING"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/linkedTargets": {
            "post": {
                "summary": "Link a target",
                "description": "Link one of your tenants to a target",
                "operationId": "linked-targets-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "target"
                                ],
                                "properties": {
                                    "target": {
                                        "type": "object",
                                        "description": "The target & settings info you wish to link",
                                        "required": [
                                            "target"
                                        ],
                                        "properties": {
                                            "target": {
                                                "type": "string",
                                                "description": "The name of the connector you want to link"
                                            },
                                            "symlink": {
                                                "type": "object",
                                                "description": "Symlink allows you to share credentials with an existing connection in another flow",
                                                "properties": {
                                                    "entity": {
                                                        "type": "string",
                                                        "description": "The name of the connector that is already linked"
                                                    },
                                                    "id": {
                                                        "type": "string",
                                                        "description": "The previously linked flow_id containing a user's credentials"
                                                    },
                                                    "tenant": {
                                                        "type": "string",
                                                        "description": "Optional. If using subtenants, the tenant id that has the linked connector."
                                                    }
                                                }
                                            },
                                            "config": {
                                                "type": "object",
                                                "description": "This JSON object holds credentials and flags to create a connection."
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Unlink a target",
                "description": "Clears the configuration for a tenant's linked target. This cannot be undone.",
                "operationId": "linked-targets-delete",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "target_name",
                        "in": "query",
                        "description": "Target name (ie. `s3`)",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Retrieve linked target",
                "description": "Fetch metadata about your tenant's linked target",
                "operationId": "linked-targets-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "target_name",
                        "in": "query",
                        "description": "Target name (ie. `s3`). If not included, all linked targets are returned",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "login_state",
                        "in": "query",
                        "description": "Pings to see if connection is active. Only possible for OAuth targets",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "config",
                        "in": "query",
                        "description": "Request the underlying config for the linked target",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "target": "s3",
                                                "domain": "aws.amazon.com",
                                                "label": "S3",
                                                "type": "api",
                                                "config": {}
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "patch": {
                "summary": "Update a linked target",
                "description": "Modify the config object on a linkedTarget",
                "operationId": "update-linked-targets",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "target"
                                ],
                                "properties": {
                                    "target": {
                                        "type": "string",
                                        "description": "Name of tap to update"
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "JSON object containing config values to update"
                                    },
                                    "delete_fields": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "required": false,
                                        "description": "List of configuration fields to delete"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jupyter": {
            "get": {
                "summary": "Retrieve",
                "description": "Linked Sources Jupyter",
                "operationId": "linked-sources-jupyter-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "task_arn",
                        "in": "query",
                        "description": "If provided, will return status for the corresponding Jupyter workspace",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "arn": "arn://abc",
                                                "status": "RUNNING",
                                                "startedAt": "2021-01-01",
                                                "url": "https://sample.myenv.hotglue.xyz/lab?token=abc",
                                                "env_id": "myenv.hotglue.xyz",
                                                "flow": "abc",
                                                "tap": "salesforce"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "post": {
                "summary": "Create",
                "description": "Linked Sources Jupyter",
                "operationId": "linked-sources-jupyter-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tap": {
                                        "type": "string",
                                        "description": "ID of tap to start Jupyter instance for"
                                    },
                                    "jupyter_token": {
                                        "type": "string",
                                        "description": "Jupyter token \u2013 protects your Jupyter session and will be required to connect"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "url": "https://sample.myenv.hotglue.xyz/lab",
                                            "task_arn": "arn://abc"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "example": "https://sample.myenv.hotglue.xyz/lab"
                                        },
                                        "task_arn": {
                                            "type": "string",
                                            "example": "arn://abc"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete",
                "description": "Linked Sources Jupyter",
                "operationId": "linked-sources-jupyter-delete",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "task_arn",
                        "in": "query",
                        "description": "ARN of Jupyter instance to deprovision",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenant/{env_id}/{tenant}/config": {
            "get": {
                "summary": "Get tenant config",
                "description": "Gets the `tenant-config.json` from snapshots",
                "operationId": "tenants-get-config",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "put": {
                "summary": "Set tenant config",
                "description": "Creates a `tenant-config.json` that you can use to store custom settings, credentials, and metadata",
                "operationId": "tenants-set-config",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "config": {
                                        "type": "object",
                                        "description": "The tenant config to save in hotglue. Can be any JSON object",
                                        "properties": {}
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "patch": {
                "summary": "Update tenant config",
                "description": "Update an existing tenant config",
                "operationId": "tenants-update-config",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "config": {
                                        "type": "object",
                                        "description": "The tenant config to save in hotglue. Can be any JSON object",
                                        "properties": {}
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/linkedTargets/discover": {
            "get": {
                "summary": "Run Discover",
                "description": "Run a discover for a linked target",
                "operationId": "linked-targets-catalog-discover",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "target_name",
                        "in": "query",
                        "description": "Name of target to discover",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/supportedSources": {
            "get": {
                "summary": "Supported sources",
                "description": "Returns all of the sources that are enabled in a particular flow",
                "operationId": "supported-sources-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "tap": "shopify",
                                                "tags": [
                                                    "ecommerce"
                                                ],
                                                "domain": "shopify.com",
                                                "label": "Shopify",
                                                "type": "api",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg",
                                                "auto_support": true,
                                                "connect_ui_params": {
                                                    "api_key": {
                                                        "label": "API Key",
                                                        "description": "Shopify API Key",
                                                        "type": "password"
                                                    },
                                                    "shop": {
                                                        "label": "Shop",
                                                        "description": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                    }
                                                },
                                                "config": {
                                                    "start_date": "2015-01-01T00:00:00.000Z"
                                                },
                                                "fieldMap": {
                                                    "shop": {
                                                        "name": "shop",
                                                        "selected": [
                                                            "id",
                                                            "name",
                                                            "domain"
                                                        ]
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "tap": {
                                                "type": "string",
                                                "example": "shopify"
                                            },
                                            "tags": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "ecommerce"
                                                }
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "shopify.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Shopify"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "api"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg"
                                            },
                                            "auto_support": {
                                                "type": "boolean",
                                                "example": true,
                                                "default": true
                                            },
                                            "connect_ui_params": {
                                                "type": "object",
                                                "properties": {
                                                    "api_key": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "API Key"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify API Key"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "password"
                                                            }
                                                        }
                                                    },
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "Shop"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "config": {
                                                "type": "object",
                                                "properties": {
                                                    "start_date": {
                                                        "type": "string",
                                                        "example": "2015-01-01T00:00:00.000Z"
                                                    }
                                                }
                                            },
                                            "fieldMap": {
                                                "type": "object",
                                                "properties": {
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "example": "shop"
                                                            },
                                                            "selected": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string",
                                                                    "example": "id"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/supportedTargets": {
            "get": {
                "summary": "Supported targets",
                "description": "Returns all of the targets that are enabled in a particular flow",
                "operationId": "supported-targets-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "target": "mssql",
                                                "flowType": "all",
                                                "domain": "microsoft.com",
                                                "label": "Microsoft SQL",
                                                "type": "api",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/mssql.svg",
                                                "validation_supported": true,
                                                "connect_ui_params": {
                                                    "host": {
                                                        "label": "Host Name",
                                                        "description": "Your SQL server host"
                                                    },
                                                    "port": {
                                                        "label": "Port",
                                                        "description": "Your SQL server port"
                                                    },
                                                    "database": {
                                                        "label": "Database",
                                                        "description": "Your SQL database name"
                                                    },
                                                    "user": {
                                                        "label": "User",
                                                        "description": "Your SQL user"
                                                    },
                                                    "password": {
                                                        "label": "Password",
                                                        "description": "Your SQL password",
                                                        "type": "password"
                                                    }
                                                },
                                                "connector_props": {
                                                    "singer_sdk": true
                                                },
                                                "install_uri": "git+https://github.com/hotgluexyz/target-mssql.git@hgi-6830",
                                                "isForked": true
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "target": {
                                                "type": "string",
                                                "example": "shopify"
                                            },
                                            "tags": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "ecommerce"
                                                }
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "shopify.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Shopify"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "api"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg"
                                            },
                                            "auto_support": {
                                                "type": "boolean",
                                                "example": true,
                                                "default": true
                                            },
                                            "connect_ui_params": {
                                                "type": "object",
                                                "properties": {
                                                    "api_key": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "API Key"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify API Key"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "password"
                                                            }
                                                        }
                                                    },
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "Shop"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "config": {
                                                "type": "object",
                                                "properties": {
                                                    "start_date": {
                                                        "type": "string",
                                                        "example": "2015-01-01T00:00:00.000Z"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/kill": {
            "post": {
                "summary": "Kill job",
                "description": "End any running processes for a job",
                "operationId": "jobs-kill-post",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "job_root"
                                ],
                                "properties": {
                                    "job_root": {
                                        "type": "string",
                                        "description": "S3 root of this job"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for killing this job"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/availableSources": {
            "get": {
                "summary": "Available sources",
                "description": "Returns details for every source that you can enable in your environment",
                "operationId": "available-sources-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "tap": "shopify",
                                                "tags": [
                                                    "ecommerce"
                                                ],
                                                "domain": "shopify.com",
                                                "label": "Shopify",
                                                "type": "api",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg",
                                                "auto_support": true,
                                                "connect_ui_params": {
                                                    "api_key": {
                                                        "label": "API Key",
                                                        "description": "Shopify API Key",
                                                        "type": "password"
                                                    },
                                                    "shop": {
                                                        "label": "Shop",
                                                        "description": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                    }
                                                },
                                                "config": {
                                                    "start_date": "2015-01-01T00:00:00.000Z"
                                                },
                                                "fieldMap": {
                                                    "shop": {
                                                        "name": "shop",
                                                        "selected": [
                                                            "id",
                                                            "name",
                                                            "domain"
                                                        ]
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "tap": {
                                                "type": "string",
                                                "example": "shopify"
                                            },
                                            "tags": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "ecommerce"
                                                }
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "shopify.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Shopify"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "api"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg"
                                            },
                                            "auto_support": {
                                                "type": "boolean",
                                                "example": true,
                                                "default": true
                                            },
                                            "connect_ui_params": {
                                                "type": "object",
                                                "properties": {
                                                    "api_key": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "API Key"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify API Key"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "password"
                                                            }
                                                        }
                                                    },
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "Shop"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "config": {
                                                "type": "object",
                                                "properties": {
                                                    "start_date": {
                                                        "type": "string",
                                                        "example": "2015-01-01T00:00:00.000Z"
                                                    }
                                                }
                                            },
                                            "fieldMap": {
                                                "type": "object",
                                                "properties": {
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "example": "shop"
                                                            },
                                                            "selected": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string",
                                                                    "example": "id"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/availableTargets": {
            "get": {
                "summary": "Available targets",
                "description": "Returns details for every target that you can enable in your environment",
                "operationId": "available-targets-retrieve",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "target": "s3",
                                                "flowType": "all",
                                                "domain": "aws.amazon.com",
                                                "label": "AWS S3",
                                                "type": "iam",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/s3.svg",
                                                "connect_ui_params": {
                                                    "aws_access_key_id": {
                                                        "label": "AWS Access Key Id",
                                                        "description": "Access Key Id for IAM role"
                                                    },
                                                    "aws_secret_access_key": {
                                                        "label": "AWS Secret Access Key",
                                                        "description": "Secret Access Key for IAM Role",
                                                        "type": "password"
                                                    },
                                                    "bucket": {
                                                        "label": "Bucket Name",
                                                        "description": "Which S3 bucket do you want to use?"
                                                    },
                                                    "path_prefix": {
                                                        "label": "Bucket Path Prefix",
                                                        "description": "Where should output files go?"
                                                    },
                                                    "acl": {
                                                        "label": "ACL",
                                                        "description": "ACL to use for uploaded objects (optional)",
                                                        "required": false
                                                    },
                                                    "sse": {
                                                        "label": "Server Side Encryption",
                                                        "type": "boolean",
                                                        "description": "Toggle S3 SSE encryption (AES256)",
                                                        "required": false
                                                    }
                                                }
                                            },
                                            {
                                                "target": "mailgun",
                                                "flowType": "all",
                                                "domain": "mailgun.com",
                                                "label": "Mailgun",
                                                "type": "api",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/mailgun.svg",
                                                "connect_ui_params": {
                                                    "api_key": {
                                                        "label": "API Key",
                                                        "description": "Mailgun API Key",
                                                        "type": "password"
                                                    },
                                                    "domain": {
                                                        "label": "Domain",
                                                        "description": "Mailgun Domain"
                                                    },
                                                    "email": {
                                                        "label": "Email",
                                                        "description": "Email to send data to"
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "target": {
                                                "type": "string",
                                                "example": "shopify"
                                            },
                                            "tags": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "example": "ecommerce"
                                                }
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "shopify.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Shopify"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "api"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/shopify.svg"
                                            },
                                            "auto_support": {
                                                "type": "boolean",
                                                "example": true,
                                                "default": true
                                            },
                                            "connect_ui_params": {
                                                "type": "object",
                                                "properties": {
                                                    "api_key": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "API Key"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify API Key"
                                                            },
                                                            "type": {
                                                                "type": "string",
                                                                "example": "password"
                                                            }
                                                        }
                                                    },
                                                    "shop": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string",
                                                                "example": "Shop"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "Shopify shop name (ie. the value test_shop in the string https://test_shop.myshopify.com)"
                                                            }
                                                        }
                                                    }
                                                }
                                            },
                                            "config": {
                                                "type": "object",
                                                "properties": {
                                                    "start_date": {
                                                        "type": "string",
                                                        "example": "2015-01-01T00:00:00.000Z"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/jobs/zip": {
            "get": {
                "summary": "Fetch job zip",
                "description": "Jobs Download",
                "operationId": "jobs-download-zip",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "job_id",
                        "in": "query",
                        "description": "ID of job",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "url": "https://s3.amazonaws.com/dev.hotglue.acme.com/test-user/flows/nqxrc9BvY/jobs/no5jh.zip"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "example": "https://s3.amazonaws.com/dev.hotglue.acme.com/test-user/flows/nqxrc9BvY/jobs/no5jh.zip"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/jobs": {
            "get": {
                "summary": "Advanced Job Query",
                "description": "Lists jobs across the environment",
                "operationId": "advanced-job-query",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "Your environment, e.g. dev.hotglue.testcompany.com",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "count",
                        "in": "query",
                        "description": "The number of jobs to return, from 1-100.",
                        "schema": {
                            "type": "integer",
                            "format": "int32",
                            "default": 5
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Used to paginate the list of jobs",
                        "schema": {
                            "type": "integer",
                            "format": "int32",
                            "default": 1
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "description": "A valid job status to filter on. Can also support multiple comma-separated statuses.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "JOB_CREATED",
                                "DISCOVER_STARTED",
                                "DISCOVER_FAILED",
                                "SYNC_STARTED",
                                "SYNC_FAILED",
                                "SYNC_SUCCESS",
                                "ETL_STARTED",
                                "ETL_FAILED",
                                "ETL_SUCCESS",
                                "EXPORT_STARTED",
                                "EXPORT_FAILED",
                                "JOB_COMPLETED"
                              ]                              
                        }
                    },
                    {
                        "name": "taps",
                        "in": "query",
                        "description": "One or more taps to filter on. Multiple taps must be comma-separated.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "targets",
                        "in": "query",
                        "description": "One or more targets to filter on. Multiple targets must be comma-separated.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "description": "A date range to start the query from. Format: `YYYY-MM-DD`",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "A date range to end the query with. Format: `YYYY-MM-DD`",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "tenant",
                        "in": "query",
                        "description": "Filter jobs to a specific tenant.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_export_details",
                        "in": "query",
                        "description": "If false, omits export details from each job in the response.",
                        "schema": {
                            "type": "boolean",
                            "default": true
                        }
                    },
                    {
                        "name": "sync_type",
                        "in": "query",
                        "description": "Filter jobs by sync type.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "incremental_sync",
                                "auto_sync",
                                "full_sync",
                                "real_time_sync"
                            ]
                        }
                    },
                    {
                        "name": "ignore_empty_jobs",
                        "in": "query",
                        "description": "If true, excludes jobs that processed no records.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant_id}/jobs/schedule": {
            "put": {
                "summary": "Create jobs schedule",
                "description": "Create a new schedule for a tenant",
                "operationId": "create-jobs-schedule-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant_id",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "schedule_expression"
                                ],
                                "properties": {
                                    "job_type": {
                                        "type": "string",
                                        "description": "The type of job within the v2 flow to manipulate. Accepts \"read\" or \"write.\"",
                                        "enum": [
                                            "read",
                                            "write"
                                        ]
                                    },
                                    "schedule_expression": {
                                        "type": "string",
                                        "description": "cron expression defining how often sync should occur e.g. `cron(0 0 * * *)`"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "Whether this schedule should be DISABLED or ENABLED",
                                        "default": "ENABLED",
                                        "enum": [
                                            "DISABLED",
                                            "ENABLED"
                                        ]
                                    },
                                    "schedule_jitter_minutes": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 720,
                                        "description": "Jitter window in minutes for default schedules. Only allowed when tenant is `default`; set to null to clear."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "ScheduleExpression": "cron(0 0 ? * SUN *)",
                                            "State": "DISABLED",
                                            "ScheduleJitterMinutes": 60
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ScheduleExpression": {
                                            "type": "string",
                                            "example": "cron(0 0 ? * SUN *)"
                                        },
                                        "State": {
                                            "type": "string",
                                            "example": "DISABLED"
                                        },
                                        "ScheduleJitterMinutes": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "example": 60
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Retrieve jobs schedule",
                "description": "Fetch the schedules set for a tenant",
                "operationId": "jobs-schedule-retrieve-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant_id",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "job_type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "read",
                                "write"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete jobs schedule",
                "description": "Fetch the schedules set for a tenant",
                "operationId": "jobs-schedule-delete-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant_id",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "job_type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "read",
                                "write"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
                "/tenant/{env_id}/{tenant}/mapping": {
            "get": {
                "summary": "Get tenant mapping",
                "description": "Gets the mapping object from the `tenant-config.json`, if present",
                "operationId": "tenants-get-mapping",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "put": {
                "summary": "Set tenant mapping",
                "description": "Adds a mapping object to the `tenant-config.json`.",
                "operationId": "tenants-set-mapping",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "config": {
                                        "type": "object",
                                        "required": [
                                            "mapping"
                                        ],
                                        "properties": {
                                            "mapping": {
                                                "type": "object",
                                                "title": "Flow mappings",
                                                "description": "Map of Flow ID → Table mappings",
                                                "propertyNames": {
                                                    "type": "string",
                                                    "description": "Flow ID (e.g., FElWoODnU)"
                                                },
                                                "additionalProperties": {
                                                    "type": "object",
                                                    "title": "Table mappings",
                                                    "description": "Map of \"InternalTable/RemoteTable\" → Field mappings",
                                                    "propertyNames": {
                                                        "type": "string",
                                                        "description": "\"InternalTable/RemoteTable\" pair (e.g., Leads/Contact)",
                                                        "pattern": "^[^/]+/[^/]+$"
                                                    },
                                                    "additionalProperties": {
                                                        "type": "object",
                                                        "title": "Field mappings",
                                                        "description": "Map of internal field → remote field name",
                                                        "propertyNames": {
                                                            "type": "string",
                                                            "description": "Internal field name (e.g., interest)",
                                                            "minLength": 1
                                                        },
                                                        "additionalProperties": {
                                                            "type": "string",
                                                            "description": "Remote field name (e.g., LastName)",
                                                            "minLength": 1
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "entityType": {
                                        "type": "string",
                                        "description": "Optional. Use `taps` for one-way flows, and `connectors` for bi-directional flows.",
                                        "enum": [
                                            "taps",
                                            "connectors"
                                        ]
                                    },
                                    "entityId": {
                                        "type": "string",
                                        "description": "Optional. Identifier for the tap/connector (e.g., \"salesforce\")."
                                    },
                                    "flow": {
                                        "type": "string",
                                        "description": "Optional. Flow ID that this operation pertains to."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/tenant/{env_id}/{tenant}/metadata": {
            "put": {
                "summary": "Set tenant metadata",
                "description": "Add metadata to your [Tenant Metadata](/key-concepts/tenants/metadata) object",
                "operationId": "set-tenant-metadata",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "config": {
                                        "type": "object",
                                        "description": "The tenant config to save in hotglue.",
                                        "properties": {
                                            "metadata": {
                                                "type": "object",
                                                "description": "The tenant metadata to save in hotglue. Can be any JSON object",
                                                "properties": {}
                                            }
                                        },
                                        "required": [
                                            "metadata"
                                        ]
                                    }
                                },
                                "required": [
                                    "config"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "get": {
                "summary": "Fetch tenant metadata",
                "description": "Fetch the metadata object from your tenant",
                "operationId": "get-tenant-metadata",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/availableConnectors": {
            "get": {
                "summary": "Retrieve available connectors",
                "description": "Returns details for every connector that you can enable in your environment",
                "operationId": "retrieve-available-connectors",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": []
                                    }
                                },
                                "schema": {
                                    "type": "array"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/supportedConnectors": {
            "get": {
                "summary": "Retrieve supported connectors",
                "description": "Returns details for connectors that have been enabled in a given flow",
                "operationId": "retrieve-supported-connectors",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": []
                                    }
                                },
                                "schema": {
                                    "type": "array"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedConnectors": {
            "get": {
                "summary": "Retrieve linked connector",
                "description": "Fetch the configuration details for a linked connector",
                "operationId": "retrieve-copy",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "config",
                        "in": "query",
                        "description": "Request the underlying config for the linked source",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "description": "JWT token generated with your private signing key.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "tap": "asana",
                                                "domain": "asana.com",
                                                "label": "Asana",
                                                "tap_url": "https://app.asana.com/-/oauth_authorize?response_type=code&client_id=*********",
                                                "auth_url": "https://app.asana.com/-/oauth_token",
                                                "icon": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/asana.svg",
                                                "type": "oauth",
                                                "client_id": "**********",
                                                "fieldMap": {
                                                    "tasks": {
                                                        "name": "tasks",
                                                        "selected": [
                                                            "gid",
                                                            "modified_at",
                                                            "resource_type",
                                                            "name",
                                                            "approval_status",
                                                            "assignee_status",
                                                            "completed",
                                                            "completed_at",
                                                            "completed_by",
                                                            "created_at",
                                                            "dependencies",
                                                            "dependents",
                                                            "due_at",
                                                            "due_on",
                                                            "external",
                                                            "hearted",
                                                            "hearts",
                                                            "html_notes",
                                                            "is_rendered_as_seperator",
                                                            "liked",
                                                            "likes",
                                                            "memberships",
                                                            "notes",
                                                            "num_hearts",
                                                            "num_likes",
                                                            "num_subtasks",
                                                            "resource_subtype",
                                                            "start_on",
                                                            "assignee",
                                                            "custom_fields",
                                                            "followers",
                                                            "parent",
                                                            "permalink_url",
                                                            "projects",
                                                            "tags",
                                                            "workspace"
                                                        ]
                                                    }
                                                }
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "tap": {
                                                "type": "string",
                                                "example": "asana"
                                            },
                                            "domain": {
                                                "type": "string",
                                                "example": "asana.com"
                                            },
                                            "label": {
                                                "type": "string",
                                                "example": "Asana"
                                            },
                                            "tap_url": {
                                                "type": "string",
                                                "example": "https://app.asana.com/-/oauth_authorize?response_type=code&client_id=*********"
                                            },
                                            "auth_url": {
                                                "type": "string",
                                                "example": "https://app.asana.com/-/oauth_token"
                                            },
                                            "icon": {
                                                "type": "string",
                                                "example": "https://s3.amazonaws.com/cdn.hotglue.xyz/images/logos/asana.svg"
                                            },
                                            "type": {
                                                "type": "string",
                                                "example": "oauth"
                                            },
                                            "client_id": {
                                                "type": "string",
                                                "example": "**********"
                                            },
                                            "fieldMap": {
                                                "type": "object",
                                                "properties": {
                                                    "tasks": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "example": "tasks"
                                                            },
                                                            "selected": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string",
                                                                    "example": "gid"
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "post": {
                "summary": "Link a connector",
                "description": "Create a new connection for your tenant, along with an optional schedule and field map, without using the embedded widget.",
                "operationId": "linked-connectors-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "connector"
                                ],
                                "properties": {
                                    "connector": {
                                        "type": "object",
                                        "description": "Connector",
                                        "required": [
                                            "id"
                                        ],
                                        "properties": {
                                            "id": {
                                                "type": "string",
                                                "description": "The ID of your connector. You can fetch this from your available or supported connectors"
                                            },
                                            "config": {
                                                "type": "object",
                                                "description": "The config object holds key-value pairs with credentials and flags for your connector. These are shared for imports and exports."
                                            },
                                            "symlink": {
                                                "type": "object",
                                                "description": "Symlink allows you to share credentials with a connection from another flow or subtenant",
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "description": "The previously linked flow_id containing a user's credentials"
                                                    },
                                                    "tenant": {
                                                        "type": "string",
                                                        "description": "Optional. If using subtenants, the tenant id that has the linked connector in the same flow."
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "Optional. If symlinking from a target flow, pass `target`. Can be left empty for source flows or bidirectional flows.",
                                                            "enum": [
                                                                "target"
                                                            ]
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "schedule": {
                                        "type": "object",
                                        "description": "The schedule expression to sync on",
                                        "properties": {
                                            "schedule_expression": {
                                                "type": "string",
                                                "description": "CRON expression to set or update the schedule"
                                            },
                                            "state": {
                                                "type": "string",
                                                "enum": [
                                                    "\"ENABLED\"",
                                                    "\"DISABLED"
                                                ]
                                            }
                                        }
                                    },
                                    "field_map": {
                                        "type": "object",
                                        "description": "The field map to use (if not provided, will use default)"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Unlink connector",
                "description": "Clear the credentials and configuration for a tenant's linked integration. This cannot be undone.",
                "operationId": "delete-copy",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "The ID of the connector to unlink",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "patch": {
                "summary": "Update linked connectors",
                "description": "Modify the field map or change the config for a linked connector",
                "operationId": "update-linked-connectors",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "connector_id"
                                ],
                                "properties": {
                                    "connector_id": {
                                        "type": "string",
                                        "description": "Name of connector to update"
                                    },
                                    "field_map": {
                                        "type": "object",
                                        "description": "JSON object representing all fields to pull"
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "JSON object containing config values to update"
                                    },
                                    "delete_fields": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "required": false,
                                        "description": "List of configuration fields to delete"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedTargets": {
            "patch": {
                "summary": "Update linked target",
                "description": "Update a linked target",
                "operationId": "linked-targets-update",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_id": {
                                        "type": "string",
                                        "description": "ID of the target to link"
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "Configuration for the target"
                                    },
                                    "delete_fields": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "required": false,
                                        "description": "List of configuration fields to delete"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "summary": "Get linked targets",
                "description": "Returns the targets linked by a user_id in this env_id",
                "operationId": "linked-targets-get-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "target_name",
                        "in": "query",
                        "description": "Name of the specific target to check",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "description": "JWT token for authentication",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "login_state",
                        "in": "query",
                        "description": "Request the login state for the linked target",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "config",
                        "in": "query",
                        "description": "Request the underlying config for the linked target",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": []
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {}
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Unlink a target",
                "description": "Permanently delete your tenant's linked target connection. This will revoke OAuth credentials and remove the target configuration. This cannot be undone.",
                "operationId": "linked-targets-delete-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "target_id",
                        "in": "query",
                        "description": "ID of the target to unlink",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "ok",
                                            "message": "The target target_id was unlinked successfully."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The target target_id was unlinked successfully."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedSources": {
            "get": {
                "summary": "Get linked sources",
                "description": "Get a linked source's configuration, catalog, secrets, and trigger mapping for a V2 flow",
                "operationId": "linked-sources-get-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "config",
                        "in": "query",
                        "description": "Request the underlying config for the linked source",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "catalog",
                        "in": "query",
                        "description": "Request the catalog of available fields/data to be returned in the payload",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "secret",
                        "in": "query",
                        "description": "Request the secret configuration for the linked source",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "triggerMapping",
                        "in": "query",
                        "description": "Request the trigger mapping configuration for the linked source",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": [
                                            {
                                                "source_id": "asana",
                                                "config": {},
                                                "catalog": {},
                                                "secret": {},
                                                "trigger_mapping": {}
                                            }
                                        ]
                                    }
                                },
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "source_id": {
                                                "type": "string",
                                                "description": "ID of the linked source"
                                            },
                                            "config": {
                                                "type": "object",
                                                "description": "Configuration object for the source"
                                            },
                                            "catalog": {
                                                "type": "object",
                                                "description": "Catalog of available fields and data"
                                            },
                                            "secret": {
                                                "type": "object",
                                                "description": "Secret configuration for the source"
                                            },
                                            "trigger_mapping": {
                                                "type": "object",
                                                "description": "Trigger mapping configuration"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "patch": {
                "summary": "Update linked source",
                "description": "Update a linked source",
                "operationId": "linked-sources-create",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "source_id": {
                                        "type": "string",
                                        "description": "ID of the source to link"
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "Configuration for the source"
                                    },
                                    "delete_fields": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "required": false,
                                        "description": "List of configuration fields to delete"
                                    }
                                },
                                "required": [
                                    "source_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Unlink a source",
                "description": "Permanently delete your tenant's linked source connection. This will revoke OAuth credentials and remove the source configuration. This cannot be undone.",
                "operationId": "linked-sources-delete-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "source_id",
                        "in": "query",
                        "description": "ID of the source to unlink",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "ok",
                                            "message": "The source source_id was unlinked successfully."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "The source source_id was unlinked successfully."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/jobs": {
            "post": {
                "summary": "Run a V2 Job",
                "description": "Kicks off a job for a given tenant. Can be used to write data in target flows by passing a payload in the state object. When `queue_if_active_job` is set to true in the request body, hotglue queues the job if another job is already running for the same tenant or flow.",
                "operationId": "jobs-create-v2",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "connector_id",
                                    "job_type"
                                ],
                                "properties": {
                                    "connector_id": {
                                        "type": "string",
                                        "description": "The ID of the connector to run a job for. Note that in V2 flows, you do not pass a tap or target"
                                    },
                                    "job_type": {
                                        "type": "string",
                                        "description": "The schedule expression to sync on",
                                        "enum": [
                                            "read",
                                            "write"
                                        ]
                                    },
                                    "job_name": {
                                        "type": "string",
                                        "description": "Name for job. If not provided, name is autogenerated"
                                    },
                                    "override_start_date": {
                                        "type": "string",
                                        "description": "Date to start syncing data from (e.g. 2022-08-08T00:00:00.000Z)",
                                        "format": "date"
                                    },
                                    "override_end_date": {
                                        "type": "string",
                                        "description": "Date to sync data until. Only supported on some connectors. (e.g. 2022-08-10T00:00:00.000Z)",
                                        "format": "date"
                                    },
                                    "reset_source_state": {
                                        "type": "boolean",
                                        "description": "Runs the job as a \"full_sync\" by clearing the `state` on the linkedSource"
                                    },
                                    "override_selected_tables": {
                                        "type": "object",
                                        "description": "For use with the unified schema. Define a temporary selection of unified schema objects to override the default selection. Does not affect your selection for future jobs. E.G. `{\"Vendors\":true}`"
                                    },
                                    "override_source_config": {
                                        "type": "object",
                                        "description": "Override the source connector configuration for this job only. Does not affect the saved configuration."
                                    },
                                    "override_target_config": {
                                        "type": "object",
                                        "description": "Override the target connector configuration for this job only. Does not affect the saved configuration."
                                    },
                                    "override_connector_config": {
                                        "type": "object",
                                        "description": "Override the bidirectional connector-level configuration for this job only."
                                    },
                                    "override_field_map": {
                                        "type": "object",
                                        "description": "Define a temporary field map to be used in the job, different from the configured field map."
                                    },
                                    "environment_variables": {
                                        "type": "object",
                                        "description": "Override environment variables for the job execution."
                                    },
                                    "state": {
                                        "type": "object",
                                        "description": "Optional extra context to be used by the job. Often used for write jobs. Note that this is different from the source state."
                                    },
                                    "streaming_job": {
                                        "type": "boolean",
                                        "description": "If true, the job will run in streaming mode and skip the ETL step. This feature is in beta."
                                    },
                                    "ignore_parallel_jobs": {
                                        "type": "boolean",
                                        "description": "If true, the job will ignore restrictions on parallel job execution for this connector."
                                    },
                                    "queue_if_active_job": {
                                        "type": "boolean",
                                        "description": "If set to true, queues the job when another job is already running for the same tenant or flow. If omitted or set to false, the API returns an error when an active job blocks creation."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "job_id": "37g_DK",
                                            "env_id": "mydomain.hotglue.xyz",
                                            "flow_id": "l8odS2mce",
                                            "job_name": "l8odS2mce-chargebee-20220119-153011",
                                            "tenant": "12598713",
                                            "started_by": "12598713",
                                            "s3_root": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK",
                                            "start_time": "2022-01-19T15:30:11.731333+00:00",
                                            "state": {},
                                            "tap": "chargebee",
                                            "status": "JOB_CREATED",
                                            "scheduled_job": true,
                                            "message": "...",
                                            "last_updated": "2022-01-19T15:35:13.982380+00:00",
                                            "processed_rows": 0
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "job_id": {
                                            "type": "string",
                                            "example": "37g_DK"
                                        },
                                        "env_id": {
                                            "type": "string",
                                            "example": "mydomain.hotglue.xyz"
                                        },
                                        "flow_id": {
                                            "type": "string",
                                            "example": "l8odS2mce"
                                        },
                                        "job_name": {
                                            "type": "string",
                                            "example": "l8odS2mce-chargebee-20220119-153011"
                                        },
                                        "tenant": {
                                            "type": "string",
                                            "example": 12598713
                                        },
                                        "started_by": {
                                            "type": "string",
                                            "example": 12598713
                                        },
                                        "s3_root": {
                                            "type": "string",
                                            "example": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK"
                                        },
                                        "start_time": {
                                            "type": "string",
                                            "example": "2022-01-19T15:30:11.731333+00:00"
                                        },
                                        "state": {
                                            "type": "object",
                                            "properties": {}
                                        },
                                        "tap": {
                                            "type": "string",
                                            "example": "chargebee"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "JOB_CREATED",
                                            "enum": [
                                                "JOB_CREATED",
                                                "DISCOVER_STARTED",
                                                "DISCOVER_FAILED",
                                                "SYNC_STARTED",
                                                "SYNC_FAILED",
                                                "SYNC_SUCCESS",
                                                "ETL_STARTED",
                                                "ETL_FAILED",
                                                "ETL_SUCCESS",
                                                "EXPORT_STARTED",
                                                "EXPORT_FAILED",
                                                "JOB_COMPLETED"
                                              ]                                              
                                        },
                                        "scheduled_job": {
                                            "type": "boolean",
                                            "example": true,
                                            "default": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "..."
                                        },
                                        "last_updated": {
                                            "type": "string",
                                            "example": "2022-01-19T15:35:13.982380+00:00"
                                        },
                                        "processed_rows": {
                                            "type": "integer",
                                            "example": 0,
                                            "default": 0
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Job queued because another job is already running",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Queued Job": {
                                        "value": {
                                            "message": "Job has been queued. It will run when available",
                                            "reason": "There is a job currently running"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Job has been queued. It will run when available"
                                        },
                                        "reason": {
                                            "type": "string",
                                            "example": "There is a job currently running"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/discover": {
            "get": {
                "summary": "Run Discover",
                "description": "Run a discover to generate a `catalog` of available tables and fields",
                "operationId": "linked-connectors-catalog-discover",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "ID of connector",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "v2_source",
                        "in": "query",
                        "description": "Whether this connector is a v2 source",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200"
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/discover/poll": {
            "get": {
                "summary": "Poll Discover",
                "description": "Check the status of a running discover. If empty, no discover is currently running.",
                "operationId": "linked-connectors-catalog-poll-discover",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "ID of connector",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "RUNNING"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "example": "RUNNING"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/v2/{env_id}/{flow_id}/{tenant}/linkedConnectors/state": {
            "get": {
                "summary": "Retrieve connector state",
                "description": "Fetch the current bookmarks for your tenant's linked connector",
                "operationId": "retrieve-connector-state",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "Name of connector",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "bookmarks": {
                                                "ProfitAndLoss": {
                                                    "modified_since": "2021-08-15T14:29:26+00:00"
                                                }
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "bookmarks": {
                                            "type": "object"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "put": {
                "summary": "Set connector state",
                "description": "Overwrite the connector state with your own bookmarks to re-sync or ignore data",
                "operationId": "set-connector-state",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "Name of connector to update",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "state": {
                                        "type": "object",
                                        "description": "State object containing bookmark timestamps"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete connector state",
                "description": "Clearing the connector state means that the next job will be a full sync",
                "operationId": "delete-connector-state",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "query",
                        "description": "Name of connector to update",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {}
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/magicLink": {
            "post": {
                "summary": "Create a Magic Link",
                "description": "Create a Magic Link to allow tenants to link an integration.",
                "operationId": "create-magic-link",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tenant": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "flow": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "entityId": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "expiresAt": {
                                        "type": "string",
                                        "format": "date-time",
                                        "nullable": true,
                                        "description": "Optional expiration timestamp for the Magic Link."
                                    },
                                    "options": {
                                        "type": "object",
                                        "additionalProperties": true
                                    }
                                },
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Magic Link created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "expiresAt": {
                                            "type": "string",
                                            "format": "date-time",
                                            "nullable": true
                                        }
                                    },
                                    "additionalProperties": true
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{env_id}/{flow_id}/{tenant}/connectors/status": {
            "get": {
                "summary": "Poll write request",
                "description": "If a real-time write request returns async: true, you can use this endpoint to get the result of the request.",
                "operationId": "connector-status",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "taskId",
                        "in": "query",
                        "description": "Task ID of the real-time write request.",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "has_data": true,
                                            "result": {
                                                "async": false,
                                                "jobId": "UvzWy0",
                                                "taskId": "3cecd80d-b377-4566-9d8c-e1e870b887ab",
                                                "state": {
                                                    "bookmarks": {
                                                        "Contact": [
                                                            {
                                                                "hash": "07f9838d07fca662ce396d1cce9db0893eb3ffee4290ffc20d992a8fde333e2e",
                                                                "success": false,
                                                                "error": "[{\"message\":\"No such column 'EmailAddress' on sobject of type Contact\",\"errorCode\":\"INVALID_FIELD\"}]"
                                                            }
                                                        ]
                                                    },
                                                    "summary": {
                                                        "Contact": {
                                                            "success": 0,
                                                            "fail": 1,
                                                            "existing": 0,
                                                            "updated": 0
                                                        }
                                                    }
                                                },
                                                "status_code": 200
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "has_data": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Indicates whether the response contains data"
                                        },
                                        "result": {
                                            "type": "object",
                                            "properties": {
                                                "async": {
                                                    "type": "boolean",
                                                    "example": false,
                                                    "description": "Indicates whether the job is asynchronous"
                                                },
                                                "jobId": {
                                                    "type": "string",
                                                    "example": "UvzWy0",
                                                    "description": "A unique job identifier"
                                                },
                                                "taskId": {
                                                    "type": "string",
                                                    "format": "uuid",
                                                    "example": "3cecd80d-b377-4566-9d8c-e1e870b887ab",
                                                    "description": "A unique task identifier"
                                                },
                                                "state": {
                                                    "type": "object",
                                                    "properties": {
                                                        "bookmarks": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "hash": {
                                                                            "type": "string",
                                                                            "example": "07f9838d07fca662ce396d1cce9db0893eb3ffee4290ffc20d992a8fde333e2e"
                                                                        },
                                                                        "success": {
                                                                            "type": "boolean",
                                                                            "example": false
                                                                        },
                                                                        "id": {
                                                                            "type": "string",
                                                                            "example": "003Kc00000AnofgIAB"
                                                                        },
                                                                        "error": {
                                                                            "type": "string",
                                                                            "example": "[{\"message\":\"No such column 'EmailAddress' on sobject of type Contact\",\"errorCode\":\"INVALID_FIELD\"}]"
                                                                        }
                                                                    }
                                                                }
                                                            },
                                                            "description": "Contains processing status for each record type"
                                                        },
                                                        "summary": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "success": {
                                                                        "type": "integer",
                                                                        "example": 0
                                                                    },
                                                                    "fail": {
                                                                        "type": "integer",
                                                                        "example": 1
                                                                    },
                                                                    "existing": {
                                                                        "type": "integer",
                                                                        "example": 0
                                                                    },
                                                                    "updated": {
                                                                        "type": "integer",
                                                                        "example": 0
                                                                    }
                                                                }
                                                            },
                                                            "description": "Summary of processing outcome per record type"
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "BadRequestError",
                                            "Message": "Title can't be blank"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Title can't be blank"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/{stream}": {
            "post": {
                "summary": "Write to a connector",
                "description": "Write data directly to integrations in real-time. Note: this feature is in beta with limited support.",
                "operationId": "connector-post",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "stream",
                        "in": "path",
                        "description": "Stream name",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "source"
                                ],
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "description": "The object you want to post to a connector",
                                        "required": true
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "async": false,
                                            "jobId": "UvzWy0",
                                            "taskId": "3cecd80d-b377-4566-9d8c-e1e870b887ab",
                                            "state": {
                                                "bookmarks": {
                                                    "Contact": [
                                                        {
                                                            "hash": "07f9838d07fca662ce396d1cce9db0893eb3ffee4290ffc20d992a8fde333e2e",
                                                            "success": false,
                                                            "error": "[{\"message\":\"No such column 'EmailAddress' on sobject of type Contact\",\"errorCode\":\"INVALID_FIELD\"}]"
                                                        }
                                                    ]
                                                },
                                                "summary": {
                                                    "Contact": {
                                                        "success": 0,
                                                        "fail": 1,
                                                        "existing": 0,
                                                        "updated": 0
                                                    }
                                                }
                                            },
                                            "logs": "..."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "async": {
                                            "type": "boolean",
                                            "example": false,
                                            "description": "Indicates whether the job is asynchronous"
                                        },
                                        "statusUrl": {
                                            "type": "string",
                                            "description": "If `async` is true, this will be the URL to poll for the status of the write request."
                                        },
                                        "jobId": {
                                            "type": "string",
                                            "example": "UvzWy0",
                                            "description": "A unique job identifier"
                                        },
                                        "taskId": {
                                            "type": "string",
                                            "format": "uuid",
                                            "example": "3cecd80d-b377-4566-9d8c-e1e870b887ab",
                                            "description": "A unique task identifier"
                                        },
                                        "state": {
                                            "type": "object",
                                            "properties": {
                                                "bookmarks": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "hash": {
                                                                    "type": "string",
                                                                    "example": "07f9838d07fca662ce396d1cce9db0893eb3ffee4290ffc20d992a8fde333e2e"
                                                                },
                                                                "success": {
                                                                    "type": "boolean",
                                                                    "example": false
                                                                },
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "003Kc00000AnofgIAB"
                                                                },
                                                                "error": {
                                                                    "type": "string",
                                                                    "example": "[{\"message\":\"No such column 'EmailAddress' on sobject of type Contact\",\"errorCode\":\"INVALID_FIELD\"}]"
                                                                }
                                                            }
                                                        }
                                                    },
                                                    "description": "Contains processing status for each record type"
                                                },
                                                "summary": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "object",
                                                        "properties": {
                                                            "success": {
                                                                "type": "integer",
                                                                "example": 0
                                                            },
                                                            "fail": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "existing": {
                                                                "type": "integer",
                                                                "example": 0
                                                            },
                                                            "updated": {
                                                                "type": "integer",
                                                                "example": 0
                                                            }
                                                        }
                                                    },
                                                    "description": "Summary of processing outcome per record type"
                                                }
                                            }
                                        },
                                        "logs": {
                                            "type": "string",
                                            "example": "...",
                                            "description": "Optional logs for debugging or processing information"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "BadRequestError",
                                            "Message": "Title can't be blank"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Title can't be blank"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/mcpToken": {
            "get": {
                "summary": "Generate MCP token",
                "description": "Generates a per-tenant bearer token for authenticating to hotglue's Composite MCP server (`https://mcp.hotglue.com/mcp`). The token scopes tool discovery and tool calls to the specified tenant's linked connectors.",
                "operationId": "generate-mcp-token",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "token": "eyJlbnZfaWQiOiJkZXYtdjEiLCJmbG93X2lkIjoiLi4uIn0="
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string",
                                            "description": "Base64-encoded bearer token to pass as `Authorization: Bearer <token>` when calling Composite MCP.",
                                            "example": "eyJlbnZfaWQiOiJkZXYtdjEiLCJmbG93X2lkIjoiLi4uIn0="
                                        }
                                    },
                                    "required": [
                                        "token"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Message": "No signing key has been created for this environment. You can do this in your environment settings."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Message": {
                                            "type": "string",
                                            "example": "No signing key has been created for this environment. You can do this in your environment settings."
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/accesstoken": {
            "get": {
                "summary": "Retrieve access token",
                "description": "Uses the tenant's linked credentials to retrieve a new access token for a given connector. Only supported on select connectors. Requires a secret API key, or a public API key with a tenant JWT passed via the `token` query parameter.",
                "operationId": "retrieve-access-token",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "salesforce"
                        },
                        "required": true
                    },
                    {
                        "name": "include_properties",
                        "in": "query",
                        "description": "Comma separated list of properties to include in addition to acces token.",
                        "schema": {
                            "type": "string",
                            "example": "refresh_token,expires_in"
                        },
                        "required": false
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "description": "JWT token generated with your private signing key. Required when using a public API key instead of a secret API key.",
                        "schema": {
                            "type": "string"
                        },
                        "required": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "success": true,
                                            "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "access_token": {
                                            "type": "string",
                                            "example": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "success": false,
                                            "error_message": "The refresh token is expired"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error_message": {
                                            "type": "string",
                                            "example": "The refresh token is expired"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "success": false,
                                            "error_message": "This connector does not support the access token endpoint. Contact hotglue support for more information."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "error_message": {
                                            "type": "string",
                                            "example": "This connector does not support the access token endpoint. Contact hotglue support for more information."
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow}/{user_id}/connectors/api/uploads/url": {
            "post": {
                "summary": "Stage data for write jobs",
                "description": "Generates a presigned URL for uploading a JSON file to a connector's uploads directory. Upload the file to the returned URL, then trigger a write job to process it.",
                "operationId": "generate-connector-upload-url",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "user_id",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "api"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Presigned upload URL generated",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "presigned_url": "https://s3.amazonaws.com/example-bucket/example-key?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..."
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "presigned_url"
                                    ],
                                    "properties": {
                                        "presigned_url": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "Code": "BadRequestError",
                                            "Message": "Connector api is not linked to flow customer-sync"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Connector api is not linked to flow customer-sync"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow}/{tenant_id}/jobs/retrigger": {
            "post": {
                "summary": "Retrigger a job",
                "description": "Retriggers a job based on the provided job_root and parameters. Returns the job details for the retriggered job.",
                "parameters": [
                {
                    "name": "env_id",
                    "in": "path",
                    "required": true,
                    "schema": {
                    "type": "string"
                    }
                },
                {
                    "name": "flow",
                    "in": "path",
                    "required": true,
                    "schema": {
                    "type": "string"
                    }
                },
                {
                    "name": "tenant_id",
                    "in": "path",
                    "required": true,
                    "schema": {
                    "type": "string"
                    }
                }
                ],
                "requestBody": {
                "required": true,
                "content": {
                    "application/json": {
                    "schema": {
                        "type": "object",
                        "required": ["job_root"],
                        "properties": {
                        "job_root": {
                            "type": "string",
                            "description": "The job root (aka s3_root) to retrigger"
                        },
                        "skip_sync": {
                            "type": "boolean",
                            "default": true,
                            "description": "Whether to skip or rerun the sync step. If true, the ETL script will use the job's existing synced data."
                        },
                        "skip_etl": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether to skip or rerun the ETL step. If true, the export step will use the job's existing ETL data."
                        },
                        "skip_webhooks": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether to send job status webhooks for the retriggered job."
                        }
                        }
                    }
                    }
                }
                },
                "responses": {
                "200": {
                    "description": "Job successfully retriggered",
                    "content": {
                    "application/json": {
                        "schema": {
                        "type": "object",
                        "description": "The details for the retriggered job.",
                        "properties": {
                            "job_id": {
                                "type": "string",
                                "description": "The ID of the retriggered job"
                            },
                            "env_id": {
                                "type": "string",
                                "description": "The ID of the environment"
                            },
                            "flow_id": {
                                "type": "string",
                                "description": "The ID of the flow"
                            },
                            "job_name": {
                                "type": "string",
                                "description": "The name of the retriggered job"
                            },
                            "tenant": {
                                "type": "string",
                                "description": "The ID of the tenant"
                            },
                            "s3_root": {
                                "type": "string",
                                "description": "The S3 root of the retriggered job"
                            }
                        },
                        "examples": {
                            "Result": {
                                "value": {
                                    "job_id": "37g_DK",
                                    "env_id": "mydomain.hotglue.xyz",
                                    "flow_id": "l8odS2mce",
                                    "job_name": "l8odS2mce-chargebee-20220119-153011",
                                    "tenant": "12598713",
                                    "started_by": "12598713",
                                    "s3_root": "12598713/flows/l8odS2mce/jobs/2022/01/4/19/15/37g_DK",
                                    "start_time": "2022-01-19T15:30:11.731333+00:00",
                                    "state": {},
                                    "tap": "chargebee",
                                    "status": "JOB_CREATED",
                                    "message": "...",
                                    "last_updated": "2022-01-19T15:35:13.982380+00:00"
                                }
                            }
                        }
                    }
                    }
                }
                },
                "400": {
                    "description": "Invalid request (missing job or flow, job still running, etc.)"
                }
                },
                "tags": ["Jobs"]
            }
        },
        "/{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/availableFilters": {
            "get": {
                "summary": "Retrieve Connector Available Filters",
                "description": "Fetch the Available Filters configuration for a connector",
                "operationId": "retrieve-connector-available-filters",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "netsuite-rest"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "filters_version": "1.0.0",
                                            "reference_data": {
                                                "vendors": [
                                                    {
                                                        "vendor_id": "27",
                                                        "vendor_name": "Acme Corp"
                                                    },
                                                    {
                                                        "vendor_id": "62",
                                                        "vendor_name": "Globex LLC"
                                                    }
                                                ]
                                            },
                                            "streams": {
                                                "bills": {
                                                    "supported_operators": [
                                                        "AND",
                                                        "OR"
                                                    ],
                                                    "supports_nesting_clauses": true,
                                                    "filters": {
                                                        "vendor_id": {
                                                            "label": "Bill Vendor ID",
                                                            "supported_operators": [
                                                                "EQ",
                                                                "NEQ",
                                                                "IN",
                                                                "NOT IN",
                                                                "LIKE"
                                                            ],
                                                            "target_field": "vendor_id",
                                                            "options": "reference_data.vendors"
                                                        },
                                                        "vendor_name": {
                                                            "label": "Bill Vendor Name",
                                                            "supported_operators": [
                                                                "EQ",
                                                                "NEQ",
                                                                "IN",
                                                                "NOT IN",
                                                                "LIKE"
                                                            ],
                                                            "target_field": "vendor_name",
                                                            "options": "reference_data.vendors"
                                                        },
                                                        "status": {
                                                            "label": "Bill Status",
                                                            "supported_operators": [
                                                                "EQ",
                                                                "NEQ",
                                                                "IN",
                                                                "NOT IN"
                                                            ],
                                                            "target_field": "status",
                                                            "options": [
                                                                {
                                                                    "status": "Pending Approval"
                                                                },
                                                                {
                                                                    "status": "Approved"
                                                                },
                                                                {
                                                                    "status": "Paid"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "filters_version": {
                                            "type": "string",
                                            "description": "Version of the filters schema format."
                                        },
                                        "reference_data": {
                                            "type": "object",
                                            "description": "Lookup tables used as option sources for filterable fields; keys are referenced via dot notation in stream filter definitions (e.g. reference_data.vendors).",
                                            "additionalProperties": true
                                        },
                                        "streams": {
                                            "type": "object",
                                            "description": "Map of stream names to their filter definitions.",
                                            "additionalProperties": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "NotFoundError": {
                                        "value": {
                                            "Code": "NotFoundError",
                                            "Message": "Available filters not found for connector: netsuite-rest"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "NotFoundError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Available filters not found for connector: netsuite-rest"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        },
        "/{env_id}/{flow_id}/{tenant}/connectors/{connector_id}/selectedFilters": {
            "get": {
                "summary": "Retrieve Connector Selected Filters",
                "description": "Fetch the Connector Selected Filters configuration",
                "operationId": "retrieve-connector-selected-filters",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "salesforce"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "filters_version": "1.0.0",
                                            "streams": {
                                                "bills": {
                                                    "group_1": {
                                                        "clause_1_1": {
                                                            "field": "transaction.entity",
                                                            "operator": "IN",
                                                            "value": [
                                                                "26006",
                                                                "26032"
                                                            ]
                                                        },
                                                        "operator_1_1": "OR",
                                                        "clause_1_2": {
                                                            "field": "Entity.altname",
                                                            "operator": "IN",
                                                            "value": [
                                                                "Siegwerk EIC LLC",
                                                                "ProAmpac",
                                                                "Dl's Refrigeration"
                                                            ]
                                                        }
                                                    },
                                                    "operator_1": "AND",
                                                    "clause_2": {
                                                        "field": "BUILTIN.DF(transaction.status)",
                                                        "operator": "EQ",
                                                        "value": "Bill : Paid In Full"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {}
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "NotFoundError": {
                                        "value": {
                                            "Code": "NotFoundError",
                                            "Message": "Selected filters not found for connector: netsuite-rest"
                                        }
                                    },
                                    "FlowNotFoundError": {
                                        "value": {
                                            "Code": "FlowNotFoundError",
                                            "Message": "Flow 'evTnoNWxsa' not found for tenant 'some_tenant' in environment 'test.env.io'"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "NotFoundError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Selected filters not found for connector: netsuite-rest"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "delete": {
                "summary": "Delete Connector Selected Filters",
                "description": "Delete the Connector Selected Filters configuration",
                "operationId": "delete-connector-selected-filters",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "salesforce"
                        },
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "OK"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "OK"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "FlowNotFoundError": {
                                        "value": {
                                            "Code": "FlowNotFoundError",
                                            "Message": "Flow 'evTnoNWxsa' not found for tenant 'some_tenant' in environment 'test.env.io'"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "FlowNotFoundError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Flow 'evTnoNWxsa' not found for tenant 'some_tenant' in environment 'test.env.io'"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            },
            "put": {
                "summary": "Save Connector Selected Filters",
                "description": "Save the Connector Selected Filters configuration",
                "operationId": "save-connector-selected-filters",
                "parameters": [
                    {
                        "name": "env_id",
                        "in": "path",
                        "description": "ID of environment",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "flow_id",
                        "in": "path",
                        "description": "ID of flow",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "tenant",
                        "in": "path",
                        "description": "ID of tenant",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    },
                    {
                        "name": "connector_id",
                        "in": "path",
                        "description": "ID of connector",
                        "schema": {
                            "type": "string",
                            "example": "salesforce"
                        },
                        "required": true
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "filters_version",
                                    "streams"
                                ],
                                "properties": {
                                    "filters_version": {
                                        "type": "string",
                                        "description": "The version of the filters configuration",
                                        "example": "1.0.0"
                                    },
                                    "streams": {
                                        "type": "object",
                                        "description": "The streams and their filters",
                                        "properties": {}
                                    }
                                }
                            },
                            "example": {
                                "filters_version": "1.0.0",
                                "streams": {
                                    "bills": {
                                        "group_14": {
                                            "clause_1_1": {
                                                "field": "transaction.entity",
                                                "operator": "IN",
                                                "value": [
                                                    "26006",
                                                    "26032"
                                                ]
                                            },
                                            "operator_1_1": "OR",
                                            "clause_1_2": {
                                                "field": "Entity.altname",
                                                "operator": "IN",
                                                "value": [
                                                    "Siegwerk EIC LLC",
                                                    "ProAmpac"
                                                ]
                                            }
                                        },
                                        "operator_1": "AND",
                                        "clause_2": {
                                            "field": "BUILTIN.DF(transaction.status)",
                                            "operator": "EQ",
                                            "value": "Bill : Paid In Full"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "Result": {
                                        "value": {
                                            "status": "OK"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "OK"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "400",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "SelectedFiltersValidationError": {
                                        "value": {
                                            "Code": "SelectedFiltersValidationError",
                                            "Message": "Stream 'bills' / Group 'ROOT_GROUP' - Key name 'gsroup_14' is not valid, must start with 'clause_', 'group_' or 'operator_'"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "BadRequestError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Validation error: Stream 'bills' / Group 'ROOT_GROUP' - Key name 'gsroup_14' is not valid, must start with 'clause_', 'group_' or 'operator_'"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "FlowNotFoundError": {
                                        "value": {
                                            "Code": "FlowNotFoundError",
                                            "Message": "Flow 'evTnoNWxsa' not found for tenant 'some_tenant' in environment 'test.env.io'"
                                        }
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "Code": {
                                            "type": "string",
                                            "example": "FlowNotFoundError"
                                        },
                                        "Message": {
                                            "type": "string",
                                            "example": "Flow 'evTnoNWxsa' not found for tenant 'some_tenant' in environment 'test.env.io'"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false
            }
        }
    },
    "x-readme": {
        "headers": [],
        "explorer-enabled": true,
        "proxy-enabled": true,
        "samples-enabled": true
    },
    "x-readme-fauxas": true
}
