List Media

wordpress.list_media
ActionBusiness appsconnection required

Calls the WordPress API with the connection's credentials.

List items in the media library, optionally narrowed to one media type or one parent post.

Connection

Required
Yes — the node will not save without one
Auth type
Username & password
Providers
WordPress
Secret shape
{"username": "…", "password": "… the application password …"}
Config it needs
site_url
Resolved by
config.connection_id, else node.connection_id

Configuration

10 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
search
Return only items matching this search string.
stringNo———
media_type
Only attachments of this coarse type.
stringNo—one of "image", "video", "audio", "text", "application"—
mime_type
Only attachments with this exact MIME type.
stringNo——image/png
parent
Only attachments attached to this post id.
numberNo—≥ 0—
author
Only attachments uploaded by this user id.
numberNo—≥ 1—
orderby
Attribute the result set is sorted by.
stringNo—one of "date", "id", "title", "slug", "modified", "author", "include"—
order
Sort direction for the result set.
stringNo—one of "asc", "desc"—
per_page
How many items to return in one page, 1-100. WordPress defaults to 10.
numberNo—1–100—
page
Which 1-based page of the result set to return.
numberNo—≥ 1—
context
Response scope. 'view' returns rendered HTML only; 'edit' also returns the raw block markup (title.raw, content.raw) and needs edit rights on the item.
stringNoviewone of "view", "edit", "embed"—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "context": "view",
  "mime_type": "image/png"
}

Output

One shape.

result

FieldTypeExample
items
The objects WordPress returned for this page of results.
array—
count
How many objects are in items.
number—
{
  "count": 0,
  "items": []
}

Notes

  • GET /wp/v2/media.

See List Media run in a workflow.

In a technical demo we add the WordPress connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.