Avisi cloud logo
Memberships

Add or update a members inside an environment.

POST
/api/v1/orgs/{organisationSlug}/environments/{environmentSlug}/members/{memberIdentity}

Request Body

application/jsonRequired
kubernetesRolestring
Value in"cluster-admin" | "edit" | "view" | ""

Path Parameters

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

The organisation member identity of the user.

Response Body

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

TypeScript Definitions

Use the response body type in TypeScript.

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/string/members/string" \
  -H "Content-Type: application/json" \
  -d '{
    "kubernetesRole": "cluster-admin"
  }'
const body = JSON.stringify({
  "kubernetesRole": "cluster-admin"
})

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

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

func main() {
  url := "https://api.avisi.cloud/api/v1/orgs/string/environments/string/members/string"
  body := strings.NewReader(`{
    "kubernetesRole": "cluster-admin"
  }`)
  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/string/members/string"
body = {
  "kubernetesRole": "cluster-admin"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
[
  {
    "memberIdentity": "c096b660-64e1-4a6d-94c8-298e866b3d9a",
    "email": "string",
    "kubernetesRole": "cluster-admin",
    "createdAt": "2019-08-24T14:15:22Z"
  }
]
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}
{
  "message": "string",
  "details": [
    "string"
  ]
}