Avisi cloud logo
Environments

Create an environments in an organisation.

POST
/api/v1/orgs/{organisationSlug}/environments

Request Body

application/jsonRequired
namestring
Pattern"^[a-zA-Z0-9\\-\\s&]*$"
Length1 <= length <= 25
purpose?string
Lengthlength <= 255
type?string
Value in"production" | "staging" | "development" | "demo" | "other"
description?string
Lengthlength <= 500

Path Parameters

organisationSlugstring
Pattern"^[a-z0-9-]+$"

Response Body

Request was successfully processed. The response body contains the requested data.

TypeScript Definitions

Use the response body type in TypeScript.

id?integer
Format"int64"
identity?string
Format"uuid"
name?string
purpose?string
type?string
description?string
createdAt?string
Format"date-time"
modifiedAt?string
Format"date-time"
deletedAt?string
Format"date-time"
totalClusters?integer
Format"int64"
totalCpu?integer
Format"int64"
totalMemory?integer
Format"int64"
slug?object
organisationSlug?object

Invalid request parameters. Please review the documentation for valid parameter values.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

You do not have the necessary permissions to access this resource.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

The requested resource could not be found. Please check the resource URL or identifier.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown

An internal error occurred on the server.

TypeScript Definitions

Use the response body type in TypeScript.

response?unknown
curl -X POST "https://api.avisi.cloud/api/v1/orgs/string/environments" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'
const body = JSON.stringify({
  "name": "string"
})

fetch("https://api.avisi.cloud/api/v1/orgs/string/environments", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.avisi.cloud/api/v1/orgs/string/environments"
  body := strings.NewReader(`{
    "name": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.avisi.cloud/api/v1/orgs/string/environments"
body = {
  "name": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "id": 0,
  "identity": "10a80a7a-1a32-4a74-b592-aa2a4ef691c5",
  "name": "string",
  "purpose": "string",
  "type": "string",
  "description": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "modifiedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "totalClusters": 0,
  "totalCpu": 0,
  "totalMemory": 0,
  "slug": {
    "slugValue": "string"
  },
  "organisationSlug": {
    "slugValue": "string"
  }
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}