openapi: 3.0.0
info:
  title: Reports
  version: 1.0.0
  description:
    $ref: './md-partials/reports-intro.mdx'
servers:
  - url: "https://app.nobl9.com/api"
  - url: "https://us1.nobl9.com/api"
tags:
  - name: Reports
paths:
  /reports/v1/usage-summary:
    get:
      tags:
        - Reports
      summary: Get resource usage summary report
      description: >- 
        Returns a summary of resource usage.
        <hr/>
        For detailed information, check the [Resource Usage Summary report](/reports/#resource-usage-summary).
        <p/>
        <div class='api-note'><b>AUTHENTICATION REQUIRED</b><br/>Authenticate API requests using an [access token](/api/access-token/generate-access-token). Include it in the Authorization header as <code>Bearer TOKEN</code>.</div>
      security:
        - bearerAuth: []
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    description: Report's metadata.
                    properties:
                      tier:
                        type: object
                        description: Information about the subscription tier.
                        properties:
                          name:
                            type: string
                            description: The name of the subscription tier.
                            example: Nobl9 Enterprise
                      generatedAt:
                        type: string
                        format: date-time
                        description: The date and time when the report was generated.
                        example: 2021-07-09T13:34:48Z
                      licenseEndDate:
                        type: string
                        format: date-time
                        description: The end date of the current license.
                        example: 2021-07-09T13:34:48Z
                  usageSummary:
                    type: object
                    description: The usage summary details.
                    properties:
                      slos:
                        type: object
                        description: Information about SLO usage.
                        properties:
                          currentUsage:
                            type: number
                            description: The current number of SLOs in use.
                            example: 15
                          peakUsage:
                            type: number
                            description: The peak number of SLOs used.
                            example: 20
                          quotaStatus:
                            type: string
                            nullable: true
                            description: The status of the SLO quota.
                            enum: [null, reached, exceeded]
                            example: reached
                      sloUnits:
                        type: object
                        description: Information about SLO units usage.
                        properties:
                          currentUsage:
                            type: number
                            description: The current number of SLO units in use.
                            example: 15
                          peakUsage:
                            type: number
                            description: The peak number of SLO units used.
                            example: 20
                          quotaStatus:
                            type: string
                            description: The status of the SLO units quota.
                            enum: [null, reached, exceeded]
                      compositeSloComponents:
                        type: object
                        description: Information about composite SLO components usage.
                        properties:
                          currentUsage:
                            type: number
                            description: The current number of composite SLO components in use.
                            example: 15
                          peakUsage:
                            type: number
                            description: The peak number of composite SLO components used.
                            example: 20
                          quotaStatus:
                            type: string
                            description: The status of the composite SLO components quota.
                            enum: [null, reached, exceeded]
                      dataSources:
                        type: object
                        description: Information about data sources usage.
                        properties:
                          currentUsage:
                            type: number
                            description: The current number of data sources in use.
                            example: 15
                          peakUsage:
                            type: number
                            description: The peak number of data sources used.
                            example: 20
                          quotaStatus:
                            type: string
                            description: The status of the data sources quota.
                            example: reached
                      users:
                        type: object
                        description: Information about users usage.
                        properties:
                          currentUsage:
                            type: number
                            description: The current number of users.
                            example: 15
                          peakUsage:
                            type: number
                            description: The peak number of users.
                            example: 20
                          quotaStatus:
                            type: string
                            description: The status of the users quota.
                            enum: [null, reached, exceeded]
        401:
          description: Authentication credentials not valid
        429:
          description: API call exceeded the rate limit
        500:
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    organization:
      in: header
      name: Organization
      description: Your organization ID. You can find it in the Nobl9 web application under your account settings.
      required: true
      schema:
        type: string
  schemas:
    AccessToken:
      properties:
        access_token:
          type: string
      type: object
  responses:
    BadRequestError:
      description: Bad request
    UnauthorizedError:
      description: Unauthorized
      headers:
        WWW-Authenticate:
          schema:
            type: string
            description: 'https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate'
    ForbiddenError:
      description: Forbidden
    NotFoundError:
      description: One of the resources referenced in query or payload was not found
    InternalServerError:
      description: Internal server error
    TooManyRequestsError:
      description: API call exceeded the rate limit

