> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tolmo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a resource subgraph

> Get a subgraph filtered by provider/service/resourceType



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/orgs/{orgSlug}/resource-graph/subgraph
openapi: 3.0.3
info:
  title: Tolmo API
  version: 1.0.0
  description: >-
    The Tolmo REST API. Every endpoint is scoped to one organization and
    authenticated with an API token.
servers:
  - url: https://api.tolmo.com
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v1/orgs/{orgSlug}/resource-graph/subgraph:
    get:
      tags:
        - resource-graph
      summary: Get a resource subgraph
      description: Get a subgraph filtered by provider/service/resourceType
      operationId: apiGetResourceGraphSubgraph
      parameters:
        - schema:
            type: string
          in: query
          name: provider
          required: false
        - schema:
            type: string
          in: query
          name: service
          required: false
        - schema:
            type: string
          in: query
          name: resourceType
          required: false
        - schema:
            type: string
          in: query
          name: labels
          required: false
        - schema:
            type: string
          in: query
          name: excludeLabels
          required: false
        - schema:
            type: string
          in: query
          name: search
          required: false
        - schema:
            type: integer
            minimum: 1
            maximum: 50000
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            maximum: 9007199254740991
          in: query
          name: offset
          required: false
        - schema:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          in: query
          name: timeFrom
          required: false
        - schema:
            type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          in: query
          name: timeTo
          required: false
        - schema:
            type: boolean
          in: query
          name: fullProjection
          required: false
        - schema:
            type: string
          in: path
          name: orgSlug
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  nodes:
                    type: array
                    items:
                      type: object
                      properties:
                        resourceKey:
                          type: string
                        provider:
                          type: string
                        service:
                          type: string
                        resourceType:
                          type: string
                        region:
                          type: string
                        accountId:
                          type: string
                        labels:
                          type: array
                          items:
                            type: string
                        props:
                          type: object
                          additionalProperties: {}
                        firstSeenAt:
                          type: number
                        lastSeenAt:
                          type: number
                      required:
                        - resourceKey
                        - provider
                        - service
                        - resourceType
                        - labels
                        - props
                      additionalProperties: false
                  edges:
                    type: array
                    items:
                      type: object
                      properties:
                        sourceKey:
                          type: string
                        targetKey:
                          type: string
                        type:
                          type: string
                        props:
                          type: object
                          additionalProperties: {}
                        firstSeenAt:
                          type: number
                        lastSeenAt:
                          type: number
                      required:
                        - sourceKey
                        - targetKey
                        - type
                        - props
                      additionalProperties: false
                  metadata:
                    type: object
                    properties:
                      executionTime:
                        type: number
                      nodeCount:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      edgeCount:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - executionTime
                      - nodeCount
                      - edgeCount
                    additionalProperties: false
                required:
                  - nodes
                  - edges
                  - metadata
                additionalProperties: false
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
components:
  schemas:
    HttpError:
      type: object
      properties:
        statusCode:
          type: number
        code:
          type: string
        error:
          type: string
        message:
          type: string
      title: HttpError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Tolmo API token, sent as `Authorization: Bearer <token>`. Either a
        user token (`usr_tok.*`, minted by `tolmo auth login`, scoped to your
        own permissions) or an org API token created in the Tolmo app, for CI
        and automation.

````