swagger: '2.0' info: title: Koyeb Rest activity Logs API description: 'The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. ' version: 1.0.0 host: app.koyeb.com schemes: - https security: - Bearer: [] tags: - name: Logs paths: /v1/streams/logs/query: get: summary: Query logs operationId: QueryLogs responses: '200': description: A successful response. schema: $ref: '#/definitions/QueryLogsReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: type description: Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime". in: query required: false type: string - name: app_id description: (Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: service_id description: (Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: deployment_id description: (Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: regional_deployment_id description: (Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: instance_id description: Deprecated, prefer using instance_ids instead. in: query required: false type: string - name: instance_ids description: (Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: array items: type: string collectionFormat: multi - name: stream description: Deprecated, prefer using streams instead. in: query required: false type: string - name: streams description: '(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' in: query required: false type: array items: type: string collectionFormat: multi - name: start description: (Optional) Must always be before `end`. Defaults to 15 minutes ago. in: query required: false type: string format: date-time - name: end description: (Optional) Must always be after `start`. Defaults to now. in: query required: false type: string format: date-time - name: order description: (Optional) `asc` or `desc`. Defaults to `desc`. in: query required: false type: string - name: limit description: (Optional) Defaults to 100. Maximum of 1000. in: query required: false type: string format: int64 - name: regex description: (Optional) Apply a regex to filter logs. Can't be used with `text`. in: query required: false type: string - name: text description: (Optional) Looks for this string in logs. Can't be used with `regex`. in: query required: false type: string - name: regions description: (Optional) Filter on the provided regions (e.g. ["fra", "was"]). in: query required: false type: array items: type: string collectionFormat: multi tags: - Logs /v1/streams/logs/tail: get: summary: Tails logs operationId: TailLogs responses: '200': description: A successful response.(streaming responses) schema: type: object properties: result: $ref: '#/definitions/LogEntry' error: $ref: '#/definitions/google.rpc.Status' title: Stream result of LogEntry '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: type description: Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime". in: query required: false type: string - name: app_id description: (Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: service_id description: (Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: deployment_id description: (Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: regional_deployment_id description: (Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: string - name: instance_id description: Deprecated, prefer using instance_ids instead. in: query required: false type: string - name: instance_ids description: (Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set. in: query required: false type: array items: type: string collectionFormat: multi - name: stream description: Deprecated, prefer using streams instead. in: query required: false type: string - name: streams description: '(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' in: query required: false type: array items: type: string collectionFormat: multi - name: start description: (Optional) Defaults to 24 hours ago. in: query required: false type: string format: date-time - name: limit description: (Optional) Defaults to 1000. Maximum of 1000. in: query required: false type: string format: int64 - name: regex description: (Optional) Apply a regex to filter logs. Can't be used with `text`. in: query required: false type: string - name: text description: (Optional) Looks for this string in logs. Can't be used with `regex`. in: query required: false type: string - name: regions description: (Optional) Filter on the provided regions (e.g. ["fra", "was"]). in: query required: false type: array items: type: string collectionFormat: multi tags: - Logs definitions: google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/google.protobuf.Any' LogEntry: type: object properties: msg: type: string created_at: type: string format: date-time labels: type: object ErrorWithFields: type: object properties: status: type: integer format: int32 code: type: string message: type: string fields: type: array items: $ref: '#/definitions/ErrorField' QueryLogsReply: type: object properties: data: type: array items: $ref: '#/definitions/LogEntry' pagination: $ref: '#/definitions/QueryLogsReplyPagination' google.protobuf.Any: type: object properties: '@type': type: string additionalProperties: {} QueryLogsReplyPagination: type: object properties: has_more: type: boolean next_start: type: string format: date-time next_end: type: string format: date-time ErrorField: type: object properties: field: type: string description: type: string Error: type: object properties: status: type: integer format: int32 code: type: string message: type: string securityDefinitions: Bearer: type: apiKey name: Authorization in: header x-tagGroups: - name: Introduction tags: - intro - name: API tags: - Profile - Sessions - Users - organization - OrganizationMembers - OrganizationInvitations - OrganizationConfirmations - Subscriptions - Coupons - Credentials - Secrets - activity - Apps - Services - Deployments - Archives - RegionalDeployments - Instances - Domains - PersistentVolumes - Snapshots - Compose - Repositories - Logs - Metrics - Catalog - CatalogRegions - CatalogInstances - Usages - Summary - DockerHelper