List organizations
curl --request GET \
--url https://identity.nks.europe-west4.nscale.com/api/v1/organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://identity.nks.europe-west4.nscale.com/api/v1/organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://identity.nks.europe-west4.nscale.com/api/v1/organizations', 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://identity.nks.europe-west4.nscale.com/api/v1/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://identity.nks.europe-west4.nscale.com/api/v1/organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://identity.nks.europe-west4.nscale.com/api/v1/organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.nks.europe-west4.nscale.com/api/v1/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"metadata": {
"id": "a142f641-7fd6-4ab9-a875-344c7ebadc53",
"name": "acme-corp",
"creationTime": "2024-05-31T14:11:00Z",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"organizationType": "domain",
"domain": "acme.corp",
"providerID": "b6ec241d-e3b4-4afc-a7aa-500fcb650d8e"
}
}
]{
"error": "access_denied",
"error_description": "authentication failed"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges"
}{
"error": "not_found",
"error_description": "the requested resource does not exist"
}{
"error": "server_error",
"error_description": "failed to token claim"
}Organizations
List organizations
Returns a list of organizations that the user is a member of. If an email address is provided in the query this allows a user with sufficient privilege to check if a given user is a member of any organizations.
GET
/
api
/
v1
/
organizations
List organizations
curl --request GET \
--url https://identity.nks.europe-west4.nscale.com/api/v1/organizations \
--header 'Authorization: Bearer <token>'import requests
url = "https://identity.nks.europe-west4.nscale.com/api/v1/organizations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://identity.nks.europe-west4.nscale.com/api/v1/organizations', 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://identity.nks.europe-west4.nscale.com/api/v1/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://identity.nks.europe-west4.nscale.com/api/v1/organizations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://identity.nks.europe-west4.nscale.com/api/v1/organizations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity.nks.europe-west4.nscale.com/api/v1/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"metadata": {
"id": "a142f641-7fd6-4ab9-a875-344c7ebadc53",
"name": "acme-corp",
"creationTime": "2024-05-31T14:11:00Z",
"provisioningStatus": "provisioned",
"healthStatus": "healthy"
},
"spec": {
"organizationType": "domain",
"domain": "acme.corp",
"providerID": "b6ec241d-e3b4-4afc-a7aa-500fcb650d8e"
}
}
]{
"error": "access_denied",
"error_description": "authentication failed"
}{
"error": "forbidden",
"error_description": "user credentials do not have the required privileges"
}{
"error": "not_found",
"error_description": "the requested resource does not exist"
}{
"error": "server_error",
"error_description": "failed to token claim"
}Authorizations
Operation requires OAuth 2.0 bearer token authentication.
Query Parameters
A user's email address.
Was this page helpful?
⌘I