This repository was archived by the owner on Apr 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.json
More file actions
1 lines (1 loc) · 11.6 KB
/
docs.json
File metadata and controls
1 lines (1 loc) · 11.6 KB
1
{"openapi":"3.0.1","info":{"title":"Ascella Image uploader","description":"Ascella is the fastest image uploader utilizing rust to bring you the fastest\nupload speeds\n\n# Suggesting new routes\n\nYou can suggest new routes in the discord or send tricked#3777 a dm privaty for\nyour use case for the route. Or even better you can make a pull request adding\nthe route\n\n# Contributing\n\nYou can help by setting the right status code for every response this would help\na ton in making the api docs!\n\n# Typescript interfaces\n\nYou can find typescript interfaces in the github repository in the\nascella/bindings directory\n","contact":{"name":"Tricked","url":"https://tricked.pro","email":"tricked@tricked.pro"},"license":{"name":"AGPL-3.0","url":"https://github.com/ascellahost/tsunami/blob/master/LICENSE"},"version":"2.0"},"servers":[{"url":"//ascella.wtf/"}],"tags":[{"name":"Images","description":"Stuff related to images"},{"name":"Dashboard","description":"Stuff related to the Dashboard"},{"name":"Etc","description":"Stuff not related to the above"}],"paths":{"/v2/ascella/config":{"get":{"tags":["Etc"],"summary":"get config","description":"Returns the upload config of the given auth token","parameters":[{"name":"auth","in":"query","required":true,"schema":{"type":"string"}}]}},"/v2/ascella/domain":{"post":{"tags":["Dashboard"],"summary":"set domain","description":"set the domain of the user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainData"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}}},"security":[{"apiKey":[]}],"x-codegen-request-body-name":"body"}},"/v2/ascella/domains":{"get":{"tags":["Etc"],"summary":"get domains","description":"Returns all ascella domains","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}}},"/v2/ascella/embed":{"post":{"tags":["Dashboard"],"summary":"set embed","description":"set the embed of the user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedData"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}}},"security":[{"apiKey":[]}],"x-codegen-request-body-name":"body"}},"/v2/ascella/images":{"post":{"tags":["Dashboard"],"summary":"get images","description":"View the images of a user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryData"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SimpleImages"}}}}}},"security":[{"apiKey":[]}],"x-codegen-request-body-name":"body"}},"/v2/ascella/language.json":{"get":{"tags":["Etc"],"summary":"get a language","description":"Get a language file of ascella","parameters":[{"name":"lang","in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LanguagesResponse"}}}}}}},"/v2/ascella/public":{"post":{"tags":["Dashboard"],"summary":"make a image public","description":"Make a image public this endpoint is useless atm","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}}},"security":[{"apiKey":[]}]}},"/v2/ascella/redirect":{"post":{"tags":["Dashboard"],"summary":"Create a redirect","description":"Used to create redirects","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedirectData"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}}},"security":[{"apiKey":[]}],"x-codegen-request-body-name":"body"}},"/v2/ascella/reviews.json":{"get":{"tags":["Etc"],"summary":"get reviews","description":"Get ascella reviews!","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}}}}}}}},"/v2/ascella/stats.json":{"get":{"tags":["Etc"],"summary":"get ascella stats","description":"provides some cool stats about ascella to use somewhere","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AscellaStats"}}}}}}},"/v2/ascella/upload":{"post":{"tags":["Images"],"summary":"create a image","description":"Upload a image to ascella","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file_data"],"properties":{"file_data":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSuccess"}}}}},"security":[{"apiKey":[]}]}},"/v2/ascella/upload_style":{"post":{"tags":["Dashboard"],"summary":"set domain","description":"set the domain of the user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStyleData"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}}},"security":[{"apiKey":[]}],"x-codegen-request-body-name":"body"}},"/v2/ascella/verify":{"post":{"summary":"verify a user","description":"Used to check if a user is verified","responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Users"}}}}},"security":[{"apiKey":[]}]}},"/v2/ascella/view/{image}.{ext:(gif|webp|jpg|jpeg|png)$}":{"get":{"tags":["Images"],"summary":"get image","description":"View a image uploaded to ascella","parameters":[{"name":"image","in":"path","required":true,"schema":{"type":"string"}},{"name":"ext:(gif|webp|jpg|jpeg|png)$","in":"path","required":true,"schema":{"type":"string"}}]}},"/v2/ascella/view/{image}/stats":{"get":{"tags":["Images"],"summary":"get image stats","description":"View the stats & info of an image","parameters":[{"name":"image","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}}}}},"components":{"schemas":{"AscellaStats":{"required":["commit_hash","created_date","discord_api_version","fast","rustc","total_domains","total_uploads","total_users","total_views","upload_size","uptime","usage"],"type":"object","properties":{"commit_hash":{"type":"string","description":"THe commit hash used by ascella","example":"https://github.com/ascellahost/tsunami/commit/e968eb666fa3b0ea974248c30931a9210919fd44"},"created_date":{"type":"integer","description":"The unix timestamp ascella was created","format":"int64","example":1629305469},"discord_api_version":{"type":"integer","description":"The api version twilight uses","format":"int32","example":10},"fast":{"type":"boolean","description":"If ascella is fast obviously"},"rustc":{"type":"string","description":"Rustc info","example":"rustc 1.62.0-nightly (4c60a0ea5 2022-05-04)"},"total_domains":{"type":"integer","description":"The amount of domains ascella has use the domains endpoint to find out\n which","format":"int64","example":17},"total_uploads":{"type":"integer","description":"Total amount of images uploade to ascella (includes redirects)","format":"int64","example":6441},"total_users":{"type":"integer","description":"Amount of userst that ran /redeem","format":"int64","example":100},"total_views":{"type":"integer","description":"Total amount of views a image has","format":"int64","example":87545},"upload_size":{"type":"string","description":"Size of uploads currently broken :("},"uptime":{"type":"string","description":"Ascella uptime - since last restart for update","example":"1day 10h 7m 42s 572ms 387us 449ns"},"usage":{"type":"string","description":"Memory usage by the rust process","example":"56.89 MB"}}},"Comment":{"required":["avatar","comment","name"],"type":"object","properties":{"avatar":{"type":"string","example":"https://cdn.discordapp.com/embed/avatars/5.png"},"comment":{"type":"string","example":"havent heard any voices since i started using ascella!"},"name":{"type":"string","example":"Deleted User"}}},"Domain":{"required":["apex","domain","owner"],"type":"object","properties":{"apex":{"type":"boolean","description":"Weather or not this is a apex domain"},"domain":{"type":"string","example":"Ascella.host"},"owner":{"type":"integer","description":"Id of the user who owns this domain","format":"int32"}},"description":"Domain\n\n A single domain in a domain vector"},"DomainData":{"required":["domain"],"type":"object","properties":{"domain":{"type":"string"}},"description":"DomainData\n\n Set your new domain here!"},"EmbedData":{"type":"object","properties":{"author":{"type":"string","example":"Some author"},"color":{"type":"string","example":"#5f8f91"},"description":{"type":"string","example":"This is a image"},"link":{"type":"string"},"title":{"type":"string","example":"Hi"},"url":{"type":"string"}},"description":"EmbedData\n\n Data for the embed"},"LanguagesResponse":{"required":["data"],"type":"object","properties":{"data":{"type":"object"}}},"QueryData":{"required":["skip"],"type":"object","properties":{"skip":{"type":"integer","format":"int32"}},"description":"QueryData\n\n The data required to view stuff"},"RedirectData":{"required":["to","vanity"],"type":"object","properties":{"to":{"type":"string","example":"https://google.com"},"vanity":{"type":"string","example":"google"}},"description":"RedirectData\n\n Set the redirect"},"SendMessage":{"required":["code","message","success"],"type":"object","properties":{"code":{"type":"integer","format":"int32","example":200},"message":{"type":"string","example":"Succesful Response"},"success":{"type":"boolean"}}},"SimpleImages":{"required":["id","vanity"],"type":"object","properties":{"id":{"type":"integer","format":"int32"},"vanity":{"type":"string"}}},"StatsResponse":{"required":["content_type","id","user_id","user_name","views"],"type":"object","properties":{"content_type":{"type":"string"},"embed":{"type":"object","properties":{"color":{"type":"string"},"description":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}}},"id":{"type":"integer","format":"int32"},"image_size":{"type":"string"},"redirect":{"type":"string"},"user_id":{"type":"integer","format":"int32"},"user_name":{"type":"string"},"views":{"type":"integer","format":"int32"}},"description":"View stats of a image"},"UploadStyleData":{"required":["style"],"type":"object","properties":{"style":{"type":"integer","format":"int32"}},"description":"UploadStyleData\n\n Set your new domain here!"},"UploadSuccess":{"required":["code","raw","success","url"],"type":"object","properties":{"code":{"type":"integer","format":"int32","example":200},"raw":{"type":"string","example":"https://ascella.wtf/v2/ascella/view/tdaCZHo1.png"},"success":{"type":"boolean","example":true},"url":{"type":"string","example":"https://ascella.host/tdaCZHo1"}}},"Users":{"required":["discord_id","domain","flags","id","invited_by","key","lang","name","url_style"],"type":"object","properties":{"autodelete":{"type":"integer","format":"int32"},"deleteall":{"type":"integer","format":"int32"},"discord_id":{"type":"string"},"domain":{"type":"string"},"flags":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"invite_code":{"type":"string"},"invited_by":{"type":"integer","format":"int32"},"key":{"type":"string"},"lang":{"type":"string"},"name":{"type":"string"},"upload_key":{"type":"string"},"url_style":{"type":"integer","format":"int32"}}}},"securitySchemes":{"apiKey":{"type":"apiKey","description":"Use format 'TOKEN'","name":"Authorization","in":"header"}}}}