Vantage Segments API

Operations about Segments

Operations 5

GET /segments Get all segments #
POST /segments Create segment #
GET /segments/{segment_token} Get segment by token #
PUT /segments/{segment_token} Update segment #
DELETE /segments/{segment_token} Delete segment #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vantage-sh-segments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vantage-sh-segments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Vantage AccessGrants Segments 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: Segments
  description: Operations about Segments
paths:
  /segments:
    get:
      tags:
      - Segments
      summary: Get all segments
      description: Return all Segments.
      operationId: getSegments
      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/Segments'
              example:
                links:
                  self: https://api.vantage.sh/v2/segments
                  first: https://api.vantage.sh/v2/segments?page=1
                  next: null
                  last: https://api.vantage.sh/v2/segments?page=1
                  prev: null
                segments:
                - token: fltr_sgmt_79b0b8ef658d6bba
                  title: Business Units
                  parent_segment_token: null
                  description: Segmented by business unit.
                  track_unallocated: false
                  report_settings:
                    include_credits: false
                    include_refunds: false
                    include_discounts: true
                    include_tax: true
                    amortize: true
                  priority: 100
                  filter: (costs.provider = 'aws')
                  created_at: '2024-05-14T14:34:22Z'
                  workspace_token: wrkspc_21f36c4ad272fb7b
                  report_token: rprt_8dd4e1fe3b88c821
      security:
      - oauth2:
        - read
    post:
      tags:
      - Segments
      summary: Create segment
      description: Create a Segment.
      operationId: createSegment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createSegment'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
              example:
                token: fltr_sgmt_a22e3e52e9a93a75
                title: New Segment
                parent_segment_token: fltr_sgmt_7f1af73e92e5e156
                description: I'm a Segment.
                track_unallocated: false
                priority: 100
                filter: costs.provider = 'aws' AND costs.service = 'Amazon Simple Storage Service'
                created_at: '2024-05-14T14:34:24Z'
                workspace_token: wrkspc_f75aec7671a72dd3
                report_token: null
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
        '422':
          description: UnprocessableEntity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - write
      x-codegen-request-body-name: createSegment
  /segments/{segment_token}:
    get:
      tags:
      - Segments
      summary: Get segment by token
      description: Return a Segment.
      operationId: getSegment
      parameters:
      - name: segment_token
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
              example:
                token: fltr_sgmt_e528df30fe4c9da4
                title: Function-based
                parent_segment_token: null
                description: Segmented by function.
                track_unallocated: false
                report_settings:
                  include_credits: false
                  include_refunds: false
                  include_discounts: true
                  include_tax: true
                  amortize: true
                priority: 100
                filter: (costs.provider = 'aws')
                created_at: '2024-05-14T14:34:18Z'
                workspace_token: wrkspc_eb7573db105407df
                report_token: rprt_f7828113036f5fce
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      security:
      - oauth2:
        - read
    put:
      tags:
      - Segments
      summary: Update segment
      description: Update a Segment.
      operationId: updateSegment
      parameters:
      - name: segment_token
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateSegment'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
              example:
                token: fltr_sgmt_1550eb291314035c
                title: Updated Segment
                parent_segment_token: fltr_sgmt_a39cf865967ed4d8
                description: This segment is updated.
                track_unallocated: false
                priority: 42
                filter: costs.provider = 'azure'
                created_at: '2024-05-14T14:34:23Z'
                workspace_token: wrkspc_1be9d0445f94db0b
                report_token: rprt_3e460438ae115013
        '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: updateSegment
    delete:
      tags:
      - Segments
      summary: Delete segment
      description: Delete a Segment.
      operationId: deleteSegment
      parameters:
      - name: segment_token
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
        '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
          items:
            type: string
      description: Errors model
    Links:
      type: object
      properties:
        self:
          type:
          - string
          - 'null'
          description: The URL of the current page of results.
        first:
          type:
          - string
          - 'null'
          description: The URL of the first page of results.
        next:
          type:
          - string
          - 'null'
          description: The URL of the next page of results, if one exists.
        last:
          type:
          - string
          - 'null'
          description: The URL of the last page of results, if one exists.
        prev:
          type:
          - string
          - 'null'
          description: The URL of the previous page of results, if one exists.
    createSegment:
      required:
      - title
      type: object
      properties:
        title:
          type: string
          description: The title of the Segment.
        description:
          type: string
          description: The description of the Segment.
        priority:
          type: integer
          description: The priority of the Segment.
          format: int32
        track_unallocated:
          type: boolean
          description: Track Unallocated Costs which are not assigned to any of the created Segments.
          default: false
        report_settings:
          type: object
          properties:
            include_credits:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include credits.
            include_refunds:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include refunds.
            include_discounts:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include discounts.
            include_tax:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include tax.
            amortize:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will amortize.
          description: Report settings configurable on top-level Segments.
        workspace_token:
          type: string
          description: The token of the Workspace to add the Segment to. Ignored if 'segment_token' is set. Required if the API token is associated with multiple Workspaces.
        filter:
          type: string
          description: The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
        parent_segment_token:
          type: string
          description: The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
      description: Create a Segment.
    Segments:
      required:
      - segments
      type: object
      properties:
        links:
          $ref: '#/components/schemas/Links'
        segments:
          type: array
          items:
            $ref: '#/components/schemas/Segment'
      description: Segments model
    Segment:
      required:
      - created_at
      - description
      - filter
      - parent_segment_token
      - priority
      - report_token
      - title
      - token
      - track_unallocated
      - workspace_token
      type: object
      properties:
        token:
          type: string
        title:
          type: string
          description: The title of the Segment.
          example: OPEX
        parent_segment_token:
          type:
          - string
          - 'null'
          description: The token of the parent Segment of this Segment.
        description:
          type: string
          description: The description of the Segment.
          example: Operating expenses
        track_unallocated:
          type: boolean
          description: Track Unallocated Costs which are not assigned to any of the created Segments.
          example: false
        report_settings:
          type: object
          properties:
            include_credits:
              type:
              - boolean
              - 'null'
            include_refunds:
              type:
              - boolean
              - 'null'
            include_discounts:
              type:
              - boolean
              - 'null'
            include_tax:
              type:
              - boolean
              - 'null'
            amortize:
              type:
              - boolean
              - 'null'
          description: Report settings configurable on top-level Segments.
        priority:
          type: integer
          description: Costs are assigned in priority order across all Segments with assigned filters.
          format: int32
          example: 100
        filter:
          type:
          - string
          - 'null'
          description: The filter applied to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
        created_at:
          type: string
          description: The date and time, in UTC, the Segment was created. ISO 8601 Formatted.
          example: '2021-07-09T00:00:00Z'
        workspace_token:
          type: string
          description: The token for the Workspace the Segment is a part of.
        report_token:
          type:
          - string
          - 'null'
          description: The token for the Report the Segment has generated.
      description: Segment model
    updateSegment:
      type: object
      properties:
        title:
          type: string
          description: The title of the Segment.
        description:
          type: string
          description: The description of the Segment.
        priority:
          type: integer
          description: The priority of the Segment.
          format: int32
        track_unallocated:
          type: boolean
          description: Track Unallocated Costs which are not assigned to any of the created Segments.
          default: false
        report_settings:
          type: object
          properties:
            include_credits:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include credits.
            include_refunds:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include refunds.
            include_discounts:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include discounts.
            include_tax:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will include tax.
            amortize:
              type:
              - boolean
              - 'null'
              description: Reports created under this Segment will amortize.
          description: Report settings configurable on top-level Segments.
        filter:
          type: string
          description: The filter query language to apply to the Segment. Additional documentation available at https://docs.vantage.sh/vql.
        parent_segment_token:
          type: string
          description: The token of the parent Segment this new Segment belongs to. Determines the Workspace the segment is assigned to.
      description: Update a Segment.
  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'