Skip to main content
POST
/
o
/
{organisation_id}
/
projects
/
{project_id}
/
environments
/
clone
Clone Environment
curl --request POST \
  --url https://platform.versori.com/api/v2/o/{organisation_id}/projects/{project_id}/environments/clone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "oldEnvName": "<string>",
  "newEnvName": "<string>",
  "executionPool": "<string>",
  "cloneSystems": false,
  "copyStaticUserVariables": false
}
'
{
  "id": "<string>",
  "environments": [
    {
      "id": "<string>",
      "name": "<string>",
      "status": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "publicUrl": "<string>",
      "config": {
        "deploymentSpec": {
          "replicas": 123,
          "autoscaling": {
            "maxReplicas": 123
          },
          "staticIP": true,
          "resources": {
            "limits": {
              "cpu": "<string>",
              "memory": "<string>"
            },
            "requests": {
              "cpu": "<string>",
              "memory": "<string>"
            }
          },
          "serviceAccountName": "<string>"
        }
      },
      "executionPool": "<string>",
      "files": [
        {
          "filename": "<string>",
          "content": "<string>"
        }
      ],
      "labels": {},
      "deployedVersion": {
        "id": "<string>",
        "name": "<string>",
        "state": "draft",
        "createdAt": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "labels": {}
      }
    }
  ],
  "name": "<string>",
  "currentFiles": {
    "files": [
      {
        "filename": "<string>",
        "content": "<string>"
      }
    ],
    "labels": {}
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "settings": {
    "acceptCodeChangesAutomatically": true,
    "testingMockWithAI": true,
    "planningChatVersion": "<string>",
    "chatStoredInDB": true
  },
  "metadata": {
    "sentimentHistory": [
      {
        "timestamp": "2023-11-07T05:31:56Z",
        "sentimentScore": 123,
        "messageId": "<string>"
      }
    ]
  },
  "dynamicVariablesSchema": {}
}

Authorizations

Authorization
string
header
required

Bearer token authentication used by the Versori Platform. External consumers must provide an API key, however internal consumers must provide a JWT id_token issued by our IdP.

Path Parameters

organisation_id
string<ulid>
required
project_id
string<ulid>
required

Body

application/json

CloneEnvironmentRequest is the request payload to clone an environment within a project.

oldEnvName
string
required

The name of the source environment to clone from.

newEnvName
string
required

The name of the new environment to create.

executionPool
string

Optional override execution pool for the new environment. Defaults to the source environment's execution pool.

cloneSystems
boolean
default:false

If true, copies systems from the source environment to the new environment.

copyStaticUserVariables
boolean
default:false

If true, copies static user variables from the source environment to the new environment.

Response

OK

The Project represents a deployable unit within our platform that includes both the functional components (files) and configuration. It serves as the backbone of custom or predefined functionalities, allowing organizations to create, update, and manage APIs and projects.

id
string<ulid>
required

The unique identifier for the project.

environments
object[]
required

List of environments for the project.

name
string
required
currentFiles
object
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
settings
object
required

ProjectSettings hold configuration for the project

metadata
object
required

ProjectMetadata hold metadata for the project

dynamicVariablesSchema
object

DynamicVariablesSchema is the JSON schema for the project's dynamic variables.