{ "openapi": "3.0.2", "info": { "title": "MIRO Server API", "description": "REST API for managing MIRO apps and scenario data", "version": "1.0.0" }, "paths": { "/apps/": { "get": { "tags": [ "apps" ], "summary": "Get all visible MIRO apps", "description": "Get all apps registered for one of your user groups and their metadata.\n\nAn app object contains the following fields:\n\n- **id**: The unique identifier of the app\n- **displayName**: The name of the app as it appears in the library\n- **description**: The description of the app as it appears in the library\n- **accessGroups**: The user groups that can see this app. If no user groups are assigned (empty array), anyone with access to the MIRO Server instance can see the app", "operationId": "get_apps_apps__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Get Apps Apps Get", "type": "array", "items": { "$ref": "#/components/schemas/AppConfig" } } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] }, "post": { "tags": [ "apps" ], "summary": "Add new MIRO app", "description": "Add a new MIRO app.", "operationId": "add_app_apps__post", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_add_app_apps__post" } } }, "required": true }, "responses": { "201": { "description": "App successfully added", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" }, "400": { "description": "You cannot add an app with this ID" }, "409": { "description": "An app with this id already exists" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] } }, "/apps/{app_id}": { "put": { "tags": [ "apps" ], "summary": "Update an existing MIRO app", "description": "Update a MIRO app.\n\nThe app as well as its metadata will be overwritten. This means that you should specify all parameters.\nFor example, if you do not specify `access_groups`, no access groups will be assigned to the app.\nThis will result in it being visible to everyone.", "operationId": "update_app_apps__app_id__put", "parameters": [ { "description": "The ID of the app to update.", "required": true, "schema": { "title": "App Id", "type": "string", "description": "The ID of the app to update." }, "name": "app_id", "in": "path" } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_update_app_apps__app_id__put" } } }, "required": true }, "responses": { "200": { "description": "App successfully updated", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "An app with this ID does not exist" }, "500": { "description": "Internal Server Error" }, "400": { "description": "You cannot update an app with this ID" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] }, "delete": { "tags": [ "apps" ], "summary": "Remove an existing MIRO app", "operationId": "delete_app_apps__app_id__delete", "parameters": [ { "description": "The ID of the app to delete.", "required": true, "schema": { "title": "App Id", "type": "string", "description": "The ID of the app to delete." }, "name": "app_id", "in": "path" }, { "description": "Whether to delete all scenario data of this app.", "required": false, "schema": { "title": "Delete Data", "type": "boolean", "description": "Whether to delete all scenario data of this app.", "default": false }, "name": "delete_data", "in": "query" } ], "responses": { "200": { "description": "App successfully deleted", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "An app with this ID does not exist" }, "500": { "description": "Internal Server Error" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] } }, "/scenarios/{app_id}/": { "get": { "tags": [ "scenarios" ], "summary": "Get list of all visible scenarios", "description": "Get all scenarios for this app that are visible to you.\n\nA scenario object contains the following fields:\n\n- **name**: The name of the scenario\n- **owner**: The owner of this scenario\n- **tags**: The tags of the scenario\n- **lastModified**: The timestamp when the scenario was last modified", "operationId": "get_scenario_list_scenarios__app_id___get", "parameters": [ { "description": "The ID of the app whose data you want to operate on.", "required": true, "schema": { "title": "App Id", "type": "string", "description": "The ID of the app whose data you want to operate on." }, "name": "app_id", "in": "path" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Get Scenario List Scenarios App Id Get", "type": "array", "items": { "$ref": "#/components/schemas/ScenarioConfig" } } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] }, "post": { "tags": [ "scenarios" ], "summary": "Add a new scenario", "description": "Add a new scenario.", "operationId": "add_scenario_scenarios__app_id___post", "parameters": [ { "description": "The ID of the app whose data you want to operate on.", "required": true, "schema": { "title": "App Id", "type": "string", "description": "The ID of the app whose data you want to operate on." }, "name": "app_id", "in": "path" } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_add_scenario_scenarios__app_id___post" } } }, "required": true }, "responses": { "201": { "description": "Scenario successfully added", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" }, "409": { "description": "A sceario with this id already exists" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] } }, "/scenarios/{app_id}/download": { "get": { "tags": [ "scenarios" ], "summary": "Download a scenario", "description": "Download a scenario.", "operationId": "download_scenario_scenarios__app_id__download_get", "parameters": [ { "description": "The ID of the app whose data you want to operate on.", "required": true, "schema": { "title": "App Id", "type": "string", "description": "The ID of the app whose data you want to operate on." }, "name": "app_id", "in": "path" }, { "description": "The name of the scenario you want to download.", "required": true, "schema": { "title": "Name", "type": "string", "description": "The name of the scenario you want to download." }, "name": "name", "in": "query" }, { "description": "The owner of the scenario you want to download (by default, the logged-in user).", "required": false, "schema": { "title": "Owner", "type": "string", "description": "The owner of the scenario you want to download (by default, the logged-in user)." }, "name": "owner", "in": "query" } ], "responses": { "200": { "description": "Successful Response" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBasic": [] }, { "HTTPBearer": [] } ] } } }, "components": { "schemas": { "AppConfig": { "title": "AppConfig", "required": [ "accessGroups" ], "type": "object", "properties": { "id": { "title": "Id", "type": "string" }, "displayName": { "title": "Displayname", "type": "string" }, "description": { "title": "Description", "type": "string" }, "accessGroups": { "title": "Accessgroups", "type": "array", "items": { "type": "string" } } } }, "Body_add_app_apps__post": { "title": "Body_add_app_apps__post", "required": [ "app_data" ], "type": "object", "properties": { "app_id": { "title": "App Id", "type": "string", "description": "The ID of this app. If no ID is specified, the default ID (filename of the main `.gms` file in lower case) is used. This ID must be unique among all apps registered on this instance of MIRO Server." }, "display_name": { "title": "Display Name", "type": "string", "description": "The name of the app as it appears in the library." }, "description": { "title": "Description", "type": "string", "description": "The description of the app as it appears in the library." }, "access_groups": { "title": "Access Groups", "type": "array", "items": { "type": "string" }, "description": "User groups that can access this app. If no groups are specified, it is visible to everyone who has access to your MIRO Server instance.", "default": [] }, "overwrite_data": { "title": "Overwrite Data", "type": "boolean", "description": "Whether to overwrite existing scenario data (from a previous installation of an app with the same ID).", "default": false }, "app_data": { "title": "App Data", "type": "string", "description": "A valid MIROAPP file deployed for a multi-user environment.", "format": "binary" } } }, "Body_add_scenario_scenarios__app_id___post": { "title": "Body_add_scenario_scenarios__app_id___post", "required": [ "scenario_data" ], "type": "object", "properties": { "scenario_data": { "title": "Scenario Data", "type": "string", "description": "A file that contains scenario data. Supported file types are: gdx,miroscen,xlsx,xlsm,xls,zip", "format": "binary" }, "overwrite_data": { "title": "Overwrite Data", "type": "boolean", "description": "Whether to overwrite existing scenario data.", "default": false } } }, "Body_update_app_apps__app_id__put": { "title": "Body_update_app_apps__app_id__put", "required": [ "app_data" ], "type": "object", "properties": { "display_name": { "title": "Display Name", "type": "string", "description": "The name of the app as it appears in the library." }, "description": { "title": "Description", "type": "string", "description": "The description of the app as it appears in the library." }, "access_groups": { "title": "Access Groups", "type": "array", "items": { "type": "string" }, "description": "User groups that can access this app. If no groups are specified, it is visible to everyone who has access to your MIRO Server instance.", "default": [] }, "overwrite_data": { "title": "Overwrite Data", "type": "boolean", "description": "Whether to overwrite existing scenario data (from a previous installation of an app with the same ID).", "default": false }, "app_data": { "title": "App Data", "type": "string", "description": "A valid MIROAPP file deployed for a multi-user environment.", "format": "binary" } } }, "HTTPValidationError": { "title": "HTTPValidationError", "type": "object", "properties": { "detail": { "title": "Detail", "type": "array", "items": { "$ref": "#/components/schemas/ValidationError" } } } }, "ScenarioConfig": { "title": "ScenarioConfig", "required": [ "name", "tags", "owner", "lastModified" ], "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "tags": { "title": "Tags", "type": "array", "items": { "type": "string" } }, "owner": { "title": "Owner", "type": "string" }, "lastModified": { "title": "Lastmodified", "type": "string", "format": "date-time" } } }, "ValidationError": { "title": "ValidationError", "required": [ "loc", "msg", "type" ], "type": "object", "properties": { "loc": { "title": "Location", "type": "array", "items": { "type": "string" } }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } } } }, "securitySchemes": { "HTTPBasic": { "type": "http", "scheme": "basic" }, "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }