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.
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.
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
1 <= length1 <= lengthQuery Parameters
Number of items per page (max 100)
Page number
Only media uploaded for this branch, staged and published alike.
1 <= lengthOnly media published to this pull request.
1 <= value <= 9007199254740991Restrict to staged media (no pull request yet) or to published media.
Value in
- "staged"
- "published"
Match media on their file name or slug.
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" } ]}Finalize a media upload POST
Confirm that a media version's bytes have been uploaded. Snapvisor reads the object back to check the file is what it claims to be, records an image's dimensions, bills it to the screenshot meter, and updates the managed pull request comment. There is no processing step: the media is usable the moment this returns. Use it right after uploading the file to the target returned by createMedia.
Update a team's defaults PATCH
Change the role given to users that join a team through its invite link or a verified email domain. Requires administrator access to the team. Use it when a team administrator wants new joiners to start with a different role.