C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Experimentation;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Experimentation.Segments.ListAsync(
new ListSegmentsRequestParameters {
From = "from",
Take = 1,
Type = SegmentTypeFilterEnum.Auth0
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters;
import com.auth0.client.mgmt.types.SegmentTypeFilterEnum;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.experimentation().segments().list(
ListSegmentsRequestParameters
.builder()
.from("from")
.take(1)
.type(SegmentTypeFilterEnum.AUTH_0)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Experimentation\Segments\Requests\ListSegmentsRequestParameters;
use Auth0\SDK\API\Management\Types\SegmentTypeFilterEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->experimentation->segments->list(
new ListSegmentsRequestParameters([
'from' => 'from',
'take' => 1,
'type' => SegmentTypeFilterEnum::Auth0->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.experimentation.segments.list(
from="from",
take=1,
type="auth0",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.experimentation.segments.list(
from: "from",
take: 1,
type: "auth0"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/experimentation/segments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/experimentation/segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/experimentation/segments"
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))
}{
"segments": [
{
"id": "<string>",
"name": "<string>",
"rules": [
{
"match": {
"client_id": [
"<string>"
],
"connection": [
"<string>"
],
"connection_type": [
"<string>"
],
"organization_id": [
"<string>"
],
"domain": [
"<string>"
],
"device_type": [
"<string>"
],
"browser": [
"<string>"
],
"platform": [
"<string>"
],
"user_agent": [
"<string>"
],
"country": [
"<string>"
],
"region": [
"<string>"
]
},
"not_match": {
"client_id": [
"<string>"
],
"connection": [
"<string>"
],
"connection_type": [
"<string>"
],
"organization_id": [
"<string>"
],
"domain": [
"<string>"
],
"device_type": [
"<string>"
],
"browser": [
"<string>"
],
"platform": [
"<string>"
],
"user_agent": [
"<string>"
],
"country": [
"<string>"
],
"region": [
"<string>"
]
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"next": "<string>"
}List segments for the tenant.
Retrieve a paginated list of segments for the tenant.
GET
https://{tenantDomain}/api/v2
/
experimentation
/
segments
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Experimentation;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Experimentation.Segments.ListAsync(
new ListSegmentsRequestParameters {
From = "from",
Take = 1,
Type = SegmentTypeFilterEnum.Auth0
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.experimentation.types.ListSegmentsRequestParameters;
import com.auth0.client.mgmt.types.SegmentTypeFilterEnum;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.experimentation().segments().list(
ListSegmentsRequestParameters
.builder()
.from("from")
.take(1)
.type(SegmentTypeFilterEnum.AUTH_0)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Experimentation\Segments\Requests\ListSegmentsRequestParameters;
use Auth0\SDK\API\Management\Types\SegmentTypeFilterEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->experimentation->segments->list(
new ListSegmentsRequestParameters([
'from' => 'from',
'take' => 1,
'type' => SegmentTypeFilterEnum::Auth0->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.experimentation.segments.list(
from="from",
take=1,
type="auth0",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.experimentation.segments.list(
from: "from",
take: 1,
type: "auth0"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/experimentation/segments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/experimentation/segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/experimentation/segments"
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))
}{
"segments": [
{
"id": "<string>",
"name": "<string>",
"rules": [
{
"match": {
"client_id": [
"<string>"
],
"connection": [
"<string>"
],
"connection_type": [
"<string>"
],
"organization_id": [
"<string>"
],
"domain": [
"<string>"
],
"device_type": [
"<string>"
],
"browser": [
"<string>"
],
"platform": [
"<string>"
],
"user_agent": [
"<string>"
],
"country": [
"<string>"
],
"region": [
"<string>"
]
},
"not_match": {
"client_id": [
"<string>"
],
"connection": [
"<string>"
],
"connection_type": [
"<string>"
],
"organization_id": [
"<string>"
],
"domain": [
"<string>"
],
"device_type": [
"<string>"
],
"browser": [
"<string>"
],
"platform": [
"<string>"
],
"user_agent": [
"<string>"
],
"country": [
"<string>"
],
"region": [
"<string>"
]
}
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"next": "<string>"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
クエリパラメータ
Optional Id from which to start selection.
Number of segments to return per page. Defaults to 25, maximum 50.
必須範囲:
1 <= x <= 50Filter by type. Exact match.
利用可能なオプション:
auth0, self ⌘I