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

# Get Application Schemas



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/application-schemas
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/application-schemas:
    get:
      tags:
        - Applications
      summary: Get Application Schemas
      operationId: GET-V4-/application-schemas
      parameters:
        - name: version
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ApplicationSchemaVersion'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/ApplicationNodeSchemaRegistryRecord'
                propertyNames:
                  $ref: '#/components/schemas/NodeSchemaId'
                title: Response Get-V4-/Application-Schemas
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from scale_gp import SGPClient

            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )
            application_schema = client.application_schemas.retrieve(
                version="OFFLINE",
            )
            print(application_schema)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tapplicationSchema, err := client.ApplicationSchemas.Get(context.TODO(), sgp.ApplicationSchemaGetParams{\n\t\tVersion: sgp.F(sgp.ApplicationSchemaGetParamsVersionOffline),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", applicationSchema)\n}\n"
components:
  schemas:
    ApplicationSchemaVersion:
      type: string
      enum:
        - OFFLINE
        - V0
        - AGENTS_SERVICE
      title: ApplicationSchemaVersion
      description: >-
        An enum representing the version states of an application and its nodes'
        schemas.

        Attributes:
            V0: The initial version of an application schema.
            AGENTS_SERVICE: Application schema references egp_services definition.
            OFFLINE: Application schema for applications that do not run on SGP directly.
    ApplicationNodeSchemaRegistryRecord:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        type:
          $ref: '#/components/schemas/ApplicationNodeType'
        version:
          $ref: '#/components/schemas/ApplicationSchemaVersion'
        nodeSchema:
          $ref: '#/components/schemas/ApplicationNodeSchema'
        tags:
          items:
            $ref: '#/components/schemas/ApplicationNodeTagType'
          type: array
          title: Tags
      type: object
      required:
        - id
        - name
        - type
        - version
        - nodeSchema
        - tags
      title: ApplicationNodeSchemaRegistryRecord
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApplicationNodeType:
      type: string
      enum:
        - TEXT_INPUT_NODE
        - TEXT_OUTPUT_NODE
        - KNOWLEDGE_BASE_INPUT_NODE
        - KNOWLEDGE_BASE_NODE
        - MULTI_KNOWLEDGE_BASE_INPUT_NODE
        - MULTI_KNOWLEDGE_BASE_NODE
        - RERANKER_NODE
        - PROMPT_ENGINEERING_NODE
        - COMPLETION_MODEL_INPUT_NODE
        - COMPLETION_MODEL_NODE
        - EXTERNAL_ENDPOINT_NODE
        - DOCUMENT_INPUT_NODE
        - MAP_REDUCE_NODE
        - DOCUMENT_SEARCH_NODE
        - DOCUMENT_PROMPT_NODE
      title: ApplicationNodeType
    ApplicationNodeSchema:
      properties:
        configuration:
          additionalProperties:
            anyOf:
              - $ref: '#/components/schemas/NumberConfigurationFieldSchema'
              - $ref: '#/components/schemas/StringConfigurationFieldSchema'
              - $ref: '#/components/schemas/BoolConfigurationFieldSchema'
          type: object
          title: Configuration
        inputs:
          additionalProperties:
            $ref: '#/components/schemas/NodeInput'
          type: object
          title: Inputs
        outputs:
          additionalProperties:
            $ref: '#/components/schemas/NodeOutput'
          type: object
          title: Outputs
      type: object
      required:
        - configuration
        - inputs
        - outputs
      title: ApplicationNodeSchema
    ApplicationNodeTagType:
      type: string
      enum:
        - INPUT_NODE
        - OUTPUT_NODE
        - RAG_NODE
      title: ApplicationNodeTagType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    NumberConfigurationFieldSchema:
      properties:
        label:
          title: Label
          type: string
        docs:
          title: Docs
          type: string
        default:
          anyOf:
            - type: integer
            - type: number
          title: Default
        is_advanced_configuration:
          title: Is Advanced Configuration
          default: false
          type: boolean
        type:
          type: string
          const: NUMBER
          title: Type
          default: NUMBER
        validation_rules:
          $ref: '#/components/schemas/NumberValidationRule'
        is_float:
          title: Is Float
          default: false
          type: boolean
      type: object
      required:
        - label
        - docs
        - validation_rules
      title: NumberConfigurationFieldSchema
    StringConfigurationFieldSchema:
      properties:
        label:
          title: Label
          type: string
        docs:
          title: Docs
          type: string
        default:
          title: Default
          type: boolean
        is_advanced_configuration:
          title: Is Advanced Configuration
          default: false
          type: boolean
        type:
          type: string
          const: TEXT
          title: Type
          default: TEXT
        validation_rules:
          $ref: '#/components/schemas/StringValidationRule'
      type: object
      required:
        - label
        - docs
        - validation_rules
      title: StringConfigurationFieldSchema
    BoolConfigurationFieldSchema:
      properties:
        label:
          title: Label
          type: string
        docs:
          title: Docs
          type: string
        default:
          title: Default
          type: boolean
        is_advanced_configuration:
          title: Is Advanced Configuration
          default: false
          type: boolean
        type:
          type: string
          const: BOOL
          title: Type
          default: BOOL
        validation_rules:
          $ref: '#/components/schemas/BaseValidationRule'
      type: object
      required:
        - label
        - docs
        - validation_rules
      title: BoolConfigurationFieldSchema
    NodeInput:
      properties:
        name:
          type: string
          title: Name
        label:
          title: Label
          type: string
        docs:
          title: Docs
          type: string
        type:
          $ref: '#/components/schemas/ApplicationConfigurationValueType'
        required:
          title: Required
          type: boolean
        is_hidden:
          title: Is Hidden
          default: false
          type: boolean
      type: object
      required:
        - name
        - label
        - docs
        - type
        - required
      title: NodeInput
    NodeOutput:
      properties:
        name:
          type: string
          title: Name
        label:
          title: Label
          type: string
        docs:
          title: Docs
          type: string
        type:
          $ref: '#/components/schemas/ApplicationConfigurationValueType'
      type: object
      required:
        - name
        - label
        - docs
        - type
      title: NodeOutput
    NumberValidationRule:
      properties:
        required:
          title: Required
          type: boolean
        min_value:
          title: Min Value
          type: integer
        max_value:
          title: Max Value
          type: integer
      type: object
      required:
        - required
        - min_value
        - max_value
      title: NumberValidationRule
    StringValidationRule:
      properties:
        required:
          title: Required
          type: boolean
        regex_pattern:
          title: Regex Pattern
          type: string
      type: object
      required:
        - required
      title: StringValidationRule
    BaseValidationRule:
      properties:
        required:
          title: Required
          type: boolean
      type: object
      required:
        - required
      title: BaseValidationRule
    ApplicationConfigurationValueType:
      type: string
      enum:
        - TEXT
        - STRING_ARRAY
        - NUMBER
        - BOOL
        - CHUNK_ARRAY
        - DOCUMENT_ARRAY
        - KNOWLEDGE_BASE_ID
        - KNOWLEDGE_BASE_ID_ARRAY
        - COMPLETION_MODEL_ID
      title: ApplicationConfigurationValueType
      description: >-
        Represents the possible types of values for an application
        configuration, inputs and outputs.


        The available types are:

        - TEXT: Represents a single line of text.

        - STRING_ARRAY: Represents an array of strings.

        - NUMBER: Represents a numeric value.

        - BOOL: Represents a boolean value.

        - CHUNK_ARRAY: Represents an array of chunks.

        - DOCUMENT_ARRAY: Represents an array of documents.

        - KNOWLEDGE_BASE_ID: Represents the ID of a knowledge base.

        - KNOWLEDGE_BASE_ID_ARRAY: Represents an array of knowledge base IDs.

        - COMPLETION_MODEL_ID: Represents the ID of a completion model.

````