Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
jobs
/
users-exports
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Jobs;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Jobs.UsersExports.CreateAsync(
            new CreateExportUsersRequestContent()
        );
    }

}
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,
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.jobs.usersexports.requests.CreateExportUsersRequestContent;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.jobs().usersExports().create(
CreateExportUsersRequestContent
.builder()
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Jobs\UsersExports\Requests\CreateExportUsersRequestContent;

$client = new Management(
token: '<token>',
);
$client->jobs->usersExports->create(
new CreateExportUsersRequestContent([]),
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.jobs.users_exports.create()
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.jobs.users_exports.create
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",
"limit": 5,
"fields": [
{
"name": "<string>",
"export_as": "<string>"
}
]
}
'
{
  "status": "pending",
  "type": "users_export",
  "id": "job_0000000000000001",
  "created_at": "<string>",
  "connection_id": "con_0000000000000001",
  "limit": 5,
  "fields": [
    {
      "name": "<string>",
      "export_as": "<string>"
    }
  ]
}

Autorisations

Authorization
string
header
requis

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

Corps

connection_id
string
défaut:con_0000000000000001

connection_id of the connection from which users will be exported.

Pattern: ^con_[A-Za-z0-9]{16}$
format
enum<string>

Format of the file. Must be json or csv.

Options disponibles:
json,
csv
limit
integer
défaut:5

Limit the number of records.

Plage requise: x >= 1
fields
object[]

List of fields to be included in the CSV. Defaults to a predefined set of fields.

Réponse

Job created successfully.

status
string
défaut:pending
requis

Status of this job.

type
string
défaut:users_export
requis

Type of job this is.

id
string
défaut:job_0000000000000001
requis

ID of this job.

created_at
string

When this job was created.

connection_id
string
défaut:con_0000000000000001

connection_id of the connection from which users will be exported.

Pattern: ^con_[A-Za-z0-9]{16}$
format
enum<string>

Format of the file. Must be json or csv.

Options disponibles:
json,
csv
limit
integer
défaut:5

Limit the number of records.

Plage requise: x >= 1
fields
object[]

List of fields to be included in the CSV. Defaults to a predefined set of fields.