This page is not yet available in Spanish. We are working on its translation.
If you have any questions or feedback about our current translation project, feel free to reach out to us!

List teams

GET  /team

Overview

List all teams linked to your Cloudcraft account.

The response is an array of teams. Each entry includes information about the team, such as the team ID, name, and members.

Respuesta

OK

Expand All

Campo

Tipo

Descripción

createdAt

string

The date and time the team was created.

crossOrganizational

boolean

Whether the team is cross-organizational.

customerId

string

The unique customer ID of the team.

externalSharing

boolean

Whether external sharing is enabled for the team.

id

string

The unique identifier of the team.

members

object

An array of key-value pairs representing the team's members.

name

string

The name of the team.

role

string

The role of the user in the team.

updatedAt

string

The date and time the team was last updated.

visible

boolean

Whether the team is visible to other users.

{
  "createdAt": "2022-01-01T20:54:47.282Z",
  "crossOrganizational": false,
  "customerId": "86e9951e-3764-48d7-b318-969f8a6d180b",
  "externalSharing": true,
  "id": "us46e9aa-5806-4cd6-8e78-c22d58602d09",
  "members": {
    "email": "user@example.org",
    "id": "17cf37c9-578c-4587-acb9-299c5431ad10",
    "mfaEnabled": true,
    "name": "Example User Name",
    "role": "admin",
    "userId": "370809cc-abdc-42ad-bb40-8541ca0dfb1a"
  },
  "name": "Example Team Name",
  "role": "admin",
  "updatedAt": "2022-01-01T20:54:53.963Z",
  "visible": true
}

Unauthorized

Ejemplo de código

curl --location 'https://api.cloudcraft.co/team'
package main

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

func main() {

  url := "https://api.cloudcraft.co/team"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://api.cloudcraft.co/team")
  .method("GET", body)
  .build();
Response response = client.newCall(request).execute();
import http.client

conn = http.client.HTTPSConnection("api.cloudcraft.co")
payload = ''
headers = {}
conn.request("GET", "/team", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require "uri"
require "net/http"

url = URI("https://api.cloudcraft.co/team")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.cloudcraft.co/team", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

PREVIEWING: brett0000FF/node-compatibility