Upload Attachment As Release Asset (By Release ID)
Uploads attachment to a release and adds it as an asset
Request
POST
https://api.sourcecraft.tech/releases/id:{release_id}/attachments
Path parameters
|
Name |
Description |
|
release_id |
Type: string Example: `` |
Body
multipart/form-data
{
"file": "example"
}
|
Name |
Description |
|
file |
Type: string<binary> The file to upload Example: |
Responses
201 Created
A successful response.
Body
application/json
{
"id": "example",
"name": "example",
"link": "example",
"attachment": {
"id": "example",
"name": "example",
"mime_type": "example",
"file_type": "image",
"size": "example"
}
}
|
Name |
Description |
|
attachment |
Type: Attachment Example
|
|
id |
Type: string Example: |
|
link |
Type: string Example: |
|
name |
Type: string Example: |
FileType
Type: string
Enum: image, document, video, container
Attachment
|
Name |
Description |
|
file_type |
Type: FileType Enum: |
|
id |
Type: string Example: |
|
mime_type |
Type: string Example: |
|
name |
Type: string Example: |
|
size |
Type: string<int64> Example: |
Example
{
"id": "example",
"name": "example",
"mime_type": "example",
"file_type": "image",
"size": "example"
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |