Skip to content

Commit 610d797

Browse files
author
github-actions
committed
Update REST API documentation Tue Apr 29 19:07:48 UTC 2025
1 parent 07bbc8a commit 610d797

File tree

1 file changed

+228
-0
lines changed

1 file changed

+228
-0
lines changed

restapi.json

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,143 @@
1919
}
2020
],
2121
"paths": {
22+
"/administrators": {
23+
"post": {
24+
"tags": [
25+
"administrators"
26+
],
27+
"summary": "Create Administrator",
28+
"description": "Create a new administrator.",
29+
"operationId": "1013162c6a956cba858f57d66ca65043",
30+
"requestBody": {
31+
"description": "Administrator data",
32+
"required": true,
33+
"content": {
34+
"application/json": {
35+
"schema": {
36+
"$ref": "#/components/schemas/CreateAdministratorRequest"
37+
}
38+
}
39+
}
40+
},
41+
"responses": {
42+
"201": {
43+
"description": "Administrator created successfully",
44+
"content": {
45+
"application/json": {
46+
"schema": {
47+
"$ref": "#/components/schemas/CreateAdministratorRequest"
48+
}
49+
}
50+
}
51+
},
52+
"400": {
53+
"description": "Invalid input"
54+
}
55+
}
56+
}
57+
},
58+
"/administrators/{administratorId}": {
59+
"get": {
60+
"tags": [
61+
"administrators"
62+
],
63+
"summary": "Get Administrator",
64+
"description": "Get administrator by ID.",
65+
"operationId": "025e7c081c2b7e0848d91e6fde8e869d",
66+
"parameters": [
67+
{
68+
"name": "administratorId",
69+
"in": "path",
70+
"description": "Administrator ID",
71+
"required": true,
72+
"schema": {
73+
"type": "integer"
74+
}
75+
}
76+
],
77+
"responses": {
78+
"200": {
79+
"description": "Administrator found",
80+
"content": {
81+
"application/json": {
82+
"schema": {
83+
"$ref": "#/components/schemas/Administrator"
84+
}
85+
}
86+
}
87+
},
88+
"404": {
89+
"description": "Administrator not found"
90+
}
91+
}
92+
},
93+
"put": {
94+
"tags": [
95+
"administrators"
96+
],
97+
"summary": "Update Administrator",
98+
"description": "Update an administrator.",
99+
"operationId": "1de726c395eb8f1a6ea01bf610eee69b",
100+
"parameters": [
101+
{
102+
"name": "administratorId",
103+
"in": "path",
104+
"description": "Administrator ID",
105+
"required": true,
106+
"schema": {
107+
"type": "integer"
108+
}
109+
}
110+
],
111+
"requestBody": {
112+
"description": "Administrator update data",
113+
"required": true,
114+
"content": {
115+
"application/json": {
116+
"schema": {
117+
"$ref": "#/components/schemas/UpdateAdministratorRequest"
118+
}
119+
}
120+
}
121+
},
122+
"responses": {
123+
"200": {
124+
"description": "Administrator updated successfully"
125+
},
126+
"404": {
127+
"description": "Administrator not found"
128+
}
129+
}
130+
},
131+
"delete": {
132+
"tags": [
133+
"administrators"
134+
],
135+
"summary": "Delete Administrator",
136+
"description": "Delete an administrator.",
137+
"operationId": "d7432de5f213120f3f5b022fa9a0f596",
138+
"parameters": [
139+
{
140+
"name": "administratorId",
141+
"in": "path",
142+
"description": "Administrator ID",
143+
"required": true,
144+
"schema": {
145+
"type": "integer"
146+
}
147+
}
148+
],
149+
"responses": {
150+
"204": {
151+
"description": "Administrator deleted successfully"
152+
},
153+
"404": {
154+
"description": "Administrator not found"
155+
}
156+
}
157+
}
158+
},
22159
"/campaigns": {
23160
"get": {
24161
"tags": [
@@ -1820,6 +1957,66 @@
18201957
},
18211958
"type": "object"
18221959
},
1960+
"CreateAdministratorRequest": {
1961+
"required": [
1962+
"login_name",
1963+
"password",
1964+
"email",
1965+
"super_user"
1966+
],
1967+
"properties": {
1968+
"login_name": {
1969+
"type": "string",
1970+
"maxLength": 255,
1971+
"minLength": 3,
1972+
"example": "admin"
1973+
},
1974+
"password": {
1975+
"type": "string",
1976+
"format": "password",
1977+
"maxLength": 255,
1978+
"minLength": 6,
1979+
"example": "StrongP@ssw0rd"
1980+
},
1981+
"email": {
1982+
"type": "string",
1983+
"format": "email",
1984+
"example": "[email protected]"
1985+
},
1986+
"super_user": {
1987+
"type": "boolean",
1988+
"example": false
1989+
}
1990+
},
1991+
"type": "object"
1992+
},
1993+
"UpdateAdministratorRequest": {
1994+
"properties": {
1995+
"login_name": {
1996+
"type": "string",
1997+
"maxLength": 255,
1998+
"minLength": 3,
1999+
"example": "admin"
2000+
},
2001+
"password": {
2002+
"type": "string",
2003+
"format": "password",
2004+
"maxLength": 255,
2005+
"minLength": 6,
2006+
"example": "StrongP@ssw0rd"
2007+
},
2008+
"email": {
2009+
"type": "string",
2010+
"format": "email",
2011+
"example": "[email protected]"
2012+
},
2013+
"super_user": {
2014+
"type": "boolean",
2015+
"example": false
2016+
}
2017+
},
2018+
"type": "object"
2019+
},
18232020
"UnauthorizedResponse": {
18242021
"properties": {
18252022
"message": {
@@ -2182,10 +2379,41 @@
21822379
}
21832380
},
21842381
"type": "object"
2382+
},
2383+
"Administrator": {
2384+
"properties": {
2385+
"id": {
2386+
"type": "integer",
2387+
"example": 1
2388+
},
2389+
"login_name": {
2390+
"type": "string",
2391+
"example": "admin"
2392+
},
2393+
"email": {
2394+
"type": "string",
2395+
"format": "email",
2396+
"example": "[email protected]"
2397+
},
2398+
"super_user": {
2399+
"type": "boolean",
2400+
"example": true
2401+
},
2402+
"created_at": {
2403+
"type": "string",
2404+
"format": "date-time",
2405+
"example": "2025-04-29T12:34:56+00:00"
2406+
}
2407+
},
2408+
"type": "object"
21852409
}
21862410
}
21872411
},
21882412
"tags": [
2413+
{
2414+
"name": "administrators",
2415+
"description": "administrators"
2416+
},
21892417
{
21902418
"name": "campaigns",
21912419
"description": "campaigns"

0 commit comments

Comments
 (0)