---
title: "Retrieve a view definition"
url: "https://developer-beta.morningstar.com/apis/investment-details-feed-api/versions/bc1f8f4b-464c-40a5-af50-a06cce9f3980/operations/getView"
---

> Full API specification: https://developer-beta.morningstar.com/apis/investment-details-feed-api/versions/bc1f8f4b-464c-40a5-af50-a06cce9f3980.md

# Retrieve a view definition

`GET` `/direct-web-services/v1/investments/views/{viewId}`

Operation ID: `getView`

## Path parameters

- `viewId` (string, required)

## Responses

- `200` - OK
- `400` - 400
- `500` - 500

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Investment Details Feed API
  version: "1.0"
servers:
  - url: https://www.us-api.morningstar.com
    description: Americas
  - url: https://www.apac-api.morningstar.com
    description: APAC
  - url: https://www.emea-api.morningstar.com
    description: EMEA
paths:
  /direct-web-services/v1/investments/views/{viewId}:
    get:
      summary: Retrieve a view definition
      parameters:
        - name: viewId
          in: path
          required: true
          schema:
            type: string
      tags:
        - Utility Endpoints
      operationId: getView
      responses:
        "200":
          $ref: "#/components/responses/ResponseGetView"
        "400":
          $ref: "#/components/responses/ResponseBadRequest"
        "500":
          $ref: "#/components/responses/ResponseInternalServerError"
security:
  - Bearer: []
components:
  responses:
    ResponseGetView:
      description: OK
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ResponseGetView"
    ResponseBadRequest:
      description: "400"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/OutputErrorDetails"
    ResponseInternalServerError:
      description: "500"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/OutputErrorDetails"
  schemas:
    ResponseGetView:
      title: ResponseGetView
      type: object
      description: |-
        Response containing a view definition and the datapoints included in the
        view.
      required:
        - viewDefinition
        - metadata
      properties:
        viewDefinition:
          $ref: "#/components/schemas/OutputViewDefinition"
        metadata:
          $ref: "#/components/schemas/OutputMetadata"
      additionalProperties: false
    OutputErrorDetails:
      type: object
      properties:
        statusCode:
          type: integer
          description: Status Code
          format: int32
        errorCode:
          type: string
          description: Custom error code
          nullable: true
        message:
          type: string
          description: Message
          nullable: true
        requestId:
          type: string
          description: RequestId
          nullable: true
      additionalProperties: false
      description: Error details
      title: OutputErrorDetails
    OutputViewDefinition:
      title: OutputViewDefinition
      type: object
      description: Definition of a view, including the datapoints it contains.
      required:
        - id
        - dataPoints
      properties:
        id:
          $ref: "#/components/schemas/OutputViewId"
        dataPoints:
          type: array
          description: List of data points included in the view.
          items:
            $ref: "#/components/schemas/OutputViewDefinitionDataPoint"
      additionalProperties: false
    OutputMetadata:
      type: object
      properties:
        requestId:
          type: string
          nullable: true
        time:
          type: string
          format: date-time
          readOnly: true
        portfolioDate:
          type: string
          nullable: true
        portfolioCurrency:
          type: string
          nullable: true
        messages:
          type: array
          items:
            $ref: "#/components/schemas/OutputMetadataMessages"
          nullable: true
      additionalProperties: false
      title: OutputMetadata
    OutputViewId:
      title: OutputViewId
      type: string
      description: >
        Identifier of an entitled view or dataset. Use this value as `viewId` in
        investment detail requests.
      minLength: 1
      example: equity-short-interest
    OutputViewDefinitionDataPoint:
      title: OutputViewDefinitionDataPoint
      type: object
      description: Datapoint included in the view and its dependency flags
      required:
        - id
        - isLanguageDependent
        - isCountryDependent
        - isCurrencyDependent
      properties:
        id:
          $ref: "#/components/schemas/OutputDataPointId"
        isLanguageDependent:
          type: boolean
          description: Indicates whether the datapoint varies by language.
        isCountryDependent:
          type: boolean
          description: Indicates whether the datapoint varies by country.
        isCurrencyDependent:
          type: boolean
          description: Indicates whether the datapoint varies by currency.
      additionalProperties: false
    OutputMetadataMessages:
      type: object
      properties:
        type:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
        investments:
          type: array
          items:
            $ref: "#/components/schemas/OutputInvalidInvestments"
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
      title: OutputMetadataMessages
    OutputDataPointId:
      title: OutputDataPointId
      type: string
      description: Fully-qualified datapoint identifier.
      minLength: 1
      example: shortInterest.daysToCover
    OutputInvalidInvestments:
      type: object
      properties:
        id:
          type: string
          nullable: true
        idType:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        datapointId:
          type: array
          items:
            type: string
          nullable: true
        errorCode:
          type: string
          nullable: true
        performanceId:
          type: string
          description: Performance ID (if not passed in request).
          nullable: true
        companyId:
          type: string
          description: Company ID (if not passed in request).
          nullable: true
        baseCurrency:
          type: string
          description: Input base currency used to look up Investment identifier
          nullable: true
        domicile:
          type: string
          description: Input domicile used to look up Investment identifier.
          nullable: true
        exchangeCountry:
          type: string
          description: Input exchange country used to look up Investment identifier.
          nullable: true
        exchangeId:
          type: string
          description: Input exchange id used to look up Investment identifier.
          nullable: true
      additionalProperties: false
      title: OutputInvalidInvestments
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: "JWT obtained from `POST /token/oauth`. Send it on every request as
        `Authorization: Bearer <token>`. Reuse the token for up to 60 minutes,
        then request a new one."
```
