List all organisations
curl --request GET \
--url https://{tenant}/admin/organisations \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/organisations"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/organisations', 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://{tenant}/admin/organisations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$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://{tenant}/admin/organisations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<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://{tenant}/admin/organisations")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organisations": [
{
"apis": [
{
"api_human_name": "First API #Test",
"api_id": "5508bd9429434d5768c423a04db259ea"
}
],
"cname": "jive.ly",
"cname_enabled": true,
"developer_count": 0,
"developer_quota": 0,
"event_options": {},
"hybrid_enabled": false,
"id": "5cc03283d07e7f00019404b3",
"org_options_meta": {},
"owner_name": "Jively",
"owner_slug": "testorg",
"ui": {
"cloud": false,
"default_lang": "",
"designer": {},
"dont_allow_license_management": false,
"dont_allow_license_management_view": false,
"dont_show_admin_sockets": false,
"hide_help": false,
"languages": {},
"login_page": {},
"nav": {},
"portal_section": {},
"uptime": {}
}
},
{
"apis": [],
"cname": "second.ly",
"cname_enabled": false,
"developer_count": 5,
"developer_quota": 10,
"event_options": {},
"hybrid_enabled": true,
"id": "5ccae84aa402ce00018b5435",
"org_options_meta": {},
"owner_name": "SecondOrg",
"owner_slug": "secondorg",
"ui": {
"cloud": false,
"default_lang": "",
"designer": {},
"dont_allow_license_management": false,
"dont_allow_license_management_view": false,
"dont_show_admin_sockets": false,
"hide_help": false,
"languages": {},
"login_page": {},
"nav": {},
"portal_section": {},
"uptime": {}
}
}
],
"pages": 0
}{
"Message": "Could not retrieve Organisations",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to unmarshal orgs data from Tyk API",
"Meta": null,
"Status": "Error"
}Organisations
List all organisations
List all organisations
GET
/
admin
/
organisations
List all organisations
curl --request GET \
--url https://{tenant}/admin/organisations \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/organisations"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/organisations', 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://{tenant}/admin/organisations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$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://{tenant}/admin/organisations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<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://{tenant}/admin/organisations")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/organisations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"organisations": [
{
"apis": [
{
"api_human_name": "First API #Test",
"api_id": "5508bd9429434d5768c423a04db259ea"
}
],
"cname": "jive.ly",
"cname_enabled": true,
"developer_count": 0,
"developer_quota": 0,
"event_options": {},
"hybrid_enabled": false,
"id": "5cc03283d07e7f00019404b3",
"org_options_meta": {},
"owner_name": "Jively",
"owner_slug": "testorg",
"ui": {
"cloud": false,
"default_lang": "",
"designer": {},
"dont_allow_license_management": false,
"dont_allow_license_management_view": false,
"dont_show_admin_sockets": false,
"hide_help": false,
"languages": {},
"login_page": {},
"nav": {},
"portal_section": {},
"uptime": {}
}
},
{
"apis": [],
"cname": "second.ly",
"cname_enabled": false,
"developer_count": 5,
"developer_quota": 10,
"event_options": {},
"hybrid_enabled": true,
"id": "5ccae84aa402ce00018b5435",
"org_options_meta": {},
"owner_name": "SecondOrg",
"owner_slug": "secondorg",
"ui": {
"cloud": false,
"default_lang": "",
"designer": {},
"dont_allow_license_management": false,
"dont_allow_license_management_view": false,
"dont_show_admin_sockets": false,
"hide_help": false,
"languages": {},
"login_page": {},
"nav": {},
"portal_section": {},
"uptime": {}
}
}
],
"pages": 0
}{
"Message": "Could not retrieve Organisations",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to unmarshal orgs data from Tyk API",
"Meta": null,
"Status": "Error"
}Was this page helpful?
⌘I