Update a staged media
Change a staged media's name, description or branch. Staged media only. A media's name and branch are its identity — what decides whether the next upload of that name is a new version or a new media, and which pull request will publish it — and once it is published that identity is what the pull request comment is built from and what a reviewer's comments hang off. Editing it there would rewrite history rather than correct a staged media. Omitted fields are left alone. `description` and `branch` accept `null` to clear them; `name` is required and has no cleared state. Clearing a staged media's branch leaves it attached to nothing, so no pull request will ever publish it. Use it to correct a staged media's name, description or branch before a pull request publishes it.
Change a staged media's name, description or branch.
Staged media only. A media's name and branch are its identity — what decides whether the next upload of that name is a new version or a new media, and which pull request will publish it — and once it is published that identity is what the pull request comment is built from and what a reviewer's comments hang off. Editing it there would rewrite history rather than correct a staged media.
Omitted fields are left alone. description and branch accept null to clear them; name is required and has no cleared state. Clearing a staged media's branch leaves it attached to nothing, so no pull request will ever publish it.
Use it to correct a staged media's name, description or branch before a pull request publishes it.
Authenticate as a project with a project token.
Send it as a bearer token in the Authorization header:
Authorization: Bearer <project-token>You can find your project token in your Snapvisor project settings. Project tokens are used by CI and the SDK to create builds and deployments.
In: header
Path Parameters
The media ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/media/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "state": "before", "description": "string", "stage": "staged", "branch": "string", "prNumber": 0, "url": "http://example.com", "markdown": "string", "version": 0, "versionCount": 0, "fileUrl": "http://example.com", "posterUrl": "http://example.com", "contentType": "string", "sizeBytes": 0, "width": 0, "height": 0, "visibility": "team", "status": "pending", "expiresAt": "string", "createdAt": "string"}Get a media GET
Retrieve a single media by its ID, including its share URL and ready-to-paste Markdown. Use it when you have a media ID and need its share URL, Markdown embed or upload state.
Delete a media DELETE
Delete a media and the files behind it. Any share link or pull request embed pointing at it stops working immediately. Use it when the user asks to remove an uploaded image or video permanently.