Passer au contenu principal
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
discovery-domains
/
name
/
{discovery_domain}
Retrieve an organization discovery domain by domain name
curl --request GET \
  --url https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}', 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://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}",
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://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}"

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://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains/name/{discovery_domain}")

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
{
  "id": "<string>",
  "domain": "<string>",
  "verification_txt": "<string>",
  "verification_host": "<string>",
  "use_for_organization_discovery": true
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

ID of the organization.

discovery_domain
string
requis

Domain name of the discovery domain.

Required string length: 3 - 255

Réponse

Organization discovery domain successfully retrieved.

id
string<organization-discovery-domain-id>
requis

Organization discovery domain identifier.

domain
string
requis

The domain name to associate with the organization e.g. acme.com.

Required string length: 3 - 255
Pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$
status
enum<string>
requis

The verification status of the discovery domain.

Options disponibles:
pending,
verified
verification_txt
string
requis

A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership.

verification_host
string
requis

The full domain where the TXT record should be added.

use_for_organization_discovery
boolean

Indicates whether this domain should be used for organization discovery.