Metaboxes & Widgets
Get All Components
Fetch list of metaboxes or widgets (we call them collectively as components) for all screens or for any given one.
Endpoint
GET /aam/v2/service/components
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
screen_id | Optional. Return list of components only for given screen. By default - return all. |
Response Sample
[
{
"id": 3505240451,
"slug": "wp_widget_pages",
"screen_id": "frontend",
"name": "Pages",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1077778284,
"slug": "wp_widget_calendar",
"screen_id": "frontend",
"name": "Calendar",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3438729747,
"slug": "wp_widget_archives",
"screen_id": "frontend",
"name": "Archives",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1287714580,
"slug": "wp_widget_media_audio",
"screen_id": "frontend",
"name": "Audio",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2441135582,
"slug": "wp_widget_media_image",
"screen_id": "frontend",
"name": "Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2312140715,
"slug": "wp_widget_media_gallery",
"screen_id": "frontend",
"name": "Gallery",
"is_hidden": false,
"is_inherited": true
},
{
"id": 679091117,
"slug": "wp_widget_media_video",
"screen_id": "frontend",
"name": "Video",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1094559397,
"slug": "wp_widget_meta",
"screen_id": "frontend",
"name": "Meta",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3772650962,
"slug": "wp_widget_search",
"screen_id": "frontend",
"name": "Search",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2906920279,
"slug": "wp_widget_text",
"screen_id": "frontend",
"name": "Text",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2585932109,
"slug": "wp_widget_categories",
"screen_id": "frontend",
"name": "Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4134583611,
"slug": "wp_widget_recent_posts",
"screen_id": "frontend",
"name": "Recent Posts",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3312296081,
"slug": "wp_widget_recent_comments",
"screen_id": "frontend",
"name": "Recent Comments",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2737861077,
"slug": "wp_widget_rss",
"screen_id": "frontend",
"name": "RSS",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3408220722,
"slug": "wp_widget_tag_cloud",
"screen_id": "frontend",
"name": "Tag Cloud",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3262270181,
"slug": "wp_nav_menu_widget",
"screen_id": "frontend",
"name": "Navigation Menu",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1386951976,
"slug": "wp_widget_custom_html",
"screen_id": "frontend",
"name": "Custom HTML",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1937951700,
"slug": "wp_widget_block",
"screen_id": "frontend",
"name": "Block",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4215155082,
"slug": "aam_backend_widget_login",
"screen_id": "frontend",
"name": "AAM Secure Login",
"is_hidden": false,
"is_inherited": true
},
{
"id": 856074234,
"slug": "dashboard_site_health",
"screen_id": "dashboard",
"name": "Site Health Status",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3777372316,
"slug": "dashboard_right_now",
"screen_id": "dashboard",
"name": "At A Glance",
"is_hidden": false,
"is_inherited": true
},
{
"id": 128113210,
"slug": "dashboard_activity",
"screen_id": "dashboard",
"name": "Activity",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2819809679,
"slug": "dashboard_quick_press",
"screen_id": "dashboard",
"name": "Quick Draft Your Recent Drafts",
"is_hidden": false,
"is_inherited": true
},
{
"id": 279696297,
"slug": "dashboard_primary",
"screen_id": "dashboard",
"name": "WordPress Events And News",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1411954378,
"slug": "submitdiv",
"screen_id": "post",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 145378072,
"slug": "formatdiv",
"screen_id": "post",
"name": "Format",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1244554748,
"slug": "categorydiv",
"screen_id": "post",
"name": "Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2077369295,
"slug": "tagsdiv-post_tag",
"screen_id": "post",
"name": "Tags",
"is_hidden": false,
"is_inherited": true
},
{
"id": 168514290,
"slug": "postimagediv",
"screen_id": "post",
"name": "Featured Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 338020624,
"slug": "postexcerpt",
"screen_id": "post",
"name": "Excerpt",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2181101135,
"slug": "trackbacksdiv",
"screen_id": "post",
"name": "Send Trackbacks",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3567359743,
"slug": "postcustom",
"screen_id": "post",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3186223926,
"slug": "commentstatusdiv",
"screen_id": "post",
"name": "Discussion",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2693779313,
"slug": "slugdiv",
"screen_id": "post",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 687230470,
"slug": "authordiv",
"screen_id": "post",
"name": "Author",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3467147250,
"slug": "submitdiv",
"screen_id": "page",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 662560305,
"slug": "pageparentdiv",
"screen_id": "page",
"name": "Page Attributes",
"is_hidden": false,
"is_inherited": true
},
{
"id": 522879855,
"slug": "postimagediv",
"screen_id": "page",
"name": "Featured Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4231638688,
"slug": "postcustom",
"screen_id": "page",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2680847424,
"slug": "commentstatusdiv",
"screen_id": "page",
"name": "Discussion",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1728549847,
"slug": "slugdiv",
"screen_id": "page",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2994114366,
"slug": "authordiv",
"screen_id": "page",
"name": "Author",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2132835203,
"slug": "submitdiv",
"screen_id": "wp_block",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2598737735,
"slug": "tagsdiv-wp_pattern_category",
"screen_id": "wp_block",
"name": "Pattern Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3683280646,
"slug": "postcustom",
"screen_id": "wp_block",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1373073344,
"slug": "slugdiv",
"screen_id": "wp_block",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 55252600,
"slug": "submitdiv",
"screen_id": "wp_navigation",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1858575038,
"slug": "slugdiv",
"screen_id": "wp_navigation",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 104901208,
"slug": "submitdiv",
"screen_id": "aam_policy",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 652934691,
"slug": "aam-policy-assignee",
"screen_id": "aam_policy",
"name": "Access Policy Assignee",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1129525167,
"slug": "postexcerpt",
"screen_id": "aam_policy",
"name": "Excerpt",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3404860555,
"slug": "postcustom",
"screen_id": "aam_policy",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1579908209,
"slug": "slugdiv",
"screen_id": "aam_policy",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1798201405,
"slug": "aam_policy",
"screen_id": "aam_policy",
"name": "Access Policy Document",
"is_hidden": false,
"is_inherited": true
}
]
Get Single Component
Fetch details of a single component by its ID.
Endpoint
GET /aam/v2/service/component/<id>
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
id | Required. Unique numeric ID generated by AAM. |
Response Sample
{
"id": 3505240451,
"slug": "wp_widget_pages",
"screen_id": "frontend",
"name": "Pages",
"is_hidden": false,
"is_inherited": true
}
Update Component Permissions
Set or update permissions for a specific component.
Endpoint
POST /aam/v2/service/component/<id>
PATCH /aam/v2/service/component/<id>
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
id | Required. Unique numeric component ID generated by AAM. |
is_hidden | Optional. Whether the component is hidden or not. Default is true . |
Response Sample
{
"id": 3505240451,
"slug": "wp_widget_pages",
"screen_id": "frontend",
"name": "Pages",
"is_hidden": true,
"is_inherited": false
}
Reset Component Permissions
Reset permissions for a specific component to default.
Endpoint
DELETE /aam/v2/service/component/<id>
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
id | Required. Unique numeric component ID generated by AAM. |
Response Sample
{
"id": 3505240451,
"slug": "wp_widget_pages",
"screen_id": "frontend",
"name": "Pages",
"is_hidden": false,
"is_inherited": true
}
Reset All Permissions
Reset all component permissions to default.
Endpoint
DELETE /aam/v2/service/components
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
Response Sample
[
{
"id": 3505240451,
"slug": "wp_widget_pages",
"screen_id": "frontend",
"name": "Pages",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1077778284,
"slug": "wp_widget_calendar",
"screen_id": "frontend",
"name": "Calendar",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3438729747,
"slug": "wp_widget_archives",
"screen_id": "frontend",
"name": "Archives",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1287714580,
"slug": "wp_widget_media_audio",
"screen_id": "frontend",
"name": "Audio",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2441135582,
"slug": "wp_widget_media_image",
"screen_id": "frontend",
"name": "Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2312140715,
"slug": "wp_widget_media_gallery",
"screen_id": "frontend",
"name": "Gallery",
"is_hidden": false,
"is_inherited": true
},
{
"id": 679091117,
"slug": "wp_widget_media_video",
"screen_id": "frontend",
"name": "Video",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1094559397,
"slug": "wp_widget_meta",
"screen_id": "frontend",
"name": "Meta",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3772650962,
"slug": "wp_widget_search",
"screen_id": "frontend",
"name": "Search",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2906920279,
"slug": "wp_widget_text",
"screen_id": "frontend",
"name": "Text",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2585932109,
"slug": "wp_widget_categories",
"screen_id": "frontend",
"name": "Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4134583611,
"slug": "wp_widget_recent_posts",
"screen_id": "frontend",
"name": "Recent Posts",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3312296081,
"slug": "wp_widget_recent_comments",
"screen_id": "frontend",
"name": "Recent Comments",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2737861077,
"slug": "wp_widget_rss",
"screen_id": "frontend",
"name": "RSS",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3408220722,
"slug": "wp_widget_tag_cloud",
"screen_id": "frontend",
"name": "Tag Cloud",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3262270181,
"slug": "wp_nav_menu_widget",
"screen_id": "frontend",
"name": "Navigation Menu",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1386951976,
"slug": "wp_widget_custom_html",
"screen_id": "frontend",
"name": "Custom HTML",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1937951700,
"slug": "wp_widget_block",
"screen_id": "frontend",
"name": "Block",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4215155082,
"slug": "aam_backend_widget_login",
"screen_id": "frontend",
"name": "AAM Secure Login",
"is_hidden": false,
"is_inherited": true
},
{
"id": 856074234,
"slug": "dashboard_site_health",
"screen_id": "dashboard",
"name": "Site Health Status",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3777372316,
"slug": "dashboard_right_now",
"screen_id": "dashboard",
"name": "At A Glance",
"is_hidden": false,
"is_inherited": true
},
{
"id": 128113210,
"slug": "dashboard_activity",
"screen_id": "dashboard",
"name": "Activity",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2819809679,
"slug": "dashboard_quick_press",
"screen_id": "dashboard",
"name": "Quick Draft Your Recent Drafts",
"is_hidden": false,
"is_inherited": true
},
{
"id": 279696297,
"slug": "dashboard_primary",
"screen_id": "dashboard",
"name": "WordPress Events And News",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1411954378,
"slug": "submitdiv",
"screen_id": "post",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 145378072,
"slug": "formatdiv",
"screen_id": "post",
"name": "Format",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1244554748,
"slug": "categorydiv",
"screen_id": "post",
"name": "Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2077369295,
"slug": "tagsdiv-post_tag",
"screen_id": "post",
"name": "Tags",
"is_hidden": false,
"is_inherited": true
},
{
"id": 168514290,
"slug": "postimagediv",
"screen_id": "post",
"name": "Featured Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 338020624,
"slug": "postexcerpt",
"screen_id": "post",
"name": "Excerpt",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2181101135,
"slug": "trackbacksdiv",
"screen_id": "post",
"name": "Send Trackbacks",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3567359743,
"slug": "postcustom",
"screen_id": "post",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3186223926,
"slug": "commentstatusdiv",
"screen_id": "post",
"name": "Discussion",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2693779313,
"slug": "slugdiv",
"screen_id": "post",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 687230470,
"slug": "authordiv",
"screen_id": "post",
"name": "Author",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3467147250,
"slug": "submitdiv",
"screen_id": "page",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 662560305,
"slug": "pageparentdiv",
"screen_id": "page",
"name": "Page Attributes",
"is_hidden": false,
"is_inherited": true
},
{
"id": 522879855,
"slug": "postimagediv",
"screen_id": "page",
"name": "Featured Image",
"is_hidden": false,
"is_inherited": true
},
{
"id": 4231638688,
"slug": "postcustom",
"screen_id": "page",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2680847424,
"slug": "commentstatusdiv",
"screen_id": "page",
"name": "Discussion",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1728549847,
"slug": "slugdiv",
"screen_id": "page",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2994114366,
"slug": "authordiv",
"screen_id": "page",
"name": "Author",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2132835203,
"slug": "submitdiv",
"screen_id": "wp_block",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 2598737735,
"slug": "tagsdiv-wp_pattern_category",
"screen_id": "wp_block",
"name": "Pattern Categories",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3683280646,
"slug": "postcustom",
"screen_id": "wp_block",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1373073344,
"slug": "slugdiv",
"screen_id": "wp_block",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 55252600,
"slug": "submitdiv",
"screen_id": "wp_navigation",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1858575038,
"slug": "slugdiv",
"screen_id": "wp_navigation",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 104901208,
"slug": "submitdiv",
"screen_id": "aam_policy",
"name": "Publish",
"is_hidden": false,
"is_inherited": true
},
{
"id": 652934691,
"slug": "aam-policy-assignee",
"screen_id": "aam_policy",
"name": "Access Policy Assignee",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1129525167,
"slug": "postexcerpt",
"screen_id": "aam_policy",
"name": "Excerpt",
"is_hidden": false,
"is_inherited": true
},
{
"id": 3404860555,
"slug": "postcustom",
"screen_id": "aam_policy",
"name": "Custom Fields",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1579908209,
"slug": "slugdiv",
"screen_id": "aam_policy",
"name": "Slug",
"is_hidden": false,
"is_inherited": true
},
{
"id": 1798201405,
"slug": "aam_policy",
"screen_id": "aam_policy",
"name": "Access Policy Document",
"is_hidden": false,
"is_inherited": true
}
]
(Premium) Get Access Mode
Fetch the current access mode for all screens or for any given one.
Endpoint
GET /aam/v2/service/components/mode
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
screen_id | Optional. Return list of components only for given screen. By default - return all. |
Response Sample
[
{
"screen_id": "frontend",
"mode": "default"
},
{
"screen_id": "dashboard",
"mode": "default"
},
{
"screen_id": "post",
"mode": "default"
},
{
"screen_id": "page",
"mode": "default"
},
{
"screen_id": "wp_block",
"mode": "default"
},
{
"screen_id": "wp_navigation",
"mode": "default"
},
{
"screen_id": "aam_policy",
"mode": "default"
}
]
(Premium) Set Access Mode
Set the access mode for all screens or only a given one.
Endpoint
POST /aam/v2/service/components/mode
Parameters
Name | Description |
---|---|
access_level | Required. Can be either "role", "user", "visitor" or "default". |
role_id | Conditionally required if access_level is "role". |
user_id | Conditionally required if access_level is "user". |
screen_id | Optional. Return list of components only for given screen. By default - return all. |
mode | Optional. The access mode. Can be either "default" or "restricted". If not provided, the "restricted" mode will be set. |
Response Sample
[
{
"screen_id": "frontend",
"mode": "restricted"
},
{
"screen_id": "dashboard",
"mode": "restricted"
},
{
"screen_id": "post",
"mode": "restricted"
},
{
"screen_id": "page",
"mode": "restricted"
},
{
"screen_id": "wp_block",
"mode": "restricted"
},
{
"screen_id": "wp_navigation",
"mode": "restricted"
},
{
"screen_id": "aam_policy",
"mode": "restricted"
}
]