Skip to content

Commit

Permalink
added utils/reset_imported_tenants/ endpoint into open api spec for i…
Browse files Browse the repository at this point in the history
…nternal endpoints
  • Loading branch information
petracihalova committed Jan 23, 2025
1 parent 0bd2808 commit 69b8a56
Showing 1 changed file with 128 additions and 1 deletion.
129 changes: 128 additions & 1 deletion rbac/internal/specs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@
"200": {
"description": "0 tenant with ready flag equal to false."
},
"400":{
"400": {
"description": "Invalid request, must supply the 'max_expected' query parameter.",
"content": {
"application/json": {
Expand Down Expand Up @@ -1460,6 +1460,133 @@
}
}
},
"/api/utils/reset_imported_tenants/": {
"delete": {
"tags": [
"Tenants"
],
"summary": "Remove tenants imported via user import job",
"description": "Remove tenants with the flag ready=false or tenants without related objects. To use this endpoint, destructive API operations must be enabled.",
"operationId": "RemoveImportedTenants",
"parameters": [
{
"name": "exclude_id",
"in": "query",
"required": false,
"description": "IDs of tenants to exclude from the reset operation. Can be specified multiple times.",
"explode": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "only_ready_false_flag",
"in": "query",
"required": false,
"description": "If set to true, the query searches for tenants with the 'ready=false' flag; otherwise, it looks for tenants without related objects.",
"schema": {
"type": "boolean",
"default": true
}
},
{
"in": "query",
"name": "limit",
"required": false,
"description": "Parameter for selecting the amount of data removed.",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Tenants deleting in worker."
},
"400": {
"description": "Destructive operations disallowed."
},
"500": {
"description": "Unexpected Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"get": {
"tags": [
"Tenants"
],
"summary": "Get count of tenants imported via user import job",
"description": "Returns the count of tenants with the flag ready=false or tenants without related objects.",
"operationId": "CountOfImportedTenants",
"parameters": [
{
"name": "exclude_id",
"in": "query",
"required": false,
"description": "IDs of tenants to exclude from the reset operation. Can be specified multiple times.",
"explode": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "only_ready_false_flag",
"in": "query",
"required": false,
"description": "If set to true, the query searches for tenants with the 'ready=false' flag; otherwise, it looks for tenants without related objects.",
"schema": {
"type": "boolean",
"default": true
}
},
{
"in": "query",
"name": "limit",
"required": false,
"description": "Parameter for selecting the amount of data returned.",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Tenants count that would be deleted.",
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "2 tenants would be deleted"
}
}
}
},
"500": {
"description": "Unexpected Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/openapi.json": {
"get": {
"tags": [
Expand Down

0 comments on commit 69b8a56

Please sign in to comment.