Add an owner to a specific application.
ID of application to add an owner for
Email address of additional owner
The role of the additional owner
General purpose DELETE
operation on the wicked API; you do not use this directly usually, but use one of
the dedicated SDK functions.
relative URL path
user ID to perform the GET
operation as, or callback
Callback containing an err
(or null
if success) and the GET
returned content.
General purpose GET
operation on the wicked API; you do not use this directly usually, but use one of
the dedicated SDK functions.
relative URL path
user ID to perform the GET
operation as, or callback
Callback containing an err
(or null
if success) and the GET
returned content.
General purpose PATCH
operation on the wicked API; you do not use this directly usually, but use one of
the dedicated SDK functions.
relative URL path
user ID to perform the GET
operation as, or callback
Callback containing an err
(or null
if success) and the GET
returned content.
General purpose POST
operation on the wicked API; you do not use this directly usually, but use one of
the dedicated SDK functions.
relative URL path
Body to post
user ID to perform the GET
operation as, or callback
Callback containing an err
(or null
if success) and the GET
returned content.
General purpose PUT
operation on the wicked API; you do not use this directly usually, but use one of
the dedicated SDK functions.
relative URL path
Body to post
user ID to perform the GET
operation as, or callback
Callback containing an err
(or null
if success) and the GET
returned content.
Convenience function to make sure the Kong Adapter is up and running.
Await options
Awaits return code 200
for the specified URL.
The URL to wait for to return 200
Await options (see interface)
Express middleware implementation of a correlation ID handler; it inserts
a header Correlation-Id
if it's not already present and passes it on to the
wicked API. In case a header is already present, it re-uses the content. The
usual format of the correlation ID is a UUID.
Usage: app.use(wicked.correlationIdHandler());
Creates a new wicked application based on the given information. Please note that the clientType
takes precedence over
the confidential
property. Using only clientType
is recommended. If none is passed in, clientType
defaults to public_spa
,
which is the least secure option.
Application information for new application
Create a new API subscription for an application.
ID of application to create a subscription for
Subscription create info (see type)
Creates a new user from the given information. Returns a user information object also containing the new internal ID of the user.
The basic user info needed to create a user
Creates a verification record; depending on the type of the verification record, this may trigger certain workflows, such as the "lost password" or "verify email address" workflow, given that the wicked mailer is correctly configured and deployed.
Verification information to create a verification record for
Delete all grants a user has made to any application to access APIs on behalf of himself. After calling this method, any non-trusted application will need to ask permission to the user again to access the user's data on behalf of the user.
ID of user to delete all grants for.
Delete an application entirely.
ID of application to delete
Delete an owner from an application.
ID of application to delete the owner from
Email address of owner to delete from application
Delete a registration pool namespace. Subsequently, it cannot be used to create or enumerate registrations.
ID of pool to which the namespace to delete belongs
ID of namespace to delete
Deletes a subscription to an API for an application.
ID of application to delete the subscription for
ID of API to delete subscription for
Deletes a user. This function will only succeed if the user does not have any associated applications. If the user has applications, these have to be deleted or re-owned first.
ID of user to delete
Delete a user's grant of access to a specific application and API.
ID of user of which to delete a grant
ID of application of which to delete a grant
ID of API to delete a grant for
Special function which deletes the password for a specific user; this user will no longer be able to log in using username and password anymore.
ID of user to delete password for.
Delete a specific user registration for a given registration pool (and optionally namespace).
ID of registration pool to delete a user registration from
ID of user to delete a registration for
Namespace to delete registration for; for registration pools not requiring a namespace, this must be null
, otherwise it must be specified
Delete a verification by ID.
ID of verification to delete.
Delete a specific webhook event for a specific webhook listener from the event queue.
ID of webhook listener to delete an event for
ID of event to delete
Delete a specific webhook listener.
ID of webhook listener to delete
Flush/delete all pending webhook events for a specific webhook listener.
ID of webhook listener to flush all events for.
Retrieve a map of all registrations, across all registration pools, a user has.
ID of user to retrieve all registrations for.
Retrieve the API specific Kong configuration for a specific API.
The id of the API to retrieve the Kong config for
Retrieve the (markdown) API description of a specific API.
The id of the API to retrieve the description for
Returns the header name to use for key auth purposes. Defaults to X-ApiKey
.
Retrieve a list of API Plans for a specific API.
The id of the API to retrieve the associated plans for
Retrieve a list of subscriptions to a specific API.
The id of the API to retrieve subscriptions for.
Retrieve a JSON representation of the Swagger information for a specific API; contains authorization information (injected).
The id of the API to retrieve the Swagger JSON for
Return the generic APIs description (for all APIs). Returns markdown code.
Retrieve information on the given application.
ID of application to retrieve
Retrieves the list of (predefined) application roles.
Retrieves all registered wicked applications.
Get options (filtering, paging)
Retrieve a specific approval request by ID.
ID of approval to retrieve
Retrieve a list of all pending subscription approvals.
Retrieve information on a specific authorization server.
ID of authorization server to retrieve information on.
Retrieve a string list of registered authorization servers. This just returns a list of names, to get further information, use getAuthServer().
Returns the current hash of the static configuration. This is used to check whether the static configuration has changed, and if so, decide to restart/stop components like the mailer or the kong adapter.
Returns the host name for the API Gateway for the currently configured environment, e.g. api.mycompany.com
Returns the complete base URL to the API Gateway, as seen from outside the deployment. E.g., https://api.mycompany.com
Returns the external portal host for the currently configured environment, e.g. developer.mycompany.com
Returns the complete URL to the wicked portal UI, as seen from outside the deployment, e.g. https://developer.mycompany.com
Returns the content of the globals.json
file, with resolved environment variables, if applicable.
Retrieve a collection of all wicked user groups. This is an open
endpoint, so there is no As
alternative.
Returns the URL to the wicked API, as seen from inside the deployment
Returns the full URL to the chatbot, as seen from inside the deployment, e.g. http://portal-chatbot:3004
Returns the full URL to the Kong Adapter, as seen from inside the deployment, e.g. http://portal-kong-adapter:3002
Returns the full URL to the admin port of the Kong instance(s), as seen from inside the deployment. E.g., http://kong:8001
.
Returns the full URL to the proxy port of the Kong instance(s), as seen from inside the deployment. E.g., http://kong:8000
.
Returns the full URL to the mailer, as seen from inside the deployment, e.g. http://portal-mailer:3003
Returns the full URL to the portal UI instance, e.g. http://portal:3000
, as seen from inside the deployment.
Returns the list of Kong plugins which the Kong Adapter will not touch.
Returns the selected password validation strategy identifier.
Return a collection of all API plans, disregarding their association with APIs or not. This is an open
endpoint, so there is no As
alternative.
Retrieve information on a specific namespace of a specific registration pool. Namespaces are usually mapped to things like "tenants", so the description of a namespace can be a tenant name or similar.
ID of pool to retrieve a namespace for
ID of namespace to retrieve
Retrieve a collection of namespaces for a given registration pool (poolId
). Note: The registration pool
must have the requireNamespace
option set for the namespace functions to be valid to call.
ID of pool to retrieve namespaces for
Get retrieval options (paging, filtering)
Retrieve all registrations for a specific registration pool; use the namespace
filtering inside the options
parameter to retrieve registrations for specific namespaces. Please note that the namespace
option is required
for registration pools which requires namespaces, and is forbidden for registration pools which do not require
namespaces.
ID of registration pool to retrieve registrations for
Get options, e.g. namespace filtering, generic filtering and paging
Returns the full scope to the wicked API (all scope strings, space separated).
Retrieve information on a specific registration pool.
ID of pool to retrieve information on
Retrieve a map of registration pools and registration pool information.
Return the currently configured user facing schema (http
or https
). This information is contained
in the globals.json
.
Retrieve a specific application API subscription.
ID of application to retrieve subscription for
ID of API to which the subscription applies
Retrieve subscription information for an application based on an OAuth2 client ID and a given API.
OAuth2 client ID of application
ID of API
Retrieve all API subscriptions for a specific application.
ID of application to retrieve subscriptions for
Retrieves user information for a specific user.
ID of user to retrieve
Retrieves user short info by custom id.
The custom id of the user to retrieve
Retrieves user short info by email address.
The email address of the user to retrieve
Retrieve a specific access grant for a specific, user, application and API.
ID of user to retrieve a grant for
ID of application to retrieve a grant for
ID of API for which to retrieve the grant
Retrieve all grants a user has allowed to any application for accessing any API.
ID of user to retrieve grants for
Get options (filtering, paging,...)
Retrieve a collection of user registrations for a specific registration pool id. This can be a collection of 0 or more registration objects; it's valid for a user to have multiple registrations for a single registration pool in case the registration pool requires namespaces (but only one registration per namespace). In case the registration pool does not require/support namespaces, the result will be an array of eiher 0 or 1 elements.
ID of pool for which to retrieve a user's registrations
ID of user to retrieve registrations for
Retrieve list of users matching the given options. Chances are good you will rather want to use getRegistrations().
Collection get options
Retrieve a specific verification by its ID.
ID of verification to retrieve.
Retrieve all pending verifications.
Retrieve all pending webhook events for a specific webhook listener. This operation is idempotent. To delete the webhook events, subsequently call deleteWebhookEvent.
ID of webhook listener to retrieve pending events for
Retrieve a list of all currently registered webhook listeners.
Create a machine administrator user for a given service. This method can be used to get "backdoor" access to the wicked API on behalf of a machine user. If you call this method, the machine user ID will be stored internally in the SDK and will be used for any API calls using the SDK.
A unique service ID for the service to create a machine user for
Initialize the wicked node SDK.
SDK global options
Returns true if the wicked SDK is currently able to reach the wicked API.
Returns true if the system is in "development mode". This usually means that transport is not secure (not via https).
Patch an application, e.g. change it's name, redirect URL or clientType
.
ID of application to patch
Patch body
Patch a subscription. This function is only used for approval workflows: Use this to patch the subscription to be approved.
ID of application of which to patch the subscription
ID of API
Patch information (see type)
Patches a user. Returns the updated user information.
The information of the user to update (password, groups...)
Upsert a namespace in a specific registration pool. In order to create registrations for a specific namespace, this function has to have been called for the namespace which is to be used.
ID of pool to which the namespace to upsert belongs
Id of namespace to upsert
New namespace data to store for this namespace
Upsert a grant information for a user, so that a given application can access the given API with a specific set of scopes on the user's behalf. This method is foremost used automatically by the Authorization Server after it has asked the user whether a certain application is allowed to access the user's data on the user's behalf.
ID of user to upsert a grant for
ID of application to upsert a grant for
ID of API to upsert a grant for
Grant information to store
Upsert a user registration. Note that if the registration pool requires the use of namespaces
the userRegistration
object must contain a namespace
property. Vice versa, if the registration
pool does not require/support namespaces, the userRegistration
object must not contain
a namespace
property.
ID of pool to upsert a user registration for
ID of user to upsert a registration for
User registration data.
Insert or update data of a specific webhook listener. After upserting the information of
a new webhook listener, the wicked API will start to accumulate events for this webhook
listener. These events can be retrieved using getWebhookEvents
and deleted via
deleteWebhookEvents
.
ID of listener to insert or update
Data of listener to insert or update
Generated using TypeDoc
Returns a collection of API definitions (corresponds to the
apis.json
).