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

# Get a model from the Application



## OpenAPI

````yaml /openapi.yaml get /applications/{applicationId}/models/{modelId}
openapi: 3.1.0
info:
  version: 0.0.5
  title: Sutro Public API
  description: >-
    The API through which apps can be generated, deployed, monitored and
    updated.
servers:
  - description: Production
    url: https://sapi.withsutro.com
security:
  - apiAuth: []
    builderAuth: []
    apiClientId: []
tags:
  - name: projects
    description: >
      Create and manage projects. Projects are the top-level container for all
      Sutro resources including applications,

      specifications, and team collaboration.
  - name: specifications
    description: >
      Generate and retrieve application specifications from attachments using
      AI. Specifications describe the data models,

      actions, and UI structure for your application.
  - name: applications
    description: >
      Generate applications, manage versions, and configure core settings.
      Applications are the executable implementations

      of your specifications.
  - name: attachments
    description: >
      Upload, manage, and delete file attachments for applications. Attachments
      can include Figma files,

      documents, and other assets used in application generation.
  - name: data-models
    description: >
      Define and manage data models and their fields. Models represent the
      entities in your application

      (e.g., Users, Products, Orders) and their properties.
  - name: actions-effects
    description: >
      Actions are things that your application can do, and an action is made up
      of effects.
  - name: triggers
    description: >
      Configure triggers that start workflows automatically based on events like
      schedules, webhooks, or data changes.
  - name: figma-integration
    description: >
      Import Figma designs and generate static code from frames. Connect your
      Figma files to automatically

      generate UI components.
  - name: deployments-assets
    description: >
      Deploy application versions and download generated code bundles. Manage
      your application releases

      and access generated artifacts.
  - name: secrets-configuration
    description: >
      Manage application secrets and environment variables securely. Secrets are
      encrypted and injected

      into your application at runtime.
  - name: ai-assistant
    description: >
      Assistant endpoints for making changes to an application using natural
      language.

      Messages are stored per project to maintain conversation history.
  - name: builders
    description: >
      Create and manage builders. Builders are end users or clients who build
      and run apps

      that integrate with Sutro.
  - name: storage
    description: >
      Upload, download, and manage files in object storage. Files are scoped to
      the authenticated

      customer and can optionally be associated with a builder.
paths:
  /applications/{applicationId}/models/{modelId}:
    parameters:
      - name: applicationId
        in: path
        schema:
          type: string
          format: uuid
        required: true
      - name: modelId
        in: path
        schema:
          type: string
          pattern: ^urn:sutro:model:.*$
        required: true
    get:
      tags:
        - data-models
      summary: Get a model from the Application
      operationId: getModel
      responses:
        '200':
          description: The requested model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataModel'
        '404':
          description: Model not found
components:
  schemas:
    DataModel:
      type: object
      required:
        - id
        - name
        - fields
        - accessControl
      properties:
        id:
          type: string
          pattern: '^urn:sutro:model:'
          description: >-
            The unique identifier for the model, e.g.
            urn:sutro:model:supportRequest. Must start with "urn:sutro:model:".
          readOnly: true
        name:
          type: string
          readOnly: true
          description: The name of the model, e.g. Support Request
          examples:
            - Support Request
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
        accessControl:
          $ref: '#/components/schemas/AccessControl'
    Field:
      type: object
      required:
        - id
        - name
        - relationshipOwner
        - min
        - max
        - to
        - accessControl
      properties:
        id:
          type: string
          pattern: '^urn:sutro:edge:'
          description: >-
            The unique identifier for an edge, e.g. urn:sutro:edge:owners. Must
            start with "urn:sutro:edge:".
        name:
          type: string
          description: The name of the field, e.g. user
        relationshipOwner:
          type: boolean
          description: >-
            If true, this field's parent model is the owner of the relationship
            - basically always except if this is a 'belongs to' pointer. Every
            relationship needs to point to another model's field.
        min:
          type: number
          description: The minimum number of values that can be stored in this field
        max:
          oneOf:
            - type: number
            - type: 'null'
          description: The maximum number of values that can be stored in this field
        to:
          oneOf:
            - type: string
              pattern: '^urn:sutro:model:'
              description: >-
                The unique identifier for the model, e.g.
                urn:sutro:model:supportRequest. Must start with
                "urn:sutro:model:".
            - enum:
                - p_TEXT
                - p_IMAGE
                - p_BOOLEAN
                - p_NUMBER
                - p_DATE
                - p_DATE_TIME
                - p_TIME
                - p_ADDRESS
                - p_PHONE_NUMBER
                - p_CURRENCY_AMOUNT
                - p_LINK
                - p_VIDEO
                - p_STAR_RATING
                - p_FILE
          description: The type of the field's value
        accessControl:
          $ref: '#/components/schemas/AccessControl'
        computed:
          type: string
          description: Optional computed expression for the field
        defaultValue:
          description: The default value for the field
        enum:
          type: array
          items:
            oneOf:
              - type: string
              - type: number
              - type: boolean
          description: If set, the field is an enum and can only take on these values
      readOnly: true
    AccessControl:
      type: object
      required:
        - rules
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/AccessRule'
          readOnly: true
        defaultAccess:
          enum:
            - allow
            - deny
          readOnly: true
    AccessRule:
      type: object
      required:
        - access
        - criteria
      properties:
        access:
          enum:
            - allow
            - deny
          readOnly: true
        criteria:
          type: string
          description: This should be a valid SutroExpression that resolves to a boolean
          readOnly: true
  securitySchemes:
    apiAuth:
      description: >-
        Mutual TLS authentication using client certificates. Requires three
        certificate files from your security bundle: `ca.crt` (CA certificate to
        verify the server), `mtls.key` (client private key), and `mtls.crt`
        (client certificate). In curl, use: `--cacert ca.crt --key mtls.key
        --cert mtls.crt`
      type: mutualTLS
    builderAuth:
      description: Builder authentication and authorization
      type: http
      scheme: bearer
      bearerFormat: jwt
    apiClientId:
      description: A unique identifier for the API Client making a request
      type: apiKey
      in: header
      name: x-sutro-api-client

````