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

# GET /admin/api/context



## OpenAPI

````yaml /generated/openapi.json get /admin/api/context
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/context:
    get:
      tags:
        - Management
      summary: GET /admin/api/context
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_AdminContextDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Output_AdminContextDto:
      description: The whole answer.
      properties:
        callerKind:
          description: |-
            `apiKey`, `oauthGrant` or `session`. A console only ever sees
            `session`; a script reading its own context sees which credential it
            presented.
          type: string
        scope:
          anyOf:
            - $ref: '#/components/schemas/Output_AdminScopeDto'
            - type: 'null'
          description: >-
            What this request is acting as. `null` means the caller administers

            several scopes and named none — every other route answers `400`
            until

            one is named.
        scopeHeader:
          description: >-
            The header a session names its scope with, so a console does not
            have

            to hard-code it.
          type: string
        scopes:
          description: |-
            Every scope this caller may act as. One entry for an instance
            administrator, one for an API key, one or more for a session.
          items:
            $ref: '#/components/schemas/Output_AdminScopeDto'
          type: array
        sections:
          description: >-
            The sections `scope` reaches, in navigation order. Empty while
            `scope`

            is `null`.
          items:
            $ref: '#/components/schemas/Output_AdminSectionDto'
          type: array
        user:
          $ref: '#/components/schemas/Output_AdminContextUserDto'
      required:
        - user
        - callerKind
        - scopeHeader
        - scope
        - scopes
        - sections
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_AdminScopeDto:
      description: One scope the caller may act as.
      properties:
        current:
          type: boolean
        id:
          description: The organization or team id. `null` for the instance scope.
          type:
            - string
            - 'null'
        kind:
          description: '`instance`, `organization` or `team`.'
          type: string
        name:
          description: Its display name, when the snapshot knows the row.
          type:
            - string
            - 'null'
        organizationId:
          description: For a team, its parent organization; for an organization, itself.
          type:
            - string
            - 'null'
        selector:
          description: The exact value to send in the scope header to act as this.
          type: string
      required:
        - kind
        - id
        - name
        - organizationId
        - selector
        - current
      type: object
    Output_AdminSectionDto:
      description: One navigable family, as the console's navigation reads it.
      properties:
        capabilities:
          description: '`read`, `write`, or both.'
          items:
            type: string
          type: array
        id:
          type: string
        path:
          description: The collection path under `/admin/api`.
          type: string
      required:
        - id
        - path
        - capabilities
      type: object
    Output_AdminContextUserDto:
      properties:
        id:
          type: string
        instanceAdmin:
          type: boolean
        name:
          description: >-
            The display name, when this revision's snapshot knows the user. A
            user

            created after the snapshot was taken is still a valid caller, so
            this

            is optional rather than a reason to fail.
          type:
            - string
            - 'null'
        role:
          description: |-
            The instance-wide `users.role`. Organization and team roles are
            memberships and appear as `scopes`, not here.
          type: string
      required:
        - id
        - name
        - role
        - instanceAdmin
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [GET /portal/api/context](https://gproxy.leenhawk.com/api-reference/portal/get-portalapicontext.md)
- [GET /admin/api/price-tiers](https://gproxy.leenhawk.com/api-reference/management/get-adminapiprice-tiers.md)
- [GET /admin/api/default-model-catalog](https://gproxy.leenhawk.com/api-reference/management/get-adminapidefault-model-catalog.md)
- [GET /admin/api/price-tiers/{id}](https://gproxy.leenhawk.com/api-reference/management/get-adminapiprice-tiers-1.md)
- [GET /admin/api/api-keys](https://gproxy.leenhawk.com/api-reference/management/get-adminapiapi-keys.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.