Snapvisor Docs

List a project's media

List the standalone images and videos uploaded to a project, most recent first. `branch` and `prNumber` are what this is usually for: everything uploaded for the work in hand, whether or not a pull request exists yet. `branch` covers both — a media keeps its branch after publishing — so it stays a single query across the moment the pull request opens. Use it to find everything uploaded for a branch or pull request.

GET
/projects/{owner}/{project}/media

List the standalone images and videos uploaded to a project, most recent first.

branch and prNumber are what this is usually for: everything uploaded for the work in hand, whether or not a pull request exists yet. branch covers both — a media keeps its branch after publishing — so it stays a single query across the moment the pull request opens.

Use it to find everything uploaded for a branch or pull request.

Authorization

AuthorizationBearer <token>

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

owner*string
Length1 <= length
project*string
Length1 <= length

Query Parameters

perPage?string

Number of items per page (max 100)

page?string

Page number

branch?string

Only media uploaded for this branch, staged and published alike.

Length1 <= length
prNumber?integer

Only media published to this pull request.

Range1 <= value <= 9007199254740991
stage?string

Restrict to staged media (no pull request yet) or to published media.

Value in

  • "staged"
  • "published"
search?string

Match media on their file name or slug.

type?string

Restrict to images or to videos.

Value in

  • "image"
  • "video"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/projects/string/string/media"
{  "pageInfo": {    "total": 0,    "page": 0,    "perPage": 0  },  "results": [    {      "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"    }  ]}