]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add Microsoft 365 plugin endpoint for listing logged in users for given...
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 18 Aug 2022 11:35:26 +0000 (13:35 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 17 Nov 2022 09:05:10 +0000 (10:05 +0100)
gui/baculum/protected/API/Pages/API/endpoints.xml
gui/baculum/protected/API/openapi_baculum.json

index c2ca1f06d289cb01a34eac7489879620ec6d0f1a..102457dfe0194e31e87716a765738be91439cfe8 100644 (file)
        <!-- Plugins -->
        <!-- M365 Plugin -->
        <url ServiceParameter="PluginM365ListLoggedUsers" pattern="api/v2/plugins/m365/{id}/users/" parameters.id="\d+" />
+       <url ServiceParameter="PluginM365ListLoggedUsers" pattern="api/v2/plugins/m365/{id}/{tenantid}/users/" parameters.id="\d+" parameters.tenantid="[a-zA-Z0-9:.\-_ ]+" />
        <url ServiceParameter="PluginM365EmailList" pattern="api/v2/plugins/m365/{id}/{tenantid}/emails/" parameters.id="\d+" parameters.tenantid="[a-zA-Z0-9:.\-_ ]+" />
        <url ServiceParameter="PluginM365EmailAttachmentList" pattern="api/v2/plugins/m365/{id}/{tenantid}/emails/attachments/" parameters.id="\d+" parameters.tenantid="[a-zA-Z0-9:.\-_ ]+" />
 
index e5a83996de6abbffe44c14acf57ac4728017323a..71a36ce4a11db2b07771e1c52d07ab123f1c4420 100644 (file)
                "/api/v2/plugins/m365/{clientid}/users": {
                        "get": {
                                "tags": ["plugins"],
-                               "summary": "Microsoft 365 plugin logged in user list",
-                               "description": "Get Microsoft 365 logged in user list.",
+                               "summary": "Microsoft 365 plugin logged in user list for all tenants",
+                               "description": "Get Microsoft 365 logged in user list for all tenants.",
                                "responses": {
                                        "200": {
-                                               "description": "List of Microsoft 365 users",
+                                               "description": "List of Microsoft 365 users for all tenants",
                                                "content": {
                                                        "application/json": {
                                                                "schema": {
                                ]
                        }
                },
+               "/api/v2/plugins/m365/{clientid}/{tenantid}/users": {
+                       "get": {
+                               "tags": ["plugins"],
+                               "summary": "Microsoft 365 plugin logged in user list",
+                               "description": "Get Microsoft 365 logged in user list.",
+                               "responses": {
+                                       "200": {
+                                               "description": "List of Microsoft 365 users",
+                                               "content": {
+                                                       "application/json": {
+                                                               "schema": {
+                                                                       "type": "object",
+                                                                       "properties": {
+                                                                               "output": {
+                                                                                       "type": "object",
+                                                                                       "properties": {
+                                                                                               "tenantid": {
+                                                                                                       "type": "array",
+                                                                                                       "description": "Microsoft 365 users",
+                                                                                                       "items": {
+                                                                                                               "description": "User list",
+                                                                                                               "type": "string"
+                                                                                                       }
+                                                                                               }
+                                                                                       }
+                                                                               },
+                                                                               "error": {
+                                                                                       "type": "integer",
+                                                                                       "description": "Error code",
+                                                                                       "enum": [0, 1, 4, 5, 6, 7, 11, 1000]
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               },
+                               "parameters": [
+                                       {
+                                               "$ref": "#/components/parameters/ClientId"
+                                       },
+                                       {
+                                               "$ref": "#/components/parameters/TenantId"
+                                       },
+                                       {
+                                               "$ref": "#/components/parameters/Output"
+                                       }
+                               ]
+                       }
+               },
                "/api/v2/plugins/m365/{clientid}/{tenantid}/emails": {
                        "get": {
                                "tags": ["plugins"],