This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yaml
91 lines (91 loc) · 2.1 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
openapi: 3.0.1
info:
title: L0 Storage
description: Immutable Storage Service
license:
name: MIT
url: https://github.com/tiki/l0-storage/blob/main/LICENSE
version: 1.0.1
servers:
- url: https://storage.l0.mytiki.com
paths:
/api/latest/upload:
post:
tags:
- ""
summary: Upload Content
description: Upload a block/pub.key to storage bucket
operationId: l0-storage-upload-post
requestBody:
content:
application/json:
schema:
type: object
properties:
key:
type: string
content:
type: string
responses:
"201":
description: Created
security:
- jwt: []
/api/latest/token:
post:
tags:
- ""
summary: Request Access Token
description: Request an access token for uploading to storage bucket
operationId: l0-storage-token-post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenAOReq'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TokenAORsp'
security:
- oauth: []
components:
schemas:
TokenAOReq:
type: object
properties:
pubKey:
type: string
signature:
type: string
stringToSign:
type: string
TokenAORsp:
type: object
properties:
type:
type: string
token:
type: string
expires:
type: string
format: date-time
urnPrefix:
type: string
securitySchemes:
oauth:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://auth.l0.mytiki.com/api/latest/oauth/token
refreshUrl: https://auth.l0.mytiki.com/api/latest/oauth/token
scopes:
storage: this service
jwt:
type: http
scheme: bearer
bearerFormat: JWT