import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.resourceServers.search({
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.resourceServers.search({
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier",
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.SearchResourceServersRequestParameters{
Q: management.String(
"q",
),
Parser: management.SearchParserEnumSCIM.Ptr(),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
Take: management.Int(
1,
),
From: management.String(
"from",
),
Sort: management.ResourceServerSortFieldEnumIdentifier.Ptr(),
}
mgmt.ResourceServers.Search(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "resource-servers/search" --query "q=q" --query "parser=scim" --query "fields=fields" --query "include_fields=true" --query "take=1" --query "from=from" --query "sort=identifier"using Auth0.ManagementApi;
using System.Threading.Tasks;
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.ResourceServers.SearchAsync(
new SearchResourceServersRequestParameters {
Q = "q",
Parser = SearchParserEnum.Scim,
Fields = "fields",
IncludeFields = true,
Take = 1,
From = "from",
Sort = ResourceServerSortFieldEnum.Identifier
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.ResourceServerSortFieldEnum;
import com.auth0.client.mgmt.types.SearchParserEnum;
import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.resourceServers().search(
SearchResourceServersRequestParameters
.builder()
.q("q")
.parser(SearchParserEnum.SCIM)
.fields("fields")
.includeFields(true)
.take(1)
.from("from")
.sort(ResourceServerSortFieldEnum.IDENTIFIER)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\ResourceServers\Requests\SearchResourceServersRequestParameters;
use Auth0\SDK\API\Management\Types\SearchParserEnum;
use Auth0\SDK\API\Management\Types\ResourceServerSortFieldEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->resourceServers->search(
new SearchResourceServersRequestParameters([
'q' => 'q',
'parser' => SearchParserEnum::Scim->value,
'fields' => 'fields',
'includeFields' => true,
'take' => 1,
'from' => 'from',
'sort' => ResourceServerSortFieldEnum::Identifier->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.resource_servers.search(
q="q",
parser="scim",
fields="fields",
include_fields=True,
take=1,
from_="from",
sort="identifier",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.resource_servers.search(
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/resource-servers/search \
--header 'Authorization: Bearer <token>'{
"resource_servers": [
{
"id": "<string>",
"name": "<string>",
"is_system": true,
"identifier": "<string>",
"scopes": [
{
"value": "<string>",
"description": "<string>"
}
],
"signing_alg": "HS256",
"allow_offline_access": true,
"allow_online_access": true,
"allow_online_access_with_ephemeral_sessions": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 123,
"token_lifetime_for_web": 123,
"enforce_policies": true,
"token_lifetime_for_anonymous_access_tokens": 123,
"token_dialect": "access_token",
"access_token": {
"claims_mapping": {
"custom_claims": [
{
"name": "<string>",
"expression": "<string>"
}
]
}
},
"token_encryption": {
"format": "compact-nested-jwe",
"encryption_key": {
"alg": "RSA-OAEP-256",
"pem": "-----BEGIN PUBLIC KEY-----\r\nMIIBIjANBg...\r\n-----END PUBLIC KEY-----\r\n",
"name": "<string>",
"kid": "<string>"
}
},
"consent_policy": "transactional-authorization-with-mfa",
"require_consent_non_repudiation": true,
"authorization_details": [
"<unknown>"
],
"proof_of_possession": {
"mechanism": "mtls",
"required": true,
"required_for": "public_clients"
},
"subject_type_authorization": {
"user": {
"policy": "allow_all"
},
"client": {
"policy": "deny_all"
},
"anonymous_user": {
"policy": "deny_all"
}
},
"authorization_policy": {
"policy_id": "<string>"
},
"client_id": "<string>"
}
],
"next": "<string>"
}リソースサーバーを検索
SCIMまたはLuceneのフィルター構文を使用して、低レイテンシーで結果整合性を持つリソースサーバー検索を行います。parserパラメーターで”scim”または”lucene”構文を指定します(デフォルト: “lucene”)。このエンドポイントは、複雑なクエリでより優れたパフォーマンスを提供する、標準のGET /resource-serversエンドポイントの代替手段です。 結果には最近の更新がすぐに反映されない場合があります。
このエンドポイントでは、signing_secretフィールドはサポートされていません。
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.resourceServers.search({
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.resourceServers.search({
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier",
});
}
main();
package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.SearchResourceServersRequestParameters{
Q: management.String(
"q",
),
Parser: management.SearchParserEnumSCIM.Ptr(),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
Take: management.Int(
1,
),
From: management.String(
"from",
),
Sort: management.ResourceServerSortFieldEnumIdentifier.Ptr(),
}
mgmt.ResourceServers.Search(
context.TODO(),
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "resource-servers/search" --query "q=q" --query "parser=scim" --query "fields=fields" --query "include_fields=true" --query "take=1" --query "from=from" --query "sort=identifier"using Auth0.ManagementApi;
using System.Threading.Tasks;
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.ResourceServers.SearchAsync(
new SearchResourceServersRequestParameters {
Q = "q",
Parser = SearchParserEnum.Scim,
Fields = "fields",
IncludeFields = true,
Take = 1,
From = "from",
Sort = ResourceServerSortFieldEnum.Identifier
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.ResourceServerSortFieldEnum;
import com.auth0.client.mgmt.types.SearchParserEnum;
import com.auth0.client.mgmt.types.SearchResourceServersRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.resourceServers().search(
SearchResourceServersRequestParameters
.builder()
.q("q")
.parser(SearchParserEnum.SCIM)
.fields("fields")
.includeFields(true)
.take(1)
.from("from")
.sort(ResourceServerSortFieldEnum.IDENTIFIER)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\ResourceServers\Requests\SearchResourceServersRequestParameters;
use Auth0\SDK\API\Management\Types\SearchParserEnum;
use Auth0\SDK\API\Management\Types\ResourceServerSortFieldEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->resourceServers->search(
new SearchResourceServersRequestParameters([
'q' => 'q',
'parser' => SearchParserEnum::Scim->value,
'fields' => 'fields',
'includeFields' => true,
'take' => 1,
'from' => 'from',
'sort' => ResourceServerSortFieldEnum::Identifier->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.resource_servers.search(
q="q",
parser="scim",
fields="fields",
include_fields=True,
take=1,
from_="from",
sort="identifier",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.resource_servers.search(
q: "q",
parser: "scim",
fields: "fields",
include_fields: true,
take: 1,
from: "from",
sort: "identifier"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/resource-servers/search \
--header 'Authorization: Bearer <token>'{
"resource_servers": [
{
"id": "<string>",
"name": "<string>",
"is_system": true,
"identifier": "<string>",
"scopes": [
{
"value": "<string>",
"description": "<string>"
}
],
"signing_alg": "HS256",
"allow_offline_access": true,
"allow_online_access": true,
"allow_online_access_with_ephemeral_sessions": true,
"skip_consent_for_verifiable_first_party_clients": true,
"token_lifetime": 123,
"token_lifetime_for_web": 123,
"enforce_policies": true,
"token_lifetime_for_anonymous_access_tokens": 123,
"token_dialect": "access_token",
"access_token": {
"claims_mapping": {
"custom_claims": [
{
"name": "<string>",
"expression": "<string>"
}
]
}
},
"token_encryption": {
"format": "compact-nested-jwe",
"encryption_key": {
"alg": "RSA-OAEP-256",
"pem": "-----BEGIN PUBLIC KEY-----\r\nMIIBIjANBg...\r\n-----END PUBLIC KEY-----\r\n",
"name": "<string>",
"kid": "<string>"
}
},
"consent_policy": "transactional-authorization-with-mfa",
"require_consent_non_repudiation": true,
"authorization_details": [
"<unknown>"
],
"proof_of_possession": {
"mechanism": "mtls",
"required": true,
"required_for": "public_clients"
},
"subject_type_authorization": {
"user": {
"policy": "allow_all"
},
"client": {
"policy": "deny_all"
},
"anonymous_user": {
"policy": "deny_all"
}
},
"authorization_policy": {
"policy_id": "<string>"
},
"client_id": "<string>"
}
],
"next": "<string>"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
クエリパラメータ
フィルター式のSCIMまたはLucene構文(parserパラメーターに応じて)。SCIMの例: name eq "My API"、identifier sw "https://"。SCIM演算子: eq、ne、sw、ew、co、pr、gt、ge、lt、le、and、or。
サポートされるフィールド:
- id - リソースサーバーIDでフィルタリング
- identifier - リソースサーバー識別子でフィルタリング
- name - リソースサーバー名でフィルタリング
- updated_at - 最終更新日でフィルタリング
1000フィルター式に使用するクエリパーサー。SCIMフィルター構文には"scim"、Luceneクエリ構文には"lucene"(デフォルト)を使用します。
scim, lucene レスポンスに含める、または除外するフィールドのカンマ区切りリスト。include_fieldsパラメーターと併用して射影モードを制御します。
1000フィールドの射影モードを制御します。trueに設定すると、fieldsパラメーターで指定したフィールドのみを含めます。falseに設定すると、fieldsパラメーターで指定したフィールドを除外します。指定しない場合のデフォルトはtrueです。
ページごとに返す結果の最大数(1~100)。デフォルトは50です。
1 <= x <= 100次の結果ページのカーソル。前のレスポンスのnextフィールドの値を使用します。
1000結果を昇順で並べ替えるフィールド名。指定しない場合は、挿入順(古いものから)がデフォルトです。 結果を昇順でソートするフィールド名。指定しない場合は、挿入順(古いものから)がデフォルトになります。
identifier, name, updated_at