@@ -295,6 +295,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/token": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Creates a new user with permissions",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -354,6 +359,11 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes the current authenticated user",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -392,6 +402,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/tokens": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns list of all users with their permissions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -424,6 +439,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/tokens/:login": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes a user by their login",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -471,6 +491,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/:login": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a user by their login (admin only)",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -525,6 +550,11 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a user's name and last name (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -593,6 +623,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/:login/activate": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Activates a user account by login (admin only)",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -649,6 +684,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/:login/deactivate": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deactivates a user account by login (admin only)",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -705,6 +745,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/:login/password": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resets a user's password to a new value (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -773,6 +818,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/:login/permissions": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a user's permissions and activation status (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -841,6 +891,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/users/inactive": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns list of all users waiting for activation",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -873,6 +928,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/auth/validate": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Check if the provided Bearer token is valid and return its permissions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -902,6 +962,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/jobs": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Sends a command to the specified agent, waits for execution, and returns the result",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1238,6 +1303,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/scripts/interpreters": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns all script interpreters available in the system",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -1259,6 +1329,11 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Registers a new script interpreter with name, label, and argv",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1293,6 +1368,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/scripts/interpreters/:id": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a script interpreter by ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -1320,6 +1400,11 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates fields of a script interpreter",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1359,6 +1444,11 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Removes a script interpreter by ID",
|
||||
"tags": [
|
||||
"scripts"
|
||||
@@ -1382,6 +1472,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/scripts/run": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resolves interpreter argv[] and sends the full command to the agent",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
|
||||
@@ -284,6 +284,11 @@
|
||||
},
|
||||
"/auth/token": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Creates a new user with permissions",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -343,6 +348,11 @@
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes the current authenticated user",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -381,6 +391,11 @@
|
||||
},
|
||||
"/auth/tokens": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns list of all users with their permissions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -413,6 +428,11 @@
|
||||
},
|
||||
"/auth/tokens/:login": {
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deletes a user by their login",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -460,6 +480,11 @@
|
||||
},
|
||||
"/auth/users/:login": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a user by their login (admin only)",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -514,6 +539,11 @@
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a user's name and last name (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -582,6 +612,11 @@
|
||||
},
|
||||
"/auth/users/:login/activate": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Activates a user account by login (admin only)",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -638,6 +673,11 @@
|
||||
},
|
||||
"/auth/users/:login/deactivate": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Deactivates a user account by login (admin only)",
|
||||
"tags": [
|
||||
"auth"
|
||||
@@ -694,6 +734,11 @@
|
||||
},
|
||||
"/auth/users/:login/password": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resets a user's password to a new value (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -762,6 +807,11 @@
|
||||
},
|
||||
"/auth/users/:login/permissions": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a user's permissions and activation status (admin only)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -830,6 +880,11 @@
|
||||
},
|
||||
"/auth/users/inactive": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns list of all users waiting for activation",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -862,6 +917,11 @@
|
||||
},
|
||||
"/auth/validate": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Check if the provided Bearer token is valid and return its permissions",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -891,6 +951,11 @@
|
||||
},
|
||||
"/jobs": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Sends a command to the specified agent, waits for execution, and returns the result",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1227,6 +1292,11 @@
|
||||
},
|
||||
"/scripts/interpreters": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns all script interpreters available in the system",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -1248,6 +1318,11 @@
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Registers a new script interpreter with name, label, and argv",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1282,6 +1357,11 @@
|
||||
},
|
||||
"/scripts/interpreters/:id": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a script interpreter by ID",
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -1309,6 +1389,11 @@
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Updates fields of a script interpreter",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1348,6 +1433,11 @@
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Removes a script interpreter by ID",
|
||||
"tags": [
|
||||
"scripts"
|
||||
@@ -1371,6 +1461,11 @@
|
||||
},
|
||||
"/scripts/run": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Resolves interpreter argv[] and sends the full command to the agent",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
|
||||
@@ -597,6 +597,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Delete my account
|
||||
tags:
|
||||
- auth
|
||||
@@ -636,6 +638,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create user
|
||||
tags:
|
||||
- auth
|
||||
@@ -657,6 +661,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: List users
|
||||
tags:
|
||||
- auth
|
||||
@@ -688,6 +694,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Delete user
|
||||
tags:
|
||||
- auth
|
||||
@@ -725,6 +733,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get user by login
|
||||
tags:
|
||||
- auth
|
||||
@@ -769,6 +779,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Update user
|
||||
tags:
|
||||
- auth
|
||||
@@ -806,6 +818,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Activate user
|
||||
tags:
|
||||
- auth
|
||||
@@ -843,6 +857,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Deactivate user
|
||||
tags:
|
||||
- auth
|
||||
@@ -888,6 +904,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Reset user password
|
||||
tags:
|
||||
- auth
|
||||
@@ -933,6 +951,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Update user permissions
|
||||
tags:
|
||||
- auth
|
||||
@@ -954,6 +974,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: List inactive users
|
||||
tags:
|
||||
- auth
|
||||
@@ -973,6 +995,8 @@ paths:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Validate token
|
||||
tags:
|
||||
- auth
|
||||
@@ -996,6 +1020,8 @@ paths:
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/internal_handlers.AddJobOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create and run a job on an agent
|
||||
tags:
|
||||
- jobs
|
||||
@@ -1202,6 +1228,8 @@ paths:
|
||||
items:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_HellreigN_backend_internal_repository.ScriptInterpreter'
|
||||
type: array
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: List interpreters
|
||||
tags:
|
||||
- scripts
|
||||
@@ -1223,6 +1251,8 @@ paths:
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_HellreigN_backend_internal_repository.ScriptInterpreter'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create interpreter
|
||||
tags:
|
||||
- scripts
|
||||
@@ -1238,6 +1268,8 @@ paths:
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Delete interpreter
|
||||
tags:
|
||||
- scripts
|
||||
@@ -1256,6 +1288,8 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_HellreigN_backend_internal_repository.ScriptInterpreter'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Get interpreter
|
||||
tags:
|
||||
- scripts
|
||||
@@ -1282,6 +1316,8 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_HellreigN_backend_internal_repository.ScriptInterpreter'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Update interpreter
|
||||
tags:
|
||||
- scripts
|
||||
@@ -1304,6 +1340,8 @@ paths:
|
||||
description: Created
|
||||
schema:
|
||||
$ref: '#/definitions/internal_handlers.RunScriptOut'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Run a script on an agent
|
||||
tags:
|
||||
- scripts
|
||||
|
||||
Reference in New Issue
Block a user