openapi: 3.2.0 info: description: Fusebit HTTP API for the management and execution of Fusebit accounts, users, functions and more version: 1.0.0 title: Fusebit HTTP API - Integrations Integration API contact: email: contact@fusebit.io license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - url: https://api.{region}.on.fusebit.io description: Production variables: region: description: 'The region where the API is deployed, for example `''us-west-1''` ' default: us-west-1 security: - AccessToken: [] tags: - name: Integration description: The logic necessary to integrate between two services paths: /v2/account/{accountId}/subscription/{subscriptionId}/integration: parameters: - $ref: '#/components/parameters/Account' - $ref: '#/components/parameters/Subscription' get: tags: - Integration summary: Search for and retrieve entities of the specified type operationId: listIntegrations parameters: - $ref: '#/components/parameters/SearchIdPrefix' - $ref: '#/components/parameters/SearchCount' - $ref: '#/components/parameters/SearchNext' - $ref: '#/components/parameters/SearchSort' - $ref: '#/components/parameters/SearchTag' - $ref: '#/components/parameters/SearchStatus' responses: 200: description: A list of the entities found content: application/json: schema: $ref: '#/components/schemas/IntegrationList' 400: $ref: '#/components/responses/400' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' security: - AccessToken: - integration:get /v2/account/{accountId}/subscription/{subscriptionId}/integration/{integrationId}: parameters: - $ref: '#/components/parameters/Account' - $ref: '#/components/parameters/Subscription' - name: integrationId in: path required: true schema: $ref: '#/components/schemas/EntityId' post: tags: - Integration summary: Create a new entity of the specified type operationId: postIntegration requestBody: $ref: '#/components/requestBodies/PostIntegrationBody' responses: 202: $ref: '#/components/responses/Integration202' 400: $ref: '#/components/responses/400' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' security: - AccessToken: - integration:add get: tags: - Integration summary: Get an integration operationId: getIntegration responses: 200: description: The requested entity content: application/json: schema: $ref: '#/components/schemas/IntegrationEntity' 400: $ref: '#/components/responses/400' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' security: - AccessToken: - integration:get put: tags: - Integration summary: Update an integration operationId: putIntegration requestBody: $ref: '#/components/requestBodies/PostIntegrationBody' responses: 202: $ref: '#/components/responses/Integration202' 400: $ref: '#/components/responses/400' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' security: - AccessToken: - integration:update delete: tags: - Integration summary: Delete an integration operationId: deleteIntegration responses: 202: $ref: '#/components/responses/Integration202' 400: $ref: '#/components/responses/400' 403: $ref: '#/components/responses/403' security: - AccessToken: - integration:delete components: schemas: OperationType: type: string enum: - creating - updating - deleting example: updating IntegrationEntity: type: object properties: id: $ref: '#/components/schemas/EntityId' data: $ref: '#/components/schemas/IntegrationEntityData' tags: $ref: '#/components/schemas/EntityTags' version: $ref: '#/components/schemas/EntityVersion' expires: $ref: '#/components/schemas/EntityExpires' dateAdded: $ref: '#/components/schemas/DateAdded' dateModified: $ref: '#/components/schemas/DateModified' state: $ref: '#/components/schemas/EntityState' operationState: $ref: '#/components/schemas/OperationStatusObject' EntitySecurity: type: object description: Additional security configuration variables for this entity. properties: permissions: type: array items: type: object description: 'A pair of an action and a resource, indicating that the entity has permissions to perform API calls requiring that action on that, or derived, resources. ' properties: action: type: string resource: type: string EntityEncodedFiles: type: object description: The collection of filename and encoded content pairs that are packaged with this entity. properties: encodedFileName: description: A file encoded in a particular transport-safe encoding, such as 'base64' type: object properties: data: description: The file payload, encoded in a JSON-safe format. type: string encoding: description: The file encoding, such as 'base64'. type: string example: base64 EntityId: type: string description: 'The name of an entity, matches: `/^[A-Za-z0-9\-]{1,64}$/)` ' AccountId: type: string description: Account id example: acc-5555555555555555 EntityConfiguration: type: object description: The collection of configuration values used by this entity. EntityState: type: string enum: - creating - invalid - active example: active EntityFiles: type: object description: The collection of filename and content pairs that are packaged with this entity. DateModified: type: string format: date-time ComponentsEntityId: type: string description: "The name of an entity, matches: `/^[A-Za-z0-9\\-]{1,64}$/)` or `{{integration}}` when the current\n entity's id should be used.\n\n This parameter is optional. When not supplied, it defaults to the current entity's id.\n" OperationErrorCode: type: string enum: - OK - InvalidParameterValue - UnauthorizedOperation - VersionConflict - InternalError - RequestLimitExceeded example: OK EntityFusebitEditor: type: object properties: runConfig: type: array items: type: object description: Optional configuration values for the Fusebit Editor properties: method: type: string description: The method to use in the default api request example: get enum: - get - post - put - patch - delete url: type: string description: The endpoint of the default api request example: /api/tenant/user-1/test payload: type: object description: The payload of the default api request EntityVersion: type: string format: uuid EntityTags: type: object description: A hash containing tags set on this entity example: tenant: tenant-525 customer: Sonicity IntegrationPostEntity: type: object properties: id: $ref: '#/components/schemas/EntityId' data: $ref: '#/components/schemas/IntegrationEntityData' tags: $ref: '#/components/schemas/EntityTags' expires: $ref: '#/components/schemas/EntityExpires' dateAdded: $ref: '#/components/schemas/DateAdded' dateModified: $ref: '#/components/schemas/DateModified' state: $ref: '#/components/schemas/EntityState' operationState: $ref: '#/components/schemas/OperationStatusObject' OperationStatus: type: string enum: - success - failed - processing example: processing OperationStatusObject: type: object description: Contains the status of the last action taken on this entity properties: operation: $ref: '#/components/schemas/OperationType' status: $ref: '#/components/schemas/OperationStatus' message: type: string errorCode: $ref: '#/components/schemas/OperationErrorCode' errorDetails: type: string DateAdded: type: string format: date-time IntegrationListData: type: object properties: handler: type: string description: The name of the file that is the entrypoint for this integration. example: ./integration componentTags: type: object description: These tags are added to installs and identities created through this integration. components: type: array description: Connectors and other configuration endpoints such as forms located on this integration are itemized here, in order that the client will encounter them. items: type: object properties: name: type: string description: An arbirary name used to reference this component from within integration code. entityType: type: string enum: - connector - integration description: Does this component reference a connector or an integration? entityId: $ref: '#/components/schemas/ComponentsEntityId' skip: type: boolean default: false description: Some components are only used in special cases and as specified during session creation; if `skip` is true, then this component is not part of the normal client configuration process. path: type: string description: The location under the entity specified to pass the client to during a configuration process. example: /api/authorize /api/channelSelectForm dependsOn: type: array description: Allows this component to make use of the credentials or configuration values created by prior components. For example, a form could use slack credentials created by a connector named `slack` to lookup channels by adding `slack` to this list. items: type: string description: The `name` of a component that occurs previously in the `components` array. provider: type: string description: The utility package for a connector that provides a configured SDK for use by the integration. IntegrationList: type: object properties: items: type: array description: An array of the matching entities of this component type items: $ref: '#/components/schemas/IntegrationListEntity' next: type: string description: The key to use when accessing the next block of entries total: type: number description: The total number of entities of this type. EntityExpires: type: string description: The time that the entity expires and is automatically removed from the system. IntegrationListEntity: type: object properties: id: $ref: '#/components/schemas/EntityId' data: $ref: '#/components/schemas/IntegrationListData' tags: $ref: '#/components/schemas/EntityTags' version: $ref: '#/components/schemas/EntityVersion' expires: $ref: '#/components/schemas/EntityExpires' dateAdded: $ref: '#/components/schemas/DateAdded' dateModified: $ref: '#/components/schemas/DateModified' state: $ref: '#/components/schemas/EntityState' operationState: $ref: '#/components/schemas/OperationStatusObject' SubscriptionId: type: string description: Subscription id example: sub-5555555555555555 IntegrationEntityData: type: object properties: handler: type: string description: The name of the file that is the entrypoint for this integration. example: ./integration configuration: $ref: '#/components/schemas/EntityConfiguration' files: $ref: '#/components/schemas/EntityFiles' encodedFiles: $ref: '#/components/schemas/EntityEncodedFiles' componentTags: type: object description: These tags are added to installs and identities created through this integration. components: type: array description: Connectors and other configuration endpoints such as forms located on this integration are itemized here, in order that the client will encounter them. items: type: object properties: name: type: string description: An arbirary name used to reference this component from within integration code. entityType: type: string enum: - connector - integration description: Does this component reference a connector, to acquire a new identity for the user of this integration, or an integration form specified by the `path` parameter? entityId: $ref: '#/components/schemas/ComponentsEntityId' skip: type: boolean default: false description: Some components are only used in special cases and as specified during session creation; if `skip` is true, then this component is not part of the normal client configuration process. path: type: string description: The location under the entity specified to pass the client to during a configuration process. For connector type components, this field is optional and will default to `/api/authorize`. For integration type components, this field indicates the location on the connector that the browser will load as part of it's configuration process. example: /api/authorize /api/channelSelectForm dependsOn: type: array description: Allows this component to make use of the credentials or configuration values created by prior components. For example, a form could use slack credentials created by a connector named `slack` to lookup channels by adding `slack` to this list. items: type: string description: The `name` of a component that occurs previously in the `components` array. provider: type: string description: The utility package for a connector that provides a configured SDK for use by the integration. schedule: type: array description: Schedule specific endpoints to be invoked based on the crontab items: type: object properties: cron: type: string description: The crontab schedule to invoke the endpoint on timezone: type: string description: The timezone that the crontab should execute within endpoint: type: string description: The endpoint to invoke on the `integration.cron` router security: $ref: '#/components/schemas/EntitySecurity' routes: type: array description: Properties that control route-specific behaviors of the function items: type: object description: 'Overrides security settings and controls task scheduling settings on per-route basis. Given a request, the first route, if any, prefix-matching the path of the request URL is used. ' required: - path properties: path: type: string description: A prefix of the request path example: /api/sendEmail security: $ref: '#/components/schemas/EntitySecurity' task: type: object description: 'If present, HTTP POST requests prefix-matching this route are scheduled for asynchronous execution as tasks, and an immediate HTTP 202 response is sent with the `location` HTTP response header containing the URL at which the status of the task execution can be queried. If the number of requests pending execution exceeds `maxPending`, an HTTP 429 response is sent and the request is not scheduled for execution. Unless an explicit `security` element is specified for this route, the HTTP POST requests that schedule task execution must be authorized with an access token that grants the `function:schedule` action for the function resource. ' properties: maxPending: type: number description: 'The maximum number of tasks that can be scheduled for execution before subsequent requests are rejected with an HTTP 429 response. Specify 0 to allow any number of pending requests. ' default: 1024 maxRunning: type: number description: 'The maximum number of tasks that can be running concurrently. Specify 0 to not limit the maximum number of running tasks. ' default: 10 fusebitEditor: $ref: '#/components/schemas/EntityFusebitEditor' parameters: Account: name: accountId in: path required: true description: Account id schema: $ref: '#/components/schemas/AccountId' SearchNext: name: next in: query description: The key to use to retrieve the next set of results schema: type: string SearchTag: name: tag in: query description: A `tagName` or `tagName=tagValue` to search for. Can be specified multiple times in a query parameter to indicate multiple tag values to require in the results. schema: type: string SearchIdPrefix: name: idPrefix in: query description: A prefix to use when searching for a particular entity by id. For example, to search for all integrations that start with a particular service name. schema: type: string SearchStatus: name: status in: query description: Search for entities matching a particular status, `creating`, `invalid`, or `active. schema: $ref: '#/components/schemas/EntityState' SearchSort: name: sort in: query description: Sort the results by `dateModified`, `dateAdded`, or the default value of `entityId`. If `sort` is prepended with a `-` character, the order direction is reversed. schema: type: string SearchCount: name: count in: query description: The maximum number of entries to return schema: type: number Subscription: name: subscriptionId in: path required: true description: Subscription id schema: $ref: '#/components/schemas/SubscriptionId' requestBodies: PostIntegrationBody: description: Upload a new entity content: application/json: schema: $ref: '#/components/schemas/IntegrationPostEntity' responses: Integration202: description: 'The entity creation is in progress. While the `operationState.status` value is `processing`, the entity is still being created. Once the `operationState.status` value is `success`, the entity is available for use. On failure, `operationState.status` will be set to `failed` and `state` will be `invalid`.' content: application/json: schema: $ref: '#/components/schemas/IntegrationEntity' securitySchemes: AccessToken: type: http scheme: bearer bearerFormat: JWT description: For a description of the access token format, see [this doc](https://developer.fusebit.io/docs/connecting-fusebit-with-your-application).