List Teams
curl --request GET \
--url https://public-api.frictio.ai/v1/teams \
--header 'X-Api-Key: <api-key>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://public-api.frictio.ai/v1/teams"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://public-api.frictio.ai/v1/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.frictio.ai/v1/teams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.frictio.ai/v1/teams"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.frictio.ai/v1/teams")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.frictio.ai/v1/teams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "b2c3d4e5-...",
"name": "営業チーム",
"member_ids": [
"c3d4e5f6-..."
]
}
],
"pagination": {
"page": 1,
"limit": 50,
"total_size": 123,
"total_pages": 3
}
}{
"statusCode": 401,
"message": "Invalid API key",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Forbidden"
}{
"statusCode": 429,
"message": "Too Many Requests"
}API Reference
List Teams
ワークスペース内のチームを一覧で取得します。
チーム名の昇順で返却されます。
member_ids は Members API(/v1/members)の id と突合できます。
GET
/
v1
/
teams
List Teams
curl --request GET \
--url https://public-api.frictio.ai/v1/teams \
--header 'X-Api-Key: <api-key>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://public-api.frictio.ai/v1/teams"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', 'X-Api-Key': '<api-key>'}
};
fetch('https://public-api.frictio.ai/v1/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.frictio.ai/v1/teams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.frictio.ai/v1/teams"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.frictio.ai/v1/teams")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.frictio.ai/v1/teams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "b2c3d4e5-...",
"name": "営業チーム",
"member_ids": [
"c3d4e5f6-..."
]
}
],
"pagination": {
"page": 1,
"limit": 50,
"total_size": 123,
"total_pages": 3
}
}{
"statusCode": 401,
"message": "Invalid API key",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Forbidden"
}{
"statusCode": 429,
"message": "Too Many Requests"
}Authorizations
Headers
ワークスペースID
Query Parameters
ページ番号(1始まり、デフォルト1)
Required range:
x >= 11ページあたりの取得件数(1〜200、デフォルト50)
Required range:
1 <= x <= 200⌘I