File uploads
Create, inspect, update, delete, and download repo-scoped file uploads.
Endpoints
GET /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads
GET /api/v1/users/{username}/repos/{repo_slug}/uploads
POST /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads
POST /api/v1/users/{username}/repos/{repo_slug}/uploads
GET /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads/{upload_uuid}
GET /api/v1/users/{username}/repos/{repo_slug}/uploads/{upload_uuid}
PUT /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads/{upload_uuid}
PUT /api/v1/users/{username}/repos/{repo_slug}/uploads/{upload_uuid}
DELETE /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads/{upload_uuid}
DELETE /api/v1/users/{username}/repos/{repo_slug}/uploads/{upload_uuid}
GET /api/v1/teams/{team_slug}/repos/{repo_slug}/uploads/{upload_uuid}/content/{filename}
GET /api/v1/users/{username}/repos/{repo_slug}/uploads/{upload_uuid}/content/{filename}
Authenticated
Repo scoped
Download URLs include the original filename as the final path segment, for example
/api/v1/teams/{team_slug}/repos/{repo_slug}/uploads/{upload_uuid}/content/openapi.json.
Create payload
Uploads are sent as multipart/form-data with these fields:
file(required): the binary file partdescription(optional): free-form description textcontent_type(optional): declared content type; the server normalizes it with magic-byte sniffing
The server stores uploads under repo and file UUID buckets and derives the file extension itself.
Example
curl --request POST \
--header "Authorization: Bearer $PEARING_API_TOKEN" \
--form "file=@./screenshot.png" \
--form "description=Build screenshot" \
"$PEARING_API_URL/v1/teams/platform/repos/website/uploads"
Errors
403 Forbiddenwhen the caller cannot manage uploads in the repo.404 Not Foundwhen the repo or upload does not exist.400 Bad Requestfor malformed multipart payloads.413 Payload Too Largewhen the upload exceeds the maximum file size.