Assign websites to a Malware Scanner global configuration
Assigns the websites you list in sites to one Malware Scanner global configuration. The change is immediate: the answer lists the websites that changed and the ones left out, so there is nothing to follow up.
What happens to each website:
- A website with no Malware Scanner configuration gets this one, and the scanning provider registers it in the background. A website that used another one moves to this one and takes its tier (the premium tier is metered per website and per month, with no websites included in the plan); if it was already registered, its plan is updated with the provider.
- Every assigned website is left with scanning enabled, even if it was paused. To change the configuration of one website and keep it paused, use “Update a website’s Malware Scanner settings” instead.
- Websites you do not list are never unassigned: a website leaves a configuration by moving to another one.
- A website that already uses this configuration (
ALREADY_APPLIED), or that your token cannot reach (PERMISSION_DENIED, with a nullsite_name), is reported inmeta.skippedwith areason_codeand a message instead of failing the call.
Each website in meta.updated carries site_preset_malware_scan_id, the id that “Retrieve a website’s Malware Scanner settings” and “Update a website’s Malware Scanner settings” take.
Body
sites(array of integers, required): ids of the websites to act on, 1 to 50.
Errors
- 403: the configuration is premium and the organization has not subscribed the add-on. The same gate guards creating or updating one directly.
- 422: an id that is not a website.
Authentication
AuthorizationBearer
Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.
Path parameters
preset_malware_scan
Request
This endpoint expects an object.
sites
Response
200 - Websites assigned, one skipped
jsonapi
meta
