Alerts resource (Data API 23.2)

Summary

Http Method Resource Description
GET /alerts/descriptors Gets a collection of all alert descriptors
GET /alerts/descriptors/{application_id} Gets a collection of all alert descriptors for the given application context.
GET /alerts/descriptors/{application_id}/{application_context_path}/{message_id} Gets a single alert descriptor
PATCH /alerts/descriptors/{application_id}/{application_context_path}/{message_id}/revalidate

Triggers rule validation for all described descriptors.

When a validation rule for a descriptor is triggered active alerts might be deleted if the conditions are not met anymore. Additionally, new alerts might be created if conditions of a descriptor are now met.

If the alert descriptor is context-specific, a context object ID needs to be provided in the request body. The request body can be ued to further restrict the set of descriptors that are validated.

GET /alerts/items Gets a collection of all alerts
GET /alerts/items/{application_id}

Gets a collection of alerts for the given application context

GET /alerts/items/{application_id}/{application_context_path}/{message_id}/{context_object_id}

Gets a single alert

If the alert depends on a context object, the last path elemnt denotes the context object id. If the alert is independent from a context, use - as the last path element

DELETE /alerts/items/{application_id}/{application_context_path}/{message_id}/{context_object_id}

Deletes a single alert

If the alert depends on a context object, the last path elemnt denotes the context object id. If the alert is independent from a context, use - as the last path element

GET /alerts/usersettings Gets the alert settings for the user.
PATCH /alerts/usersettings Changes the alert settings for the user.

Get alert descriptors

Gets a collection of all alert descriptors

Url

GET https://hostname:port/dw/data/v23_2/alerts/descriptors

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertDescriptors

Sample

REQUEST:
GET /dw/data/v23_2/alerts/descriptors HTTP/1.1
Host: example.com

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_descriptors",
  "data": [
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort",
      "message_id": "PasswordTooShort"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthNotEnforced",
      "message_id": "UnifiedAuthNotEnforced"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthUsedExclusively",
      "message_id": "UnifiedAuthUsedExclusively"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthDisabled",
      "message_id": "UnifiedAuthDisabled"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthOnlySupported",
      "message_id": "UnifiedAuthOnlySupported"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthOnlyEncouraged",
      "message_id": "UnifiedAuthOnlyEncouraged"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNotSet",
      "message_id": "IpRestrictionsNotSet"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNoBlocking",
      "message_id": "IpRestrictionsNoBlocking"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsOnlyBlackList",
      "message_id": "IpRestrictionsOnlyBlackList"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNoSfWhitelist",
      "message_id": "IpRestrictionsNoSfWhitelist"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "marketing_promotions/custom_notification",
      "application_id": "marketing",
      "context_object_type": "PromotionPO",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/marketing/marketing_promotions%2Fcustom_notification/promo_in_past",
      "message_id": "promo_in_past"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "context_object_type": "other.KeyStoreEntry",
      "default_priority": "action_required",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/operations/operations_certificates%2Fcertificates/CertExpired",
      "message_id": "CertExpired"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "context_object_type": "other.KeyStoreEntry",
      "default_priority": "action_required",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/operations/operations_certificates%2Fcertificates/CertExpiring",
      "message_id": "CertExpiring"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_custom_prefs/custom_notification",
      "application_id": "global-prefs",
      "default_priority": "action_required",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_custom_prefs%2Fcustom_notification/missing_org_config",
      "message_id": "missing_org_config"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "customerlists_manage/customerAuth",
      "application_id": "sites",
      "context_object_type": "CustomerList",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/sites/customerlists_manage%2FcustomerAuth/PasswordTooShort",
      "message_id": "PasswordTooShort"
    }
  ]
}

Get alert descriptors for application context

Gets a collection of all alert descriptors for the given application context.

Url

GET https://hostname:port/dw/data/v23_2/alerts/descriptors/{application_id}?application_context_path={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertDescriptors

Path Parameters

Parameter Type Description Constraints
application_id String The application ID. mandatory=true, minLength=1, nullable=false

Query Parameters

Parameter Type Description Constraints
application_context_path String The application context path (optional).  

Sample

