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 - Core Boundaries 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: Boundaries description: Boundary management operations paths: /v1/account/{accountId}/subscription/{subscriptionId}/boundary/{boundaryId}/logs/{queryId}: parameters: - in: path name: accountId required: true description: Account id schema: $ref: '#/components/schemas/AccountId' - in: path name: subscriptionId required: true description: Subscription id schema: $ref: '#/components/schemas/SubscriptionId' - in: path name: boundaryId required: true description: Boundary id schema: $ref: '#/components/schemas/BoundaryId' - in: path name: queryId required: true description: Query id schema: $ref: '#/components/schemas/QueryId' get: tags: - Boundaries summary: Get boundary-level log query results operationId: getBoundaryLogQueryResults description: Get the status and results of a previously started boundary-level log query. responses: 200: description: Query status and results content: application/json: schema: $ref: '#/components/schemas/LogQueryResult' 400: description: Malformed request content: application/json: schema: $ref: '#/components/schemas/Error' 403: description: Not authorized content: application/json: schema: $ref: '#/components/schemas/Error' security: - AccessToken: - log:get /v1/account/{accountId}/subscription/{subscriptionId}/boundary/{boundaryId}/function: parameters: - in: path name: accountId required: true description: Account id schema: $ref: '#/components/schemas/AccountId' - name: subscriptionId in: path description: Subscription id required: true schema: $ref: '#/components/schemas/SubscriptionId' - name: boundaryId in: path description: The boundary id required: true schema: $ref: '#/components/schemas/BoundaryId' get: tags: - Boundaries summary: Get the functions of a boundary description: 'Returns the list of functions in a given boundary of a given subscription. Use query string parameters to filter the list of functions. All query filters are combined with a logical AND operator.' operationId: getFunctionList parameters: - in: query name: include required: false description: 'Optional switch to include all tags of the functions in the response. ' schema: type: string enum: - all - in: query name: next required: false description: Opaque token to start returning results from schema: type: string - in: query name: count required: false description: Maximum number of results to return. Each query will return between 1 and `count` entries. schema: type: number minimum: 1 maximum: 100 - in: query name: cron required: false description: 'Optional switch that determines whether to include or exclude functions that have cron enabled. If `''true''` only functions with cron enabled will be returned. If `''false''` only functions without cron enabled will be returned. If not specified, all functions will be returned. ' schema: type: boolean - in: query name: search required: false description: 'Search the metadata for functions that match this criteria. Each method has several different scopes that can be searched within, including `''compute''`, `''dependency''` and `''tag''`, corresponding to values in the `compute`, dependencies in the `package.json` and `metadata.tags` sections of the function specification. Search supports a single filtering criteria, in the form of `search=key` for any function posessing a key matching that value, or `search=key=value` for functions that specifically match a value. If the key or value contains an `=`, encode them to the URI specification first. Examples include `?search=compute.timeout=30`, `?search=dependency.ms=2.1.2`, `?search=tag.enabled`. Specifying `search` multiple times acts as a logical AND between the criteria, returning only functions which match all of the requested elements. ' schema: type: string responses: 200: description: A list of functions content: application/json: schema: $ref: '#/components/schemas/FunctionList' 400: description: Malformed account or subscription id, invalid next, or invalid query content: application/json: schema: $ref: '#/components/schemas/Error' 403: description: Not authorized content: application/json: schema: $ref: '#/components/schemas/Error' 404: description: Subscription or boundary not found content: application/json: schema: $ref: '#/components/schemas/Error' security: - AccessToken: - function:get /v1/account/{accountId}/subscription/{subscriptionId}/boundary/{boundaryId}/log: parameters: - in: path name: accountId required: true description: Account id schema: $ref: '#/components/schemas/AccountId' - name: subscriptionId in: path description: Subscription id required: true schema: $ref: '#/components/schemas/SubscriptionId' - name: boundaryId in: path description: The boundary id required: true schema: $ref: '#/components/schemas/BoundaryId' get: tags: - Boundaries summary: Get real-time logs of all functions executed within the given boundary description: Returns a text/event-stream response with streaming real-time logs generated by all functions executing in a boundary. operationId: getBoundaryLogs responses: 200: description: Stream of text/event-stream log data 400: description: Malformed account, subscription or boundary id content: application/json: schema: $ref: '#/components/schemas/Error' 403: description: Not authorized content: application/json: schema: $ref: '#/components/schemas/Error' 404: description: Subscription or boundary not found content: application/json: schema: $ref: '#/components/schemas/Error' security: - AccessToken: - function:get-log /v1/account/{accountId}/subscription/{subscriptionId}/boundary/{boundaryId}/logs: parameters: - in: path name: accountId required: true description: Account id schema: $ref: '#/components/schemas/AccountId' - name: subscriptionId in: path description: Subscription id required: true schema: $ref: '#/components/schemas/SubscriptionId' - name: boundaryId in: path description: The boundary id required: true schema: $ref: '#/components/schemas/BoundaryId' post: tags: - Boundaries summary: Start new boundary-level log query operationId: newBoundaryLogQuery description: Starts a new log query scoped to boundary logs. requestBody: description: Log query parameters required: true content: application/json: schema: $ref: '#/components/schemas/NewLogQuery' responses: 200: description: New query initiated content: application/json: schema: $ref: '#/components/schemas/NewLogQueryResponse' 400: description: Malformed request content: application/json: schema: $ref: '#/components/schemas/Error' 403: description: Not authorized content: application/json: schema: $ref: '#/components/schemas/Error' security: - AccessToken: - log:get components: schemas: Error: type: object required: - status - statusCode - message properties: status: type: number description: The HTTP status code example: 404 statusCode: type: number description: The HTTP status code example: 404 message: type: string description: A message with details regarding the error example: The user 'usr-5555555555555555' does not exist NewLogQuery: type: object properties: filter: type: string description: A filter expression in the AWS Cloud Watch Logs Insights format. example: response.statusCode = 500 stats: type: string description: An aggregation expression in the AWS Cloud Watch Logs Insights format. example: count(*) by bin(15s) from: type: string description: Start time of the logging window specified as an absolute date time in ISO format or a relative time in seconds. example: 2021-10-21T00:00:00.361Z or -1800 to: type: string description: End time of the logging window specified as an absolute date time in ISO format or a relative time in seconds. example: 2021-10-21T00:00:00.361Z or +900 limit: type: number description: Maximum number of records to return. example: 20 FunctionId: type: string description: Function id example: my-function-abc QueryId: type: string description: Log Query id example: ffd9b69e-d323-4722-bad8-d57f3b4a28f4 BoundaryId: type: string description: Boundary id example: my-boundary-xyz FunctionRuntime: type: object required: - tags properties: tags: type: object description: User-specified and synthetic tags of a function additionalProperties: true FunctionShort: type: object required: - functionId - boundaryId - schedule - location properties: functionId: $ref: '#/components/schemas/FunctionId' boundaryId: $ref: '#/components/schemas/BoundaryId' schedule: type: string example: '*/15 * * * *' location: type: string description: The URL for executing the function example: https://domain.com/function-abc runtime: $ref: '#/components/schemas/FunctionRuntime' FunctionList: type: object required: - items properties: next: type: string description: Opaque token to continue getting results from items: type: array description: A list of functions items: $ref: '#/components/schemas/FunctionShort' SubscriptionId: type: string description: Subscription id example: sub-5555555555555555 NewLogQueryResponse: type: object properties: queryId: type: string description: A unique log query id to use when polling for query completion AccountId: type: string description: Account id example: acc-5555555555555555 LogQueryResult: type: object properties: status: type: string enum: - scheduled - running - complete - failed - timeout - unknown description: Status of the query. recordsMatched: type: number description: The number of log records matched by the query. The number of records returned in the result may be smaller, subject to the limit. results: type: array description: Array of records representing the query result. items: type: object description: For log aggregation queries, one record of aggregation results. For log queries, one record representing an HTTP request. securitySchemes: AccessToken: type: http scheme: bearer bearerFormat: JWT description: For a description of the access token format, see [this doc](../../integrator-guide/authz-model).