Retrieve a User Action
This API is used to retrieve one or all of the configured User Actions. Specifying an Id on the URI will retrieve a single User Action. Leaving off the Id will retrieve all of the User Actions.
Request#
OpenAPI Spec
OpenAPI Spec
Request Parameters#
userActionIdUUIDoptionalThe Id of the User Action to retrieve.
Response#
The response for this API contains either a single User Action or all of the User Actions. When you call this API with an Id the response will contain just that User Action. When you call this API without an Id the response will contain all of the User Actions. Both response types are defined below along with an example JSON response.
Response Codes| Code | Description |
|---|---|
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See Authentication. |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |
| 503 | The search index is not available or encountered an exception so the request cannot be completed. The response will contain a JSON body. |
Response Body#
userAction.activeBooleanWhether or not this User Action is active.
userAction.cancelEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are canceled.
userAction.endEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions expired automatically (end).
userAction.idUUIDThe Id of the User Action.
userAction.insertInstantLongThe instant when the User Action was created.
userAction.includeEmailInEventJSONBooleanWhether to include the email information in the JSON that is sent to the Webhook when a user action is taken.
userAction.lastUpdateInstantLongThe instant when the User Action was last updated.
userAction.localizedNamesMap<Locale, String>A mapping of localized names for this User Action. The key is the Locale and the value is the name of the User Action for that language.
userAction.modifyEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are modified.
userAction.modifyEmailTemplateIdStringThe name of this User Action.
userAction.optionsArrayThe list of User Action Options.
userAction.options[x].localizedNamesMap<Locale, String>A mapping of localized names for this User Action Option. The key is the Locale and the value is the name of the User Action Option for that language.
userAction.options[x].nameStringThe name of this User Action Option.
userAction.preventLoginBooleanWhether or not this User Action will prevent the User from logging in.
userAction.sendEndEventBooleanWhether or not FusionAuth will send events to any registered Webhooks when this User Action expires.
userAction.startEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are started (created).
userAction.temporalBooleanWhether or not this User Action is time-based (temporal). Time based actions are temporary and once expired the action will no longer be considered active and will not affect the user.
userAction.userEmailingEnabledBooleanWhether or not email is enabled for this User Action. If this is true, a checkbox will appear in the FusionAuth UI for this User Action that allows admins to specify that they want to email the User.
userAction.userNotificationsEnabledBooleanWhether or not user notifications are enabled for this User Action. If this is true, a checkbox will appear in the FusionAuth UI for this User Action that allows admins to specify that they want to "notify users". What is does is send an additional flag named notifyUser in the event JSON that is sent to any registered Webhooks.
Example Response JSON for a Single User Action
{
"userAction": {
"active": true,
"cancelEmailTemplateId": "00000000-0000-0000-0000-000000000001",
"endEmailTemplateId": "00000000-0000-0000-0000-000000000002",
"id": "00000000-0000-0000-0000-000000000042",
"includeEmailInEventJSON": true,
"localizedNames": {
"de": "Dauerhaft Verbieten"
},
"modifyEmailTemplateId": "00000000-0000-0000-0000-000000000003",
"name": "Permanently Ban",
"options": [
{
"name": "Nicely",
"localizedNames": {
"de": "Schön"
}
},
{
"name": "Meanly",
"localizedNames": {
"de": "Bedeuten"
}
}
],
"preventLogin": true,
"sendEndEvent": true,
"startEmailTemplateId": "00000000-0000-0000-0000-000000000004",
"temporal": true,
"userEmailingEnabled": true,
"userNotificationsEnabled": true
}
}
Response Body#
userActionsArrayThe list of User Action objects.
userActions[x].activeBooleanWhether or not this User Action is active.
userActions[x].cancelEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are canceled.
userActions[x].endEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions expired automatically (end).
userActions[x].idUUIDThe Id of the User Action.
userActions[x].includeEmailInEventJSONBooleanWhether to include the email information in the JSON that is sent to the Webhook when a user action is taken.
userActions[x].localizedNamesMap<Locale, String>A mapping of localized names for this User Action. The key is the Locale and the value is the name of the User Action for that language.
userActions[x].modifyEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are modified.
userActions[x].modifyEmailTemplateIdStringThe name of this User Action.
userActions[x].optionsArrayThe list of User Action Options.
userActions[x].options[x].localizedNamesMap<Locale, String>A mapping of localized names for this User Action Option. The key is the Locale and the value is the name of the User Action Option for that language.
userActions[x].options[x].nameStringThe name of this User Action Option.
userActions[x].preventLoginBooleanWhether or not this User Action will prevent the User from logging in.
userActions[x].sendEndEventBooleanWhether or not FusionAuth will send events to any registered Webhooks when this User Action expires.
userActions[x].startEmailTemplateIdUUIDThe Id of the Email Template that is used when User Actions are started (created).
userActions[x].temporalBooleanWhether or not this User Action is time-based (temporal). Time based actions are temporary and once expired the action will no longer be considered active and will not affect the user.
userActions[x].userEmailingEnabledBooleanWhether or not email is enabled for this User Action. If this is true, a checkbox will appear in the FusionAuth UI for this User Action that allows admins to specify that they want to email the User.
userActions[x].userNotificationsEnabledBooleanWhether or not user notifications are enabled for this User Action. If this is true, a checkbox will appear in the FusionAuth UI for this User Action that allows admins to specify that they want to "notify users". What is does is send an additional flag named notifyUser in the event JSON that is sent to any registered Webhooks.
Example Response JSON for all the User Actions
{
"userActions": [
{
"active": true,
"cancelEmailTemplateId": "00000000-0000-0000-0000-000000000001",
"endEmailTemplateId": "00000000-0000-0000-0000-000000000002",
"id": "00000000-0000-0000-0000-000000000042",
"includeEmailInEventJSON": true,
"localizedNames": {
"de": "Dauerhaft Verbieten"
},
"modifyEmailTemplateId": "00000000-0000-0000-0000-000000000003",
"name": "Permanently Ban",
"options": [
{
"name": "Nicely",
"localizedNames": {
"de": "Schön"
}
},
{
"name": "Meanly",
"localizedNames": {
"de": "Bedeuten"
}
}
],
"preventLogin": true,
"sendEndEvent": true,
"startEmailTemplateId": "00000000-0000-0000-0000-000000000004",
"temporal": true,
"userEmailingEnabled": true,
"userNotificationsEnabled": true
}
]
}