openapi: 3.1.0 info: title: elastic.io Platform REST Agents Flow Drafts API description: The elastic.io Platform REST API v2 provides programmatic access to the elastic.io iPaaS platform. It allows you to manage integration flows, workspaces, contracts, credentials, components, recipes, users, and other platform resources. The API follows the JSON:API specification and uses Bearer token authentication. version: 2.0.0 contact: name: elastic.io url: https://www.elastic.io/ license: name: Proprietary url: https://www.elastic.io/ termsOfService: https://www.elastic.io/ servers: - url: https://api.elastic.io/v2 description: elastic.io Platform API v2 security: - bearerAuth: [] tags: - name: Flow Drafts description: Manage flow drafts before publishing paths: /flow-drafts: get: operationId: listFlowDrafts summary: Elastic.io List flow drafts description: Retrieve a list of flow drafts. tags: - Flow Drafts parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageNumber' - $ref: '#/components/parameters/WorkspaceFilter' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/FlowDraftListResponse' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createFlowDraft summary: Elastic.io Create a flow draft description: Create a new flow draft for editing before publishing. tags: - Flow Drafts requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FlowDraftCreateRequest' responses: '201': description: Flow draft created successfully content: application/json: schema: $ref: '#/components/schemas/FlowDraftResponse' '401': $ref: '#/components/responses/Unauthorized' /flow-drafts/{flow_draft_id}: get: operationId: getFlowDraft summary: Elastic.io Get a flow draft description: Retrieve details of a specific flow draft. tags: - Flow Drafts parameters: - $ref: '#/components/parameters/FlowDraftId' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/FlowDraftResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateFlowDraft summary: Elastic.io Update a flow draft description: Update an existing flow draft. tags: - Flow Drafts parameters: - $ref: '#/components/parameters/FlowDraftId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FlowDraftUpdateRequest' responses: '200': description: Flow draft updated successfully content: application/json: schema: $ref: '#/components/schemas/FlowDraftResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteFlowDraft summary: Elastic.io Delete a flow draft description: Delete a flow draft. tags: - Flow Drafts parameters: - $ref: '#/components/parameters/FlowDraftId' responses: '204': description: Flow draft deleted successfully '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: parameters: WorkspaceFilter: name: filter[workspace_id] in: query description: Filter by workspace ID schema: type: string FlowDraftId: name: flow_draft_id in: path required: true description: The unique identifier of the flow draft schema: type: string PageSize: name: page[size] in: query description: Number of items per page schema: type: integer default: 20 PageNumber: name: page[number] in: query description: Page number to retrieve schema: type: integer default: 1 schemas: FlowDraft: type: object properties: id: type: string type: type: string enum: - flow-draft attributes: type: object properties: name: type: string graph: type: object cron: type: string created_at: type: string format: date-time updated_at: type: string format: date-time relationships: type: object properties: workspace: $ref: '#/components/schemas/JsonApiRelationship' flow: $ref: '#/components/schemas/JsonApiRelationship' ErrorResponse: type: object properties: errors: type: array items: type: object properties: status: type: integer title: type: string detail: type: string FlowDraftCreateRequest: type: object required: - data properties: data: type: object required: - type - attributes properties: type: type: string enum: - flow-draft attributes: type: object required: - name properties: name: type: string graph: type: object cron: type: string relationships: type: object properties: workspace: $ref: '#/components/schemas/JsonApiRelationship' flow: $ref: '#/components/schemas/JsonApiRelationship' FlowDraftResponse: type: object properties: data: $ref: '#/components/schemas/FlowDraft' JsonApiMeta: type: object properties: page: type: integer per_page: type: integer total: type: integer total_pages: type: integer JsonApiRelationship: type: object properties: data: type: object properties: id: type: string type: type: string JsonApiLinks: type: object properties: self: type: string format: uri first: type: string format: uri prev: type: string format: uri next: type: string format: uri last: type: string format: uri FlowDraftListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/FlowDraft' meta: $ref: '#/components/schemas/JsonApiMeta' links: $ref: '#/components/schemas/JsonApiLinks' FlowDraftUpdateRequest: type: object required: - data properties: data: type: object required: - type - id properties: type: type: string enum: - flow-draft id: type: string attributes: type: object properties: name: type: string graph: type: object cron: type: string responses: Unauthorized: description: Authentication required or token is invalid content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: The requested resource was not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: Bearer token authentication. Obtain a token through the elastic.io platform login or API key.