---
title: "Create perspective"
method: POST
path: "/perspectives"
tags: ["perspectives"]
---

# Create perspective

`POST /perspectives`

Create a new perspective.

## Request body

- object — A named combination of a set of subjects and their samples rendered by a particular lens.
  - `name` string, required — The name of the perspective
  - `rootSubject` string, required — The absolute path of the root subject.
  - `aspectFilter` string[] — Array of aspect names to filter; Aspect name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `aspectTagFilter` string[] — Array of aspect tag names to filter; Tag name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `subjectTagFilter` string[] — Array of subject tag names to filter; Tag name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `aspectFilterType` 'INCLUDE' | 'EXCLUDE'
  - `aspectTagFilterType` 'INCLUDE' | 'EXCLUDE'
  - `subjectTagFilterType` 'INCLUDE' | 'EXCLUDE'
  - `statusFilter` string[] — Array of sample status to filter; Status values can only be one of these: Critical, Invalid, Timeout, Warning, Info, OK, -Critical, -Invalid, -Timeout, -Warning, -Info, -OK.
  - `lensId` string, required — The id of Lens.
  - `owner` string — The name of the user to assign as the owner. Defaults to the user that created it

## Response `201`

Created.

- PerspectivesResponse — A named combination of a set of subjects and their samples rendered by a particular lens.
  - `id` string
  - `name` string — The name of the perspective.
  - `rootSubject` string — The absolute path of the root subject.
  - `aspectFilter` string[] — Array of aspect names to filter; Aspect name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `aspectTagFilter` string[] — Array of aspect tag names to filter; Tag name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `subjectTagFilter` string[] — Array of subject tag names to filter; Tag name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `aspectFilterType` 'INCLUDE' | 'EXCLUDE'
  - `aspectTagFilterType` 'INCLUDE' | 'EXCLUDE'
  - `subjectTagFilterType` 'INCLUDE' | 'EXCLUDE'
  - `statusFilter` string[] — Array of sample status to filter; Status values can only be one of these: Critical, Invalid, Timeout, Warning, Info, OK, -Critical, -Invalid, -Timeout, -Warning, -Info, -OK.
  - `createdBy` string — TODO
  - `createdAt` string — TODO
  - `updatedAt` string — TODO
  - `lensId` string — The id of Lens.
  - `apiLinks` HATEOAS[] — Hypertext As The Engine Of Application State.
    - `href` string, required — URL of the related HATEOAS link you can use for subsequent calls.
    - `rel` string, required — Link relation that describes how this link relates to the previous call.
    - `method` string, required — The HTTP method required for the related call.

## Other responses

- `400` — Bad Request
- `401` — Authentication Error
- `403` — Forbidden
- `default` — Error

---

[API](https://skmtc.dev/salesforce/apis/refocus-api.md) · [All operations](https://skmtc.dev/salesforce/apis/refocus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/salesforce/refocus-api/revisions/42c2153b047e/schema)
