Confirm an upload, making the media ready
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cover",
"status": "pending",
"url": "<string>",
"content_type": "<string>",
"sha256": "<string>",
"size": 123,
"width": 123,
"height": 123,
"alt": "<string>",
"position": 123,
"created_at": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Media
Confirm an upload, making the media ready
POST
/
projects
/
{owner}
/
{slug}
/
media
/
{id}
/
complete
Confirm an upload, making the media ready
curl --request POST \
--url https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/projects/{owner}/{slug}/media/{id}/complete"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cover",
"status": "pending",
"url": "<string>",
"content_type": "<string>",
"sha256": "<string>",
"size": 123,
"width": 123,
"height": 123,
"alt": "<string>",
"position": 123,
"created_at": "<string>"
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
An API key (pch_...) or the token from pch login.
Path Parameters
Example:
"patch"
Example:
"demo-mod"
Response
The media, ready
Available options:
cover, screenshot, clip pending until the upload is completed; only the project's managers see it
Available options:
pending, ready Where it's served from, once it's ready
Order among media of the same kind