# README
gs-bucket
Temporary web file transfer
This application will run a HTTP server to store files
Swagger documentation
GS-Bucket API v0.0.6
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
This application will run a HTTP server to store files
Email: Guionardo Furlan Web: Guionardo Furlan
auth
get__auth_
GET /auth/
List all users allowed to publish
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-key | header | string | true | API Key (master key) |
Example responses
200 Response
[
{
"key": "string",
"user": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [domain.AuthResponse] | false | none | none |
» key | string | false | none | none |
» user | string | false | none | none |
post__auth_{user}
POST /auth/{user}
Create a key for a user
Post a file to a pad, accessible for anyone
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-key | header | string | true | API Key |
user | path | string | true | User name |
Example responses
201 Response
{
"key": "string",
"user": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | domain.AuthResponse |
400 | Bad Request | Required user name | server.ErrResponse |
401 | Unauthorized | Unauthorized | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
delete__auth_{user}
DELETE /auth/{user}
Delete all keys of user
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-key | header | string | true | API Key |
user | path | string | true | User name |
Example responses
201 Response
{
"code": 0,
"error": "string",
"status": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | server.ErrResponse |
401 | Unauthorized | Unauthorized | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
pads
get__pads
GET /pads
List pads
Example responses
200 Response
[
{
"content_type": "string",
"creation_date": "string",
"delete_after_read": true,
"last_seen": "string",
"name": "string",
"owner": "string",
"seen_count": 0,
"size": 0,
"slug": "string",
"valid_until": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [domain.File] | false | none | none |
» content_type | string | false | none | none |
» creation_date | string | false | none | none |
» delete_after_read | boolean | false | none | none |
» last_seen | string | false | none | none |
» name | string | false | none | none |
» owner | string | false | none | none |
» seen_count | integer | false | none | none |
» size | integer | false | none | none |
» slug | string | false | none | none |
» valid_until | string | false | none | none |
post__pads
POST /pads
Create a pad
Post a file to a pad, accessible for anyone
Body parameter
"string"
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
api-key | header | string | true | API Key |
name | query | string | true | File name |
slug | query | string | false | Slug or easy name (if not informed, will be used a hash value) |
ttl | query | string | false | Time to live (i.Ex 300s, 1.5h or 2h45m). Valid time units are: 's', 'm', 'h') |
delete-after-read | query | boolean | false | If informed, the file will be deleted after first download. |
body | body | string | true | Content |
Example responses
201 Response
{
"content_type": "string",
"creation_date": "string",
"delete_after_read": true,
"last_seen": "string",
"name": "string",
"owner": "string",
"seen_count": 0,
"size": 0,
"slug": "string",
"valid_until": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | domain.File |
400 | Bad Request | Bad Request | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
507 | Insufficient Storage | Insufficient Storage | server.ErrResponse |
get__pads_{code}
GET /pads/{code}
Download a pad
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
code | path | string | true | File code |
Example responses
200 Response
"string"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | string |
404 | Not Found | Not Found | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
delete__pads_{code}
DELETE /pads/{code}
Delete a pad
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
code | path | string | true | File code |
Example responses
200 Response
"string"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | string |
404 | Not Found | Not Found | server.ErrResponse |
500 | Internal Server Error | Internal Server Error | server.ErrResponse |
Schemas
domain.AuthResponse
{
"key": "string",
"user": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
key | string | false | none | none |
user | string | false | none | none |
domain.File
{
"content_type": "string",
"creation_date": "string",
"delete_after_read": true,
"last_seen": "string",
"name": "string",
"owner": "string",
"seen_count": 0,
"size": 0,
"slug": "string",
"valid_until": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content_type | string | false | none | none |
creation_date | string | false | none | none |
delete_after_read | boolean | false | none | none |
last_seen | string | false | none | none |
name | string | false | none | none |
owner | string | false | none | none |
seen_count | integer | false | none | none |
size | integer | false | none | none |
slug | string | false | none | none |
valid_until | string | false | none | none |
server.ErrResponse
{
"code": 0,
"error": "string",
"status": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer | false | none | application-specific error code |
error | string | false | none | application-level error message, for debugging |
status | string | false | none | user-level status message |
swagger data generated @ Fri Aug 25 2023 17:08:18 GMT+0000 (Coordinated Universal Time)