# Upsert a Perspective to an Environment.

Adds a perspective to an environment, or updates an existing. An Environment can only have one Perspective

Endpoint: PUT /cf/admin/environments/perspectives
Version: 1.0
Security: x-api-key

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier

  - `orgIdentifier` (string, required)
    Organization Identifier

  - `projectIdentifier` (string, required)
    The Project identifier

  - `environmentIdentifier` (string, required)
    Environment Identifier

## Request fields (application/json):

  - `perspectiveIdentifier` (string, required)
    Example: "12345"

  - `perspectiveName` (string, required)
    Example: "myCluster"

## Response 200 fields (application/json):

  - `createdAt` (integer, required)
    The date the key was created at in milliseconds

  - `environmentId` (string, required)
    The ID of the Environment
    Example: "67891"

  - `perspectiveId` (string, required)
    The ID of the Perspective
    Example: "12345"

  - `perspectiveIdentifier` (string, required)
    The Identifier/Common Name of the Perspective
    Example: "myCluster"

  - `updatedAt` (integer, required)
    The date the key was last updated at in milliseconds

## Response 400 fields (application/json):

  - `code` (string, required)
    The http error code
    Example: 404

  - `details` (object)
    Additional details about the error

  - `message` (string, required)
    The reason the request failed
    Example: "Error retrieving projects, organization 'default_org' does not exist"


