This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
161 lines (161 loc) · 4.57 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
openapi: 3.0.1
info:
title: BTFHub Online OpenAPI3
description: This is the specifications for BTFHub-online APIs.
termsOfService: http://swagger.io/terms/
contact:
email: guya@seekret.io
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
servers:
- url: https://btfhub.seekret.io/
tags:
- name: APIs
paths:
/api/v1/list:
get:
tags:
- APIs
summary: Returns all BTFs available in the server
description: Returns list of BTF Records available in the BTF Hub
configured for the server.
operationId: /api/v1/list_GET
responses:
200:
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BTFRecordIdentifier'
/api/v1/download:
get:
tags:
- APIs
summary: Download a single BTF from the server
description: Downloads a single BTF (compressed as tar.xz file) from the acrhive
configured for the server.
operationId: /api/v1/download_GET
parameters:
- $ref: '#/components/parameters/distribution'
- $ref: '#/components/parameters/distribution_version'
- $ref: '#/components/parameters/arch'
- $ref: '#/components/parameters/kernel_version'
responses:
200:
description: successful operation
content:
application/octet-stream:
schema:
type: string
format: binary
/api/v1/customize:
post:
tags:
- APIs
summary: Generates a customize BTF for a given BPF
description: Receives a BPF binary, and a BTF identifier and returns the custom,
minimized BTF for the given BPF.
operationId: /api/v1/customize_POST
parameters:
- $ref: '#/components/parameters/distribution'
- $ref: '#/components/parameters/distribution_version'
- $ref: '#/components/parameters/arch'
- $ref: '#/components/parameters/kernel_version'
requestBody:
content:
application/x-www-form-urlencoded:
schema:
required:
- bpf
properties:
bpf:
type: string
description: The content of your BPF
format: binary
required: true
responses:
200:
description: successful operation
content:
application/octet-stream:
schema:
type: string
format: binary
components:
parameters:
distribution:
in: query
name: "distribution"
schema:
enum:
- "ubuntu"
- "debian"
- "amzn"
- "centos"
- "fedora"
type: "string"
description: "The distribution name of the host machine"
required: true
distribution_version:
in: query
name: "distribution_version"
description: "The distribution version of the host machine"
schema:
example: "20.04 or 18.04 for ubuntu. 7 o 8 for centos. 2 for amzn. 29 to 34 for fedora. 9, 10 or 11 for debian"
type: "string"
required: true
kernel_version:
in: query
name: "kernel_version"
description: "The kernel version of the host machine"
required: true
schema:
type: "string"
example: "5.11.0-1022-gcp"
arch:
in: query
name: "arch"
required: true
description: "The CPU architecture of the host machine"
schema:
enum:
- "x86_64"
- "arm64"
type: "string"
schemas:
BTFRecordIdentifier:
required:
- arch
- distribution
- distribution_version
- kernel_version
type: object
properties:
distribution:
type: string
description: The distribution name of the host machine
enum:
- ubuntu
- debian
- amzn
- centos
- fedora
distribution_version:
type: string
description: The distribution version of the host machine
example: 20.04 or 18.04 for ubuntu. 7 o 8 for centos. 2 for amzn. 29 to
34 for fedora. 9, 10 or 11 for debian
kernel_version:
type: string
description: The kernel version of the host machine
example: 5.11.0-1022-gcp
arch:
type: string
description: The CPU architecture of the host machine
enum:
- x86_64
- arm64