swagger: '2.0' info: title: Koyeb Rest activity Metrics 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: Metrics paths: /v1/streams/metrics: get: summary: Get Metrics operationId: GetMetrics responses: '200': description: A successful response. schema: $ref: '#/definitions/GetMetricsReply' '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: service_id description: ID of the service to query instances metrics for. Ignored if instance_id is set. in: query required: false type: string - name: instance_id description: ID of the instance to query metrics for. in: query required: false type: string - name: name description: Metric to query. in: query required: false type: string enum: - UNKNOWN - CPU_TOTAL_PERCENT - MEM_RSS - HTTP_THROUGHPUT - HTTP_RESPONSE_TIME_50P - HTTP_RESPONSE_TIME_90P - HTTP_RESPONSE_TIME_99P - HTTP_RESPONSE_TIME_MAX - PUBLIC_DATA_TRANSFER_IN - PUBLIC_DATA_TRANSFER_OUT default: UNKNOWN - name: start description: (Optional) Defaults to an hour prior to end. in: query required: false type: string format: date-time - name: end description: (Optional) Defaults to now. in: query required: false type: string format: date-time - name: step description: (Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m. in: query required: false type: string tags: - Metrics definitions: GetMetricsReply.Metric: type: object properties: labels: type: object additionalProperties: type: string samples: type: array items: $ref: '#/definitions/Sample' GetMetricsReply: type: object properties: metrics: type: array items: $ref: '#/definitions/GetMetricsReply.Metric' google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/google.protobuf.Any' ErrorWithFields: type: object properties: status: type: integer format: int32 code: type: string message: type: string fields: type: array items: $ref: '#/definitions/ErrorField' Sample: type: object properties: timestamp: type: string value: type: number format: double google.protobuf.Any: type: object properties: '@type': type: string additionalProperties: {} 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