メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
discovery-domains
Create an organization discovery domain
curl --request POST \
  --url https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "<string>",
  "use_for_organization_discovery": true
}
'
import requests

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

payload = {
"domain": "<string>",
"use_for_organization_discovery": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({domain: '<string>', use_for_organization_discovery: true})
};

fetch('https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => '<string>',
'use_for_organization_discovery' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

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

payload := strings.NewReader("{\n \"domain\": \"<string>\",\n \"use_for_organization_discovery\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/organizations/{id}/discovery-domains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"<string>\",\n \"use_for_organization_discovery\": true\n}")
.asString();
require 'uri'
require 'net/http'

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

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"<string>\",\n \"use_for_organization_discovery\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "domain": "<string>",
  "verification_txt": "<string>",
  "verification_host": "<string>",
  "use_for_organization_discovery": true
}

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

ID of the organization.

ボディ

domain
string
必須

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

Required string length: 3 - 255
status
enum<string>

The verification status of the discovery domain.

利用可能なオプション:
pending,
verified
use_for_organization_discovery
boolean

Indicates whether this domain should be used for organization discovery.

レスポンス

Organization discovery domain successfully created.

id
string<organization-discovery-domain-id>
必須

Organization discovery domain identifier.

domain
string
必須

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>
必須

The verification status of the discovery domain.

利用可能なオプション:
pending,
verified
verification_txt
string
必須

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
必須

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.