> ## 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 /portal/api/context



## OpenAPI

````yaml /generated/openapi.json get /portal/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:
  /portal/api/context:
    get:
      tags:
        - Portal
      summary: GET /portal/api/context
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_PortalContextDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Output_PortalContextDto:
      description: >-
        Everything a portal needs to render its shell, in one call: who you are,

        which scopes you belong to, what you are subscribed to, and which parts
        of

        the portal this instance offers you.
      properties:
        features:
          $ref: '#/components/schemas/Output_PortalFeaturesDto'
        organizations:
          description: |-
            Direct organization memberships. A team joined without its parent is
            *not* listed here; the team is, with its `organizationId`.
          items:
            $ref: '#/components/schemas/Output_PortalOrganizationDto'
          type: array
        teams:
          items:
            $ref: '#/components/schemas/Output_PortalTeamDto'
          type: array
        user:
          $ref: '#/components/schemas/Output_PortalUserDto'
      required:
        - user
        - organizations
        - teams
        - features
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_PortalFeaturesDto:
      description: >-
        What this instance lets this caller do, so a portal can hide a tab
        rather

        than render one that answers 403.


        Every flag is a fact about configuration or about the caller's role —
        never

        about data — so computing it costs nothing and leaks nothing.
      properties:
        canChangePassword:
          description: |-
            Same rule, same reason: a third-party program does not get to change
            the account password it was lent.
          type: boolean
        canCreateKeys:
          description: >-
            Whether the key family's writing half is open. False for an
            OAuth-grant

            caller: a token the user handed to somebody else's program must not
            be

            able to mint a fresh long-lived credential out of that trust.
          type: boolean
        canSeeConsole:
          description: >-
            Whether to offer a link into the operator console: it has to be
            built

            into this instance *and* the caller has to be an instance
            administrator.
          type: boolean
        canSeeLogs:
          description: >-
            `settings.portal_recent_requests_enabled`. Off means

            [`Portal::recent_requests`](crate::operations::Portal::recent_requests)

            answers with nothing.
          type: boolean
      required:
        - canCreateKeys
        - canChangePassword
        - canSeeLogs
        - canSeeConsole
      type: object
    Output_PortalOrganizationDto:
      properties:
        id:
          type: string
        name:
          type: string
        role:
          description: '`member` or `admin`, scoped to this organization.'
          type: string
      required:
        - id
        - name
        - role
      type: object
    Output_PortalTeamDto:
      properties:
        id:
          type: string
        name:
          type: string
        organizationId:
          type: string
        role:
          description: >-
            `member` or `admin`, scoped to this team. An organization admin is
            not

            automatically a team admin.
          type: string
      required:
        - id
        - name
        - organizationId
        - role
      type: object
    Output_PortalUserDto:
      properties:
        hasPassword:
          description: |-
            Whether a password is set. An account without one signs in through
            OAuth only, and its password change takes no `current`.
          type: boolean
        id:
          type: string
        name:
          type: string
        role:
          description: >-
            The instance-wide role, `admin` or `user`. Organization and team
            roles

            are memberships and are listed with their scope.
          type: string
      required:
        - id
        - name
        - role
        - hasPassword
      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/keys](https://gproxy.leenhawk.com/api-reference/portal/get-portalapikeys.md)
- [GET /portal/api/models](https://gproxy.leenhawk.com/api-reference/portal/get-portalapimodels.md)
- [GET /portal/api/quota](https://gproxy.leenhawk.com/api-reference/portal/get-portalapiquota.md)
- [GET /portal/api/requests](https://gproxy.leenhawk.com/api-reference/portal/get-portalapirequests.md)
- [GET /portal/api/sessions](https://gproxy.leenhawk.com/api-reference/portal/get-portalapisessions.md)


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