Documentation
API
Team API
Fetch a team and its members with the WebTranslateIt Team API, with curl, JavaScript, Python, Ruby and PHP examples.
2 min read
The Team API is composed of 1 endpoint:
Show Team
This endpoint is accessible by the read-only or read-write Organization API key which you can find in your organization settings. It returns information about your Team:
- Team name,
- Team description,
- A list of projects of the Team is assigned to.
The call should be made using a GET request.
/api/organizations/:organization_token/teams/:team_id.format [GET]
Where :team_id is the ID of the Team that can be gotten on the Organization API. format is one of xml, json or yaml.
GET
/api/organizations/:organization_token/teams/:team_id.jsoncurl "https://webtranslateit.com/api/organizations/ORGANIZATION_TOKEN/teams/1.json"
const response = await fetch(
'https://webtranslateit.com/api/organizations/ORGANIZATION_TOKEN/teams/1.json'
)
const team = await response.json()
import requests
response = requests.get(
"https://webtranslateit.com/api/organizations/ORGANIZATION_TOKEN/teams/1.json"
)
team = response.json()
require 'net/http'
require 'json'
uri = URI('https://webtranslateit.com/api/organizations/ORGANIZATION_TOKEN/teams/1.json')
team = JSON.parse(Net::HTTP.get(uri))
<?php
$ch = curl_init('https://webtranslateit.com/api/organizations/ORGANIZATION_TOKEN/teams/1.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$team = json_decode(curl_exec($ch), true);
curl_close($ch);
Data structure in JSON:
json
{
"id": 1,
"name": "The A Team!",
"description": "I\u2019ve had a few teams, but this is my best team",
"created_at": "2017-03-29T13:19:09Z",
"updated_at": "2017-04-03T09:05:31Z",
"projects": [{
"id": 386
}, {
"id": 399
}, {
"id": 406
}]
}
:team_id comes from the teams array of the Organization API.