1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-27 17:00:52 +01:00

add new endpoints

This commit is contained in:
TGS963 2024-10-22 17:41:43 +05:30
parent fd4343db2c
commit 773ca39daa
7 changed files with 102 additions and 10 deletions

View File

@ -0,0 +1,3 @@
---
openapi: post /complete-multipart-upload
---

View File

@ -1,3 +1,3 @@
---
openapi: post /gettaskstatus
openapi: post /get-task-status
---

View File

@ -1,3 +1,3 @@
---
openapi: post /getuploadurl
openapi: post /get-upload-url
---

View File

@ -1,3 +1,3 @@
---
openapi: post /getupscaylhistory
openapi: post /get-upscayl-history
---

View File

@ -48,7 +48,7 @@
"pages": ["introduction"]
},{
"group": "API Reference",
"pages": ["get-task-status", "get-upload-url", "get-upscayl-history", "start-a-new-task"]
"pages": ["get-task-status", "get-upload-url", "complete-a-multipart-upload", "get-upscayl-history", "start-a-new-task"]
}
],
"footerSocials": {

View File

@ -4,7 +4,7 @@ info:
title: Upscayl Cloud API Documentation
version: 1.0.0
paths:
/getuploadurl:
/get-upload-url:
post:
operationId: getUploadUrl
summary: Get upload URL
@ -95,7 +95,7 @@ paths:
schema:
type: string
example: Internal Server Error
/getupscaylhistory:
/get-upscayl-history:
post:
operationId: getUpscaylHistory
summary: Get Upscayl History
@ -225,7 +225,7 @@ paths:
schema:
type: string
example: "Error getting data"
/gettaskstatus:
/get-task-status:
post:
operationId: getTaskStatus
summary: Get Task Status
@ -364,7 +364,7 @@ paths:
value: "Error getting data"
linkGenerationError:
value: "Error generating links for images"
/starttask:
/start-task:
post:
operationId: startTask
summary: Start a new task
@ -476,3 +476,92 @@ paths:
schema:
type: string
example: "Error contacting the server"
/complete-multipart-upload:
post:
operationId: completeMultipartUpload
summary: Complete a multipart upload
requestBody:
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
uploadId:
type: string
description: The upload ID
example: "exampleUploadId"
key:
type: string
description: The object key
example: "exampleKey"
parts:
type: array
items:
type: object
properties:
ETag:
type: string
description: The entity tag for the part
example: "exampleETag"
PartNumber:
type: integer
description: The part number
example: 1
required:
- uploadId
- key
- parts
responses:
"200":
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: "success"
data:
type: object
properties:
status:
type: string
example: "success"
# Uncomment and add these properties if needed
# location:
# type: string
# example: "http://example.com/location"
# bucket:
# type: string
# example: "exampleBucket"
# key:
# type: string
# example: "exampleKey"
# eTag:
# type: string
# example: "exampleETag"
"400":
description: Bad request
content:
text/plain:
schema:
type: string
example: "Bad Request: Missing required parameters"
"401":
description: Unauthorized
content:
text/plain:
schema:
type: string
example: "Unauthorized: Invalid API key"
"500":
description: Internal server error
content:
text/plain:
schema:
type: string
example: "Internal Server Error: Error completing multipart upload"

View File

@ -1,3 +1,3 @@
---
openapi: post /starttask
openapi: post /start-task
---