Back to Node Auth0

Class ResourceServersClient

docs/classes/management.SDK.ResourceServersClient.html

5.9.19.5 KB
Original Source

Class ResourceServersClient

Index

Constructors

constructor

Methods

listcreategetdeleteupdate

Properties

_options

Constructors

constructor

new ResourceServersClient(options: BaseClientOptions): ResourceServersClient

Parameters

Returns ResourceServersClient

Methods

list

list(
request?: ListResourceServerRequestParameters,
requestOptions?: ResourceServersClient.RequestOptions,
): Promise<
Page<ResourceServer, ListResourceServerOffsetPaginatedResponseContent>,
>

Retrieve details of all APIs associated with your tenant.

Parameters

Request-specific configuration.

Returns Promise<Page<ResourceServer, ListResourceServerOffsetPaginatedResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.resourceServers.list({ identifiers: ["identifiers"], page: 1, per_page: 1, include_totals: true, include_fields: true })Copy

create

create(
request: CreateResourceServerRequestContent,
requestOptions?: ResourceServersClient.RequestOptions,
): HttpResponsePromise<CreateResourceServerResponseContent>

Create a new API associated with your tenant. Note that all new APIs must be registered with Auth0. For more information, read APIs.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateResourceServerResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.resourceServers.create({ identifier: "identifier" })Copy

get

get(
id: string,
request?: GetResourceServerRequestParameters,
requestOptions?: ResourceServersClient.RequestOptions,
): HttpResponsePromise<GetResourceServerResponseContent>

Retrieve API details with the given ID.

Parameters

  • id: string

ID or audience of the resource server to retrieve.

Request-specific configuration.

Returns HttpResponsePromise<GetResourceServerResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.resourceServers.get("id", { include_fields: true })Copy

delete

delete(
id: string,
requestOptions?: ResourceServersClient.RequestOptions,
): HttpResponsePromise<void>

Delete an existing API by ID. For more information, read API Settings.

Parameters

  • id: string

ID or the audience of the resource server to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.resourceServers.delete("id")Copy

update

update(
id: string,
request?: UpdateResourceServerRequestContent,
requestOptions?: ResourceServersClient.RequestOptions,
): HttpResponsePromise<UpdateResourceServerResponseContent>

Change an existing API setting by resource server ID. For more information, read API Settings.

Parameters

  • id: string

ID or audience of the resource server to update.

Request-specific configuration.

Returns HttpResponsePromise<UpdateResourceServerResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.resourceServers.update("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods listcreategetdeleteupdate Properties _options