Go
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
jobs "github.com/auth0/go-auth0/management/management/jobs"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &jobs.CreateExportUsersRequestContent{}
client.Jobs.UsersExports.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.jobs.usersExports.create({});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.jobs.usersExports.create({});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/jobs/users-exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "con_0000000000000001",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}
'import requests
url = "https://{tenantDomain}/api/v2/jobs/users-exports"
payload = {
"connection_id": "con_0000000000000001",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/jobs/users-exports",
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([
'connection_id' => 'con_0000000000000001',
'fields' => [
[
'name' => '<string>',
'export_as' => '<string>'
]
],
'limit' => 5
]),
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;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/jobs/users-exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"con_0000000000000001\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"export_as\": \"<string>\"\n }\n ],\n \"limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/jobs/users-exports")
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 \"connection_id\": \"con_0000000000000001\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"export_as\": \"<string>\"\n }\n ],\n \"limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": "job_0000000000000001",
"status": "pending",
"type": "users_export",
"connection_id": "con_0000000000000001",
"created_at": "<string>",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}ユーザーエクスポートを作成
長時間実行されるジョブを使用して、すべてのユーザーをファイルにエクスポートします。
POST
https://{tenantDomain}/api/v2
/
jobs
/
users-exports
Go
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
jobs "github.com/auth0/go-auth0/management/management/jobs"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &jobs.CreateExportUsersRequestContent{}
client.Jobs.UsersExports.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.jobs.usersExports.create({});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.jobs.usersExports.create({});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/jobs/users-exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "con_0000000000000001",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}
'import requests
url = "https://{tenantDomain}/api/v2/jobs/users-exports"
payload = {
"connection_id": "con_0000000000000001",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/jobs/users-exports",
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([
'connection_id' => 'con_0000000000000001',
'fields' => [
[
'name' => '<string>',
'export_as' => '<string>'
]
],
'limit' => 5
]),
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;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/jobs/users-exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"con_0000000000000001\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"export_as\": \"<string>\"\n }\n ],\n \"limit\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/jobs/users-exports")
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 \"connection_id\": \"con_0000000000000001\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"export_as\": \"<string>\"\n }\n ],\n \"limit\": 5\n}"
response = http.request(request)
puts response.read_body{
"id": "job_0000000000000001",
"status": "pending",
"type": "users_export",
"connection_id": "con_0000000000000001",
"created_at": "<string>",
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
],
"limit": 5
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
application/jsonapplication/x-www-form-urlencoded
ユーザーのエクスポート元となる接続の connection_id。
Pattern:
^con_[A-Za-z0-9]{16}$CSV に含めるフィールドの一覧。既定では、定義済みのフィールドセットが使用されます。
Show child attributes
Show child attributes
ファイルの形式。json または csv である必要があります。
利用可能なオプション:
json, csv レコード数を制限します。
必須範囲:
x >= 1レスポンス
ジョブが正常に作成されました。
このジョブの ID。
このジョブのステータス。
このジョブの種類。
ユーザーのエクスポート元となる接続の connection_id。
Pattern:
^con_[A-Za-z0-9]{16}$このジョブの作成日時。
CSV に含めるフィールドの一覧。既定では、定義済みのフィールドセットが使用されます。
Show child attributes
Show child attributes
ファイルの形式。json または csv である必要があります。
利用可能なオプション:
json, csv レコード数を制限します。
必須範囲:
x >= 1⌘I