Skip to content

Delete one artifacts folder and sync related meta

DELETE
/wp-json/wp2/media-converter/v1/attachments/{id}/artifacts/{folder}
curl --request DELETE \
--url https://example.com/wp-json/wp2/media-converter/v1/attachments/1/artifacts/sources \
--header 'X-WP-Nonce: <X-WP-Nonce>'

Deletes one artifacts folder and syncs related attachment meta. The response is the updated artifacts list.

id
required
integer

Numeric entity id.

folder
required
string
Allowed values: sources subtitles chapters thumbnails stills

Artifacts folder: sources, subtitles, chapters, thumbnails, stills.

Artifact listing after folder delete.

Media typeapplication/json
object
attachment_id

Video attachment ID.

integer
basename

Movie basename without extension.

string
sources

Files in the sources folder (HLS/MP4, etc.).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
subtitles

Subtitle files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
chapters

Chapter files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
thumbnails

Seekbar sprite/VTT files.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
stills

Still frames (*_thumbN.jpg).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
formats

Map of format key → exists/url.

object
key
additional properties
object
exists

True if this format file already exists on disk.

boolean
url

Format file URL, or an empty string.

string
poster

Poster URL from attachment meta (may be empty).

string
Examplegenerated
{
"attachment_id": 1,
"basename": "example",
"sources": [
{
"name": "example",
"url": "example",
"bytes": 1
}
],
"subtitles": [
{
"name": "example",
"url": "example",
"bytes": 1
}
],
"chapters": [
{
"name": "example",
"url": "example",
"bytes": 1
}
],
"thumbnails": [
{
"name": "example",
"url": "example",
"bytes": 1
}
],
"stills": [
{
"name": "example",
"url": "example",
"bytes": 1
}
],
"formats": {
"additionalProperty": {
"exists": true,
"url": "example"
}
},
"poster": "example"
}

Invalid_folder

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Not authenticated. WordPress REST: rest_not_logged_in / rest_forbidden. Use cookie + X-WP-Nonce or Application Password.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Insufficient capability or invalid REST nonce. WordPress REST: rest_forbidden / rest_cookie_invalid_nonce.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}