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

# Get a workspace

> Get a single workspace by its ID.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/workspaces/{id}
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: Logs
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
paths:
  /api/svc/v1/workspaces/{id}:
    get:
      tags:
        - Workspaces
      summary: Get a workspace
      description: Get a single workspace by its ID.
      operationId: WorkSpaces.get
      parameters:
        - name: id
          required: true
          in: path
          description: System-generated workspace ID.
          schema:
            example: jqfwg345gi25n5ju2yz5iz6m
            type: string
      responses:
        '200':
          description: The workspace with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspaceResponse'
        '404':
          description: Workspace with the provided ID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - jwt: []
components:
  schemas:
    GetWorkspaceResponse:
      type: object
      properties:
        data:
          description: The workspace object.
          allOf:
            - $ref: '#/components/schemas/Workspace'
      required:
        - data
      title: GetWorkspaceResponse
      x-fern-type-name: GetWorkspaceResponse
    HttpError:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP Status Code
        message:
          type: string
          description: Error Message
        code:
          oneOf:
            - type: integer
            - type: string
          description: Error code
          nullable: true
        details:
          type: array
          description: Error details
          items:
            type: object
          nullable: true
      required:
        - statusCode
        - message
      title: HttpError
      x-fern-type-name: HttpError
    Workspace:
      type: object
      properties:
        id:
          type: string
          description: System-generated workspace ID.
          example: jqfwg345gi25n5ju2yz5iz6m
        fqn:
          type: string
          description: Human-readable Fully Qualified Name of the workspace.
        tenantName:
          type: string
        clusterId:
          type: string
          description: System-generated ID of the cluster this workspace belongs to.
          example: jqfwg345gi25n5ju2yz5iz6m
        createdBySubject:
          $ref: '#/components/schemas/Subject'
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        environmentId:
          type: string
          nullable: true
          description: System-generated ID of the environment this workspace belongs to.
          example: jqfwg345gi25n5ju2yz5iz6m
        manifest:
          oneOf:
            - $ref: '#/components/schemas/WorkspaceManifest'
        accountId:
          type: string
          nullable: false
          description: System-generated ID of the account.
          example: jqfwg345gi25n5ju2yz5iz6m
        isSystemWs:
          type: boolean
          nullable: true
        createdBy:
          type: string
          nullable: true
      required:
        - id
        - fqn
        - tenantName
        - clusterId
        - createdBySubject
        - createdAt
        - updatedAt
        - manifest
        - accountId
      title: Workspace
      x-fern-type-name: Workspace
    Subject:
      type: object
      properties:
        subjectId:
          type: string
          description: Subject ID
        subjectType:
          description: Subject type
          allOf:
            - $ref: '#/components/schemas/SubjectType'
        subjectSlug:
          type: string
          description: Subject slug
          nullable: true
        subjectDisplayName:
          type: string
          description: Subject display name
          nullable: true
        subjectPatName:
          type: string
          description: Subject PAT name
          nullable: true
        subjectControllerName:
          type: string
          nullable: true
        subjectExternalIdentitySlug:
          type: string
          description: External identity slug (external_identity_id:sub:email)
          nullable: true
      required:
        - subjectId
        - subjectType
      title: Subject
      x-fern-type-name: Subject
    WorkspaceManifest:
      type: object
      required:
        - type
        - cluster_fqn
        - name
      properties:
        type:
          description: +value=workspace
          type: string
          enum:
            - workspace
        cluster_fqn:
          description: Cluster FQN
          type: string
        name:
          description: >-
            Name - 3 to 32 lower case characters long alphanumeric word, may
            contain - in between, cannot start with a number
          type: string
          pattern: ^[a-z][a-z0-9\-]{1,30}[a-z0-9]$
        environment_name:
          description: >-
            Tag the environment like dev, staging or production. You will need
            to [create
            environments](https://docs.truefoundry.com/docs/key-concepts#creating-environments)
            if you don't have already.
          type: string
        labels:
          description: +sort=700
          type: object
          additionalProperties:
            type: string
        annotations:
          description: +sort=750
          type: object
          additionalProperties:
            type: string
        collaborators:
          description: Collaborators
          type: array
          items:
            $ref: '#/components/schemas/Collaborator'
        permissions:
          description: Permissions
          type: array
          items:
            $ref: '#/components/schemas/Permissions'
        ownedBy:
          $ref: '#/components/schemas/OwnedBy'
      title: WorkspaceManifest
      x-fern-type-name: WorkspaceManifest
    SubjectType:
      type: string
      enum:
        - user
        - team
        - serviceaccount
        - virtualaccount
        - external-identity
        - role
      description: >-
        Type of the authenticated subject. "user" for human users,
        "serviceaccount" (also known as virtual account) for programmatic
        access.
      title: SubjectType
      x-fern-type-name: SubjectType
    Collaborator:
      type: object
      required:
        - subject
        - role_id
      properties:
        subject:
          description: 'Fully Qualified Name of the subject. eg: user:email or team:teamname'
          type: string
        role_id:
          description: Role ID for the resource
          type: string
      title: Collaborator
      x-fern-type-name: Collaborator
    Permissions:
      type: object
      required:
        - resource_fqn
        - resource_type
        - role_id
      properties:
        resource_fqn:
          description: The fully qualified name of the resource
          type: string
        resource_type:
          description: The type of the resource (cluster, workspace, etc.)
          type: string
        role_id:
          description: >-
            The role id of the role to be assigned to the service account for
            that resource
          type: string
      title: Permissions
      x-fern-type-name: Permissions
    OwnedBy:
      description: Names of the owners that own this resource
      type: object
      required:
        - account
      properties:
        account:
          description: The name of the account that owns this resource
          type: string
      title: OwnedBy
      x-fern-type-name: OwnedBy
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````