REQUEST:
GET /dw/data/v23_2/alerts/descriptors/global-prefs HTTP/1.1
Host: example.com

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_descriptors",
  "data": [
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort",
      "message_id": "PasswordTooShort"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthNotEnforced",
      "message_id": "UnifiedAuthNotEnforced"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthUsedExclusively",
      "message_id": "UnifiedAuthUsedExclusively"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthDisabled",
      "message_id": "UnifiedAuthDisabled"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthOnlySupported",
      "message_id": "UnifiedAuthOnlySupported"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "default_priority": "informational",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/UnifiedAuthOnlyEncouraged",
      "message_id": "UnifiedAuthOnlyEncouraged"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNotSet",
      "message_id": "IpRestrictionsNotSet"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNoBlocking",
      "message_id": "IpRestrictionsNoBlocking"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsOnlyBlackList",
      "message_id": "IpRestrictionsOnlyBlackList"
    },
    {
      "_type": "alert_descriptor",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "default_priority": "warning",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNoSfWhitelist",
      "message_id": "IpRestrictionsNoSfWhitelist"
    }
  ]
}

Get alert descriptor

Gets a single alert descriptor

Url

GET https://hostname:port/dw/data/v23_2/alerts/descriptors/{application_id}/{application_context_path}/{message_id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertDescriptor

Path Parameters

Parameter Type Description Constraints
application_context_path String The application context path. mandatory=true, minLength=1, nullable=false
application_id String The application ID. mandatory=true, minLength=1, nullable=false
message_id String The message ID. mandatory=true, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 AlertDescriptorNotFoundException

appID (String)

appContextPath (String)

messageID (String)

If no alert descriptor was found for the given path.

Sample

REQUEST:
GET /dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort HTTP/1.1
Host: example.com

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_descriptor",
  "application_context_path": "global-prefs_securityPrefs/userAuth",
  "application_id": "global-prefs",
  "default_priority": "informational",
  "link": "https://example.com/s/-/dw/data/v23_2/alerts/descriptors/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort",
  "message_id": "PasswordTooShort"
}

# if no descriptor was found:

RESPONSE:
HTTP/1.1 404 NOT FOUND
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache,no-store,must-revalidate

{
   "_v" : "23.2",
  "_type":"fault",
   "fault" : {
      "type" : "AlertDescriptorNotFoundException",
      "message" : "No alert descriptor with applicatin ID 'global-prefs' and application context path 'global-prefs_securityPrefs/userAuth' found."
   }
}

Trigger rule validation.

Triggers rule validation for all described descriptors.

When a validation rule for a descriptor is triggered active alerts might be deleted if the conditions are not met anymore. Additionally, new alerts might be created if conditions of a descriptor are now met.

If the alert descriptor is context-specific, a context object ID needs to be provided in the request body. The request body can be ued to further restrict the set of descriptors that are validated.

Url

PATCH https://hostname:port/dw/data/v23_2/alerts/descriptors/{application_id}/{application_context_path}/{message_id}/revalidate

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Request Document

AlertDescriptorsRevalidationRequest

Path Parameters

Parameter Type Description Constraints
application_context_path String The application context path. mandatory=true, minLength=1, nullable=false
application_id String The application ID. mandatory=true, minLength=1, nullable=false
message_id String The message ID. mandatory=true, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ContextObjectIdRequiredException

objectTypeId (String)

If the descriptor is context specific but no context object id was provided in the request body.
404 AlertDescriptorNotFoundException

appID (String)

appContextPath (String)

messageID (String)

If no matching alert descriptor was found.

Sample

REQUEST:
PATCH /dw/data/v23_2/alerts/descriptors/sites/customerlists_manage%2FcustomerAuth/PasswordTooShort/revalidate HTTP/1.1
Host: example.com
{
  "context_object_id": "123456"
}

# in case of success:

RESPONSE:
HTTP/1.1 204 NO CONTENT

# if a context object is required but was not provided:

RESPONSE:
HTTP/1.1 400 BAD REQUEST
{
   "_v" : "23.2",
  "_type":"fault",
   "fault" : {
      "type" : "ContextObjectIdRequiredException",
      "message" : "A context object of type 'CustomerList' is required but wasn't provided."
   }
}

# if no descriptor was found:

RESPONSE:
HTTP/1.1 404 NOT FOUND
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache,no-store,must-revalidate

{
   "_v" : "23.2",
  "_type":"fault",
   "fault" : {
      "type" : "AlertDescriptorNotFoundException",
      "message" : "No alert descriptor with applicatin ID 'sites' and application context path 'customerlists_manage/customerAuth' found."
   }
}

Get alerts

Gets a collection of all alerts

Url

GET https://hostname:port/dw/data/v23_2/alerts/items

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertItems

Sample

REQUEST:
GET /dw/data/v23_2/alerts/items HTTP/1.1
Host: example.com

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_items",
  "data": [
    {
      "_type": "alert_item",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "description": "Checks the Security module for minimum password length requirements. We recommend you set the password length requirement to at least 8 characters.",
      "display_message": "Make sure your required password length is at least 8 characters.",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort/-",
      "message_id": "PasswordTooShort",
      "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewSecurityPreferencesUserAuth-View",
      "user_priority": "informational"
    },
    {
      "_type": "alert_item",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "description": "Checks the Security module for the settings on IP range access restrictions.",
      "display_message": "To secure access to Business Manager, leverage IP range access restrictions.",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNotSet/-",
      "message_id": "IpRestrictionsNotSet",
      "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewSecurityPreferencesAccessRestriction-View",
      "user_priority": "warning"
    },
    {
      "_type": "alert_item",
      "application_context_path": "customerlists_manage/customerAuth",
      "application_id": "sites",
      "context_object_id": "52753fc35eb6c23d79b7439f8e",
      "description": "Checks the customer list security preferences for the minimum required password length. We recommend you set the password length requirement to at least 8 characters.",
      "display_message": "Make sure the required password length for customer list 'TestWapi' is at least 8 characters.",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/sites/customerlists_manage%2FcustomerAuth/PasswordTooShort/52753fc35eb6c23d79b7439f8e",
      "message_id": "PasswordTooShort",
      "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewCustomerList-Edit?CustomerListID=TestWapi",
      "user_priority": "informational"
    }
  ]
}

Get alerts for application context

Gets a collection of alerts for the given application context

Url

GET https://hostname:port/dw/data/v23_2/alerts/items/{application_id}?application_context_path={String}&context_object_id={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertItems

Path Parameters

Parameter Type Description Constraints
application_id String The application ID. mandatory=true, minLength=1, nullable=false

Query Parameters

Parameter Type Description Constraints
application_context_path String The application context path (optional).  
context_object_id String The context object ID (optional). Use '-' to indicate that only alerts without a context object should be returned.  

Sample

REQUEST:
GET /dw/data/v23_2/alerts/items/global-prefs HTTP/1.1
Host: example.com

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_items",
  "data": [
    {
      "_type": "alert_item",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "description": "Checks the Security module for minimum password length requirements. We recommend you set the password length requirement to at least 8 characters.",
      "display_message": "Make sure your required password length is at least 8 characters.",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort/-",
      "message_id": "PasswordTooShort",
      "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewSecurityPreferencesUserAuth-View",
      "user_priority": "informational"
    },
    {
      "_type": "alert_item",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "description": "Checks the Security module for the settings on IP range access restrictions.",
      "display_message": "To secure access to Business Manager, leverage IP range access restrictions.",
      "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAccess/IpRestrictionsNotSet/-",
      "message_id": "IpRestrictionsNotSet",
      "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewSecurityPreferencesAccessRestriction-View",
      "user_priority": "warning"
    }
  ]
}

Get alert

Gets a single alert

If the alert depends on a context object, the last path elemnt denotes the context object id. If the alert is independent from a context, use - as the last path element

Url

GET https://hostname:port/dw/data/v23_2/alerts/items/{application_id}/{application_context_path}/{message_id}/{context_object_id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertItem

Path Parameters

Parameter Type Description Constraints
application_context_path String The application context path. mandatory=true, minLength=1, nullable=false
application_id String The application ID. mandatory=true, minLength=1, nullable=false
context_object_id String The context object ID. Use '-' for alerts that don't have a context object. mandatory=true, minLength=1, nullable=false
message_id String The message ID. mandatory=true, minLength=1, nullable=false

Sample

REQUEST:
GET /dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort/- HTTP/1.1
Host: example.com

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_item",
  "application_context_path": "global-prefs_securityPrefs/userAuth",
  "application_id": "global-prefs",
  "description": "Checks the Security module for minimum password length requirements. We recommend you set the password length requirement to at least 8 characters.",
  "display_message": "Make sure your required password length is at least 8 characters.",
  "link": "https://example.com/s/-/dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort/-",
  "message_id": "PasswordTooShort",
  "remediation_action": "https://example.com/on/demandware.store/Sites-Site/default/ViewSecurityPreferencesUserAuth-View",
  "user_priority": "informational"
}

# if no descriptor was found:

RESPONSE:
HTTP/1.1 404 NOT FOUND
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache,no-store,must-revalidate

{
   "_v" : "23.2",
  "_type":"fault",
   "fault" : {
      "type" : "AlertNotFoundException",
      "message" : "No alert with applicatin ID 'global-prefs', application context path 'global-prefs_securityPrefs/userAuth', message ID 'PasswordTooShort' and context object ID '-' found"
   }
}

Delete alert

Deletes a single alert

If the alert depends on a context object, the last path elemnt denotes the context object id. If the alert is independent from a context, use - as the last path element

Url

DELETE https://hostname:port/dw/data/v23_2/alerts/items/{application_id}/{application_context_path}/{message_id}/{context_object_id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Path Parameters

Parameter Type Description Constraints
application_context_path String The application context path. mandatory=true, minLength=1, nullable=false
application_id String The application ID. mandatory=true, minLength=1, nullable=false
context_object_id String The context object ID. Use '-' for alerts that don't have a context object. mandatory=true, minLength=1, nullable=false
message_id String The message ID. mandatory=true, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 AlertNotFoundException

appID (String)

appContextPath (String)

messageID (String)

contextObjectID (String)

If no alert was found for the given path.

Sample

REQUEST:
DELETE /dw/data/v23_2/alerts/items/global-prefs/global-prefs_securityPrefs%2FuserAuth/PasswordTooShort/- HTTP/1.1
Host: example.com

# in case of success:

RESPONSE:
HTTP/1.1 204 NO CONTENT

# if no descriptor was found:

RESPONSE:
HTTP/1.1 404 NOT FOUND
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache,no-store,must-revalidate

{
   "_v" : "23.2",
  "_type":"fault",
   "fault" : {
      "type" : "AlertNotFoundException",
      "message" : "No alert with applicatin ID 'global-prefs', application context path 'global-prefs_securityPrefs/userAuth', message ID 'PasswordTooShort' and context object ID '-' found"
   }
}

Get alert settings

Gets the alert settings for the user.

Url

GET https://hostname:port/dw/data/v23_2/alerts/usersettings

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Response Document

AlertSettings

Sample

REQUEST:
GET /dw/data/v23_2/alerts/usersettings HTTP/1.1
Host: example.com

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_settings",
  "settings": [
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": true,
      "message_id": "PasswordTooShort",
      "priority": "hidden",
      "show_in_header": true,
      "show_on_homepage": false
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthNotEnforced",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthUsedExclusively",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthDisabled",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthOnlySupported",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthOnlyEncouraged",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNotSet",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNoBlocking",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsOnlyBlackList",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNoSfWhitelist",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "marketing_promotions/custom_notification",
      "application_id": "marketing",
      "is_user_override": false,
      "message_id": "promo_in_past",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "is_user_override": false,
      "message_id": "CertExpired",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "is_user_override": false,
      "message_id": "CertExpiring",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_custom_prefs/custom_notification",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "missing_org_config",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "customerlists_manage/customerAuth",
      "application_id": "sites",
      "is_user_override": true,
      "message_id": "PasswordTooShort",
      "priority": "action_required",
      "show_in_header": false,
      "show_on_homepage": true
    }
  ]
}

Change alert settings

Changes the alert settings for the user.

Url

PATCH https://hostname:port/dw/data/v23_2/alerts/usersettings

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token. A valid user is required.

Request Document

AlertSettings

Response Document

AlertSettings

Sample

REQUEST:
PATCH /dw/data/v23_2/alerts/usersettings HTTP/1.1
Host: example.com
{
  "settings": [
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": true,
      "message_id": "PasswordTooShort",
      "priority": "hidden",
      "show_in_header": true,
      "show_on_homepage": false
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthNotEnforced",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    }
  ]
}

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v" : "23.2",
  "_type": "alert_settings",
  "settings": [
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": true,
      "message_id": "PasswordTooShort",
      "priority": "hidden",
      "show_in_header": true,
      "show_on_homepage": false
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthNotEnforced",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthUsedExclusively",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthDisabled",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthOnlySupported",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAuth",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "UnifiedAuthOnlyEncouraged",
      "priority": "informational",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNotSet",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNoBlocking",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsOnlyBlackList",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_securityPrefs/userAccess",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "IpRestrictionsNoSfWhitelist",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "marketing_promotions/custom_notification",
      "application_id": "marketing",
      "is_user_override": false,
      "message_id": "promo_in_past",
      "priority": "warning",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "is_user_override": false,
      "message_id": "CertExpired",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "operations_certificates/certificates",
      "application_id": "operations",
      "is_user_override": false,
      "message_id": "CertExpiring",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "global-prefs_custom_prefs/custom_notification",
      "application_id": "global-prefs",
      "is_user_override": false,
      "message_id": "missing_org_config",
      "priority": "action_required",
      "show_in_header": true,
      "show_on_homepage": true
    },
    {
      "_type": "alert_descriptor_settings",
      "application_context_path": "customerlists_manage/customerAuth",
      "application_id": "sites",
      "is_user_override": true,
      "message_id": "PasswordTooShort",
      "priority": "action_required",
      "show_in_header": false,
      "show_on_homepage": true
    }
  ]
}
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.