> ## 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 Question

> ### Description
Gets the details of a question

### Details
This API can be used to get information about a single question by ID. To use this API, pass in the `id` that was returned from your Create Question API call as a path parameter.

Review the response schema to see the fields that will be returned.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml get /v4/questions/{question_id}
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/questions/{question_id}:
    get:
      tags:
        - Questions
      summary: Get Question
      description: >-
        ### Description

        Gets the details of a question


        ### Details

        This API can be used to get information about a single question by ID.
        To use this API, pass in the `id` that was returned from your Create
        Question API call as a path parameter.


        Review the response schema to see the fields that will be returned.
      operationId: GET-V4-/questions/{question_id}
      parameters:
        - name: question_id
          in: path
          required: true
          schema:
            type: string
            title: Question Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionResponse'
        '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
            )
            question = client.questions.retrieve(
                "question_id",
            )
            print(question.id)
        - 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\tquestion, err := client.Questions.Get(context.TODO(), \"question_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", question.ID)\n}\n"
components:
  schemas:
    QuestionResponse:
      properties:
        type:
          $ref: '#/components/schemas/QuestionORMTypeEnum'
          description: The type of question
        title:
          type: string
          title: Title
        prompt:
          type: string
          title: Prompt
        choices:
          title: Choices
          description: >-
            List of choices for the question. Required for CATEGORICAL
            questions.
          items:
            $ref: '#/components/schemas/CategoricalChoice'
          type: array
        ratingOptions:
          $ref: '#/components/schemas/RatingQuestionOptions'
          description: Options for rating questions.
        numberOptions:
          $ref: '#/components/schemas/NumberQuestionOptions'
          description: Options for number questions.
        freeTextOptions:
          $ref: '#/components/schemas/FreeTextQuestionOptions'
          description: Options for free text questions.
        multi:
          title: Multi
          description: Whether the question allows multiple answers.
          type: boolean
        dropdown:
          title: Dropdown
          description: Whether the question is displayed as a dropdown in the UI.
          type: boolean
        required:
          title: Required
          description: >-
            [To be deprecated in favor of question set question_id_to_config]
            Whether the question is required.
          type: boolean
        conditions:
          title: Conditions
          description: Conditions for the question to be shown.
          items:
            additionalProperties: true
            type: object
          type: array
        default:
          title: Default
          description: The default value for the question.
        form_schema:
          title: Form Schema
          description: The schema for the question.
          additionalProperties: true
          type: object
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
      type: object
      required:
        - type
        - title
        - prompt
        - id
        - created_at
        - account_id
        - created_by_user_id
        - created_by_identity_type
      title: QuestionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuestionORMTypeEnum:
      type: string
      enum:
        - categorical
        - free_text
        - rating
        - number
        - form
        - timestamp
      title: QuestionORMTypeEnum
    CategoricalChoice:
      properties:
        label:
          title: Label
          type: string
        value:
          anyOf:
            - type: string
            - type: integer
            - type: boolean
            - type: number
          title: Value
        audit_required:
          type: boolean
          title: Audit Required
          default: false
      type: object
      required:
        - label
        - value
      title: CategoricalChoice
    RatingQuestionOptions:
      properties:
        minLabel:
          type: string
          title: Minlabel
          description: Minimum value for the rating
        maxLabel:
          type: string
          title: Maxlabel
          description: Maximum value for the rating
        scaleSteps:
          type: integer
          title: Scalesteps
          description: Number of steps in the rating scale
      type: object
      required:
        - minLabel
        - maxLabel
        - scaleSteps
      title: RatingQuestionOptions
    NumberQuestionOptions:
      properties:
        min:
          title: Min
          description: Minimum value for the number
          type: number
        max:
          title: Max
          description: Maximum value for the number
          type: number
      type: object
      title: NumberQuestionOptions
    FreeTextQuestionOptions:
      properties:
        characterLimit:
          $ref: '#/components/schemas/CharacterLimit'
      type: object
      required:
        - characterLimit
      title: FreeTextQuestionOptions
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    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
    CharacterLimit:
      properties:
        min:
          type: integer
          title: Min
          description: Minimum number of characters
          default: 50
        max:
          type: integer
          title: Max
          description: Maximum number of characters
          default: 1000
      type: object
      title: CharacterLimit

````