Vantage AccessGrants API

Operations about AccessGrants

OpenAPI Specification

vantage-sh-accessgrants-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Vantage AccessGrants API
  description: The Vantage API provides programmatic access to the Vantage cloud cost management and FinOps platform. It covers cost reporting and querying (Costs, Cost Reports, forecasts, unit costs), cost visibility and optimization (Resources, Recommendations, Financial Commitments, Kubernetes efficiency), governance and alerting (Budgets, Budget Alerts, Cost Alerts, Anomaly Alerts and Notifications), organization (Segments, Folders, Saved Filters, Dashboards, Workspaces, Teams), and billing (Billing Profiles, Billing Rules, Invoices). The API spans AWS, Azure, GCP, Kubernetes, Datadog, Snowflake, MongoDB, and other supported providers. Base URL https://api.vantage.sh/v2. Authentication is via OAuth2 (client credentials / bearer token) with read and write scopes.
  termsOfService: https://www.vantage.sh/terms-of-use
  contact:
    name: Vantage Support
    url: https://www.vantage.sh
    email: support@vantage.sh
  version: 2.0.0
servers:
- url: https://api.vantage.sh/v2
security:
- oauth2:
  - read
tags:
- name: AccessGrants
  description: Operations about AccessGrants
paths:
  /access_grants:
    get:
      tags:
      - AccessGrants
      summary: Get all access grants
      description: Return all Access Grants that the current API token has access to.
      operationId: getAccessGrants
      parameters:
      - name: page
        in: query
        description: The page of results to return.
        schema:
          type: integer
          format: int32
      - name: limit
        in: query
        description: The amount of results to return. The maximum is 1000.
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGrants'
              example:
                links:
                  self: https://api.vantage.sh/v2/access_grants
                  first: https://api.vantage.sh/v2/access_grants?page=1
                  next: null
                  last: https://api.vantage.sh/v2/access_grants?page=1
                  prev: null
                access_grants:
                - token: rsrc_accss_grnt_c40f15062b6d5c37
                  resource_token: rprt_5a269d316483b01c
                  access: denied
                  team_token: team_fd5c524ba104712b
                  created_at: '2024-01-18T17:39:37Z'
                  created_by: usr_eb8ce6bdc1fa31d5
                - token: rsrc_accss_grnt_9723e984e93d8907
                  resource_token: dshbrd_a08561ec24875ac9
                  access: allowed
                  team_token: team_fd5c524ba104712b
                  created_at: '2024-01-18T17:39:37Z'
                  created_by: usr_eb8ce6bdc1fa31d5
                - token: rsrc_accss_grnt_eee5c4fd777d4dc8
                  resource_token: fldr_9d4ad1a769131c58
                  access: allowed
                  team_token: team_fd5c524ba104712b
                  created_at: '2024-01-18T17:39:38Z'
                  created_by: usr_eb8ce6bdc1fa31d5
      security:
      - oauth2:
        - read
    post:
      tags:
      - AccessGrants
      summary: Create access grant
      description: Create an Access Grant.
      operationId: createAccessGrant
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createAccessGrant'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGrant'
              example:
                token: rsrc_accss_grnt_9f8aeb3cedda3831
                resource_token: rprt_3b935d26cba36fb0
                access: denied
                team_token: team_26865e16e46028ae
                created_at: '2024-01-18T17:39:37Z'
                created_by: usr_2fc38883da3726b9
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '406':
          description: NotAcceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - write
      x-codegen-request-body-name: createAccessGrant
  /access_grants/{access_grant_token}:
    get:
      tags:
      - AccessGrants
      summary: Get access grant by token
      description: Return a specific Access Grant.
      operationId: getAccessGrant
      parameters:
      - name: access_grant_token
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGrant'
              example:
                token: rsrc_accss_grnt_07ed83a5069b91c4
                resource_token: rprt_b8df14aa8a4ad5c7
                access: denied
                team_token: team_14bd13a8bccb8406
                created_at: '2024-01-18T17:39:36Z'
                created_by: usr_0e1cb254743b26cb
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - read
    put:
      tags:
      - AccessGrants
      summary: Update access grant
      description: Update an AccessGrant.
      operationId: updateAccessGrant
      parameters:
      - name: access_grant_token
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateAccessGrant'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGrant'
              example:
                token: rsrc_accss_grnt_eea11f0d35318b0d
                resource_token: rprt_e84d7760ab2dd7dc
                access: allowed
                team_token: team_25fc4aa890869602
                created_at: '2024-01-18T17:39:36Z'
                created_by: usr_57ed2fa2a7b30166
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - write
      x-codegen-request-body-name: updateAccessGrant
    delete:
      tags:
      - AccessGrants
      summary: Delete access grant
      description: Delete an Access Grant.
      operationId: deleteAccessGrant
      parameters:
      - name: access_grant_token
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessGrant'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - write
components:
  schemas:
    Errors:
      required:
      - errors
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        errors:
          type: array
          nullable: false
          items:
            type: string
      description: Errors model
    updateAccessGrant:
      required:
      - access
      type: object
      properties:
        access:
          type: string
          description: Allowed or denied access to resource.
          enum:
          - denied
          - allowed
      description: Update an AccessGrant.
    createAccessGrant:
      required:
      - resource_token
      - team_token
      type: object
      properties:
        resource_token:
          type: string
          description: The token of the resource for which you are granting access.
        team_token:
          type: string
          description: The token of the Team you want to grant access to.
        access:
          type: string
          description: The access level you want to grant. Defaults to 'allowed'.
          enum:
          - denied
          - allowed
      description: Create an Access Grant.
    AccessGrants:
      required:
      - access_grants
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        access_grants:
          type: array
          items:
            $ref: '#/components/schemas/AccessGrant'
      description: AccessGrants model
    Links:
      type: object
      properties:
        self:
          type: string
          description: The URL of the current page of results.
          nullable: true
        first:
          type: string
          description: The URL of the first page of results.
          nullable: true
        next:
          type: string
          description: The URL of the next page of results, if one exists.
          nullable: true
        last:
          type: string
          description: The URL of the last page of results, if one exists.
          nullable: true
        prev:
          type: string
          description: The URL of the previous page of results, if one exists.
          nullable: true
    AccessGrant:
      required:
      - access
      - created_at
      - created_by
      - resource_token
      - team_token
      - token
      type: object
      properties:
        token:
          type: string
          nullable: false
        resource_token:
          type: string
          description: The token for any resource the AccessGrant is applied to.
          nullable: false
          example: rprt_abcd1234
        access:
          type: string
          description: The access status of the AccessGrant.
          nullable: false
        team_token:
          type: string
          description: The Team token for which an AccessGrant is applied to.
          nullable: true
        created_at:
          type: string
          description: The date and time, in UTC, the AccessGrant was created. ISO 8601 Formatted.
          nullable: false
          example: '2023-08-04T00:00:00Z'
        created_by:
          type: string
          description: The token for the User who created the AccessGrant.
          nullable: true
      description: AccessGrant model
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://console.vantage.sh/account/profile
          scopes:
            read: Grants read access
            write: Grants write access
x-original-swagger-version: '2.0'