{
  "openapi": "3.0.0",
  "info": {
    "title": "APIIDA API Gateway Manager",
    "description": "Feel free to integrate the Gateway Manager into your CI/CD pipeline. We will be happy to help you. Get in touch with us!",
    "contact": {
      "email": "hello@apiida.com"
    },
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://localhost:10443/api/v1",
      "description": "This AAGM instance"
    }
  ],
  "paths": {
    "/apis/{id}/migrate": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Migrate an API from its git repository or a node to one or multiple nodes.",
        "description": "Required user role: Administrator or Perform Migrations",
        "operationId": "c51c8f68a606b5b2111b2b905da2cbed",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationResult"
                }
              }
            }
          },
          "400": {
            "description": "required parameter missing or invalid value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "failure",
                  "detail": "required parameter missing or invalid value"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/apis/{id}/migrateAsync": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Migrate an API from its git repository or a node to one or multiple nodes (asynchronous).",
        "description": "Required user role: Administrator or Perform Migrations",
        "operationId": "384bac5c571168a4e16cf2e4fea6e6e5",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrationRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QueueItemResource"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "migration": {
                              "description": "id of migration",
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "required parameter missing or invalid value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "failure",
                  "detail": "required parameter missing or invalid value"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/apis/{id}/pushToGit": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Pull an API from a node and push it into it's git repository.",
        "description": "Required user role: Administrator, Manage APIs or API Developer \u003Cbr /\u003E If no 'source' is passed, the source from last time is taken.",
        "operationId": "102ae0a5a0a9b8b480c8fb4d00f2907c",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "source": {
                    "description": "name of source node or cluster - if ommited, use default node for api",
                    "type": "string"
                  },
                  "branch": {
                    "description": "existing branch in git repository to use - if ommited, the default branch of the\r\n     *     repository is used",
                    "type": "string"
                  },
                  "newbranch": {
                    "description": "If set, the changes are pushed into this new branch.",
                    "type": "string"
                  },
                  "tag": {
                    "description": "If set, the commit is tagged using this\r\n     *     tag",
                    "type": "string"
                  },
                  "comment": {
                    "description": "git commit comment",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "success",
                  "detail": "Pushed successfully"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/apis/{id}/checkAvailability": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Check the availability of the API's git repository.",
        "description": "Required user role: Administrator, Manage APIs or API Developer",
        "operationId": "c5977a12a20956f9ad75e0c8ca0eb7ec",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "success",
                  "detail": "repository available"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/gitCredentials": {
      "get": {
        "tags": [
          "Configuration"
        ],
        "summary": "Get a list of git credentials.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Manage Nodes",
        "operationId": "4d9059540418d94f497e2a9bef8e87aa",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GitCredentialResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/zipAPI": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - APIs"
        ],
        "summary": "Get an API as a zip file. We assume that in an environment the nodes are all the same.",
        "description": "Required user role: Administrator",
        "operationId": "734828bd2cc2f12247b77a31303d81ea",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "api",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "My description",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/migrateFromZip": {
      "post": {
        "tags": [
          "APIIDA API Control Plane - APIs"
        ],
        "summary": "Migration from ZIP to an environment. If the if of the API is not passed, one is generated from the ZIP.",
        "description": "Required user role: Administrator",
        "operationId": "86d70249a8f57bd861eb092bb35f7759",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "api",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "zip": {}
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/discoverManagedAPIs": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - APIs"
        ],
        "summary": "All APIs of the environment that are enabled for managing with the API Control Plane.",
        "description": "Required user role: Administrator",
        "operationId": "3e70debc75da15e8f54bc5c2630db1d0",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the\r\n     *     Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Here you can filter what exactly you want to have. APIs, Solutions (groups of APIs),\r\n     *     Libraries, Solution Kits or AAGMAPI (In AAGM, Solutions are displayed under the APIs tab and APIs that do\r\n     *     not have a Solution.)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AAGMAPI",
                "SolutionAndAPI",
                "Solution",
                "API",
                "Library",
                "Solution Kit"
              ]
            },
            "example": "API"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/checkNodeConnection": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - APIs"
        ],
        "summary": "Checks if all nodes in this environment are accessible.",
        "description": "Required user role: Administrator \u003Cbr /\u003E This endpoint checks all nodes in the specified environment to see whether the restman can be reached and, in a second step, whether the AACP Solution Kit has been installed.",
        "operationId": "3e4e54c2cea021f596426578315d821f",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "success"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "Node 1": "Failed to connect to host",
                  "Node 2": "Client error: `GET https://host.docker.internal:9444/aacp/integration/api-keys` resulted in a `404 Not Found`"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrate": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Migrate certain resources from one node to another.",
        "description": "Required user role: Administrator or Perform Migrations \u003Cbr /\u003E Here you can migrate specific resources.",
        "operationId": "d6a4d5e4f1d4213990025da16404f524",
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "required": [
                  "source",
                  "targets",
                  "resources"
                ],
                "properties": {
                  "source": {
                    "type": "string",
                    "example": "Gateway 1"
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "Gateway 2"
                    }
                  },
                  "resources": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "90729b4cde1c6c7ab0421334867dbc6a"
                    }
                  },
                  "resourcesByResourceSelector": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MigrationResourceSelector"
                    }
                  },
                  "oneTimeMigrationMappingRegexActions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MigrationMappingRegexAction"
                    }
                  },
                  "skipReloadResources": {
                    "description": "If set to true, synchronization of the gateways before the migration is skipped",
                    "type": "boolean"
                  },
                  "comment": {
                    "type": "string",
                    "example": "This comment is written to the revision history"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "failure",
                  "detail": "source|targets|resources must not be empty."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrations/{id}/logs": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get the logs of a performed migration.",
        "description": "Required user role: Administrator, Perform Migrations or Auditor",
        "operationId": "c6106b2bd327f2a2bb8fc9aad557e73b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the migration. The value can be extracted via AAGM´s API (GET /migrations).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "result": {
                      "type": "string",
                      "enum": [
                        "success"
                      ]
                    },
                    "details": {
                      "description": "migration logs with '\\n' as line seperator",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrations/{id}/results": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get the result of a performed migration broken down to each resource.",
        "description": "Required user role: Administrator, Perform Migrations or Auditor",
        "operationId": "8ac9fc8a3cdd2c9a26eb278b54d27146",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the migration. The value can be extracted via AAGM´s API (GET /migrations).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrations/{id}/repeat": {
      "post": {
        "tags": [
          "Migration"
        ],
        "summary": "Repeat a migration.",
        "description": "Required user role: Administrator or Perform Migrations \u003Cbr /\u003E You can repeat a migration here. The resources, pipeline steps and mappings of the specified migration are applied. If you do not specify any other targets, these are also applied. The source can also be adjusted if the source was previously a node.",
        "operationId": "a42a5eb348a4314e36f0406e6b4ba91b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the migration to repeat.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "properties": {
                  "source": {
                    "type": "string",
                    "example": "Gateway 1"
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "Gateway 2"
                    }
                  },
                  "oneTimeMigrationMappingRegexActions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MigrationMappingRegexAction"
                    }
                  },
                  "skipReloadResources": {
                    "description": "If set to true, synchronization of the gateways before the migration is skipped",
                    "type": "boolean"
                  },
                  "comment": {
                    "type": "string",
                    "example": "This comment is written to the revision history"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "failure",
                  "detail": "source|targets invalid."
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/pipeline": {
      "post": {
        "tags": [
          "Environment"
        ],
        "summary": "Execute a pipeline.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs or API Developer",
        "operationId": "b6d7953c52205c2c602138e072041ad8",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the\r\n     *     Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "properties": {
                  "stage": {
                    "type": "string",
                    "enum": [
                      "pre",
                      "post"
                    ]
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Stage must be one of [pre|post]"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/alive": {
      "get": {
        "tags": [
          "Probe"
        ],
        "summary": "APIIDA API Gateway Manager is alive.",
        "description": "Required user role: none",
        "operationId": "dce6258e4771a7f5d34a55c9f52d1d1a",
        "responses": {
          "200": {
            "description": "APIIDA API Gateway Manager is alive"
          }
        }
      }
    },
    "/ready": {
      "get": {
        "tags": [
          "Probe"
        ],
        "summary": "APIIDA API Gateway Manager is ready to serve requests.",
        "description": "Required user role: none",
        "operationId": "8b543c697d2ee33d34f766268311876a",
        "responses": {
          "200": {
            "description": "APIIDA API Gateway Manager is ready"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "Probe"
        ],
        "summary": "The Version of the APIIDA API Gateway Manager.",
        "description": "Required user role: none",
        "operationId": "49db2098d28ae487398422fcae0a12f9",
        "responses": {
          "200": {
            "description": "Version",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "result": {
                          "type": "string",
                          "example": "success"
                        },
                        "detail": {
                          "type": "string",
                          "example": "2023.2.2"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/registerApi": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Register a folder on the node as an API in AAGM.",
        "description": "Required user role: Administrator or Manage APIs",
        "operationId": "88506a50762287e8ebac83d55db31f44",
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "required": [
                  "node",
                  "path"
                ],
                "properties": {
                  "node": {
                    "type": "string",
                    "example": "Gateway 1"
                  },
                  "path": {
                    "type": "string",
                    "example": "/subFolder1/subFolder2/apiFolder"
                  },
                  "gitcredential": {
                    "description": "Id of the gitCredential that is\r\n     * valid for this repository.",
                    "type": "integer"
                  },
                  "repository": {
                    "description": "The repository",
                    "type": "string",
                    "example": "git@github.com:XXyy/myCoolLib.git"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/templates/{id}/deploy": {
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Deploy a template.",
        "description": "Required user role: Administrator \u003Cbr /\u003E The example is configured according to https://apiida.atlassian.net/wiki/spaces/AAGM/pages/4943609903/Service+Templates",
        "operationId": "557a04526bf6c01a0f716ecb95886c3e",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "required": [
                  "name",
                  "target",
                  "urlPattern",
                  "verbs"
                ],
                "properties": {
                  "target": {
                    "type": "string",
                    "example": "Gateway 2"
                  },
                  "name": {
                    "description": "Name of the service to be created",
                    "type": "string"
                  },
                  "urlPattern": {
                    "description": "Endpoint urlPattern of the service to be created",
                    "type": "string"
                  },
                  "block_auth": {
                    "description": "For each block you can set the value with block_. Sometimes this value must be a boolean, sometimes a string. It depends on what is defined in the template.",
                    "type": "string",
                    "example": "cert"
                  },
                  "comment": {
                    "description": "Variables can simply be passed in the body like here.",
                    "type": "string",
                    "example": "myComment"
                  },
                  "date": {
                    "type": "string",
                    "example": "01.01.1970"
                  },
                  "verbs": {
                    "description": "Verbs of the service to be created",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "GET"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "success",
                  "detail": "API sucessfully created!"
                }
              }
            }
          },
          "400": {
            "description": "required parameter missing or invalid value"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "failure",
                  "detail": "An API with this urlPattern already exists on the target."
                }
              }
            }
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/login": {
      "post": {
        "tags": [
          "Login"
        ],
        "summary": "Login and obtain a new access token.",
        "description": "Required user role: none",
        "operationId": "311577b4f9203d1654b4ce8a188fe6d5",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "user",
                  "pass"
                ],
                "properties": {
                  "user": {
                    "type": "string"
                  },
                  "pass": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "result": {
                          "type": "string"
                        },
                        "token": {
                          "description": "The token with which you have to\r\n     *     authenticate yourself.",
                          "type": "string"
                        },
                        "id": {
                          "description": "The ID of the logged in user",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/logout": {
      "post": {
        "tags": [
          "Login"
        ],
        "summary": "Make the current used token invalid.",
        "description": "Required user role: none",
        "operationId": "9eef6c4d7b8963933671fbc859d791db",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "success",
                  "detail": ""
                }
              }
            }
          }
        }
      }
    },
    "/apis": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Get a filtered list of APIs.",
        "description": "Required user role: Administrator, Manage APIs or API Developer",
        "operationId": "5426ef10c84cb2c43c10b3798878951b",
        "parameters": [
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Here you can filter what exactly you want to have. APIs, Solutions (groups of APIs),\r\n     *     Libraries, Solution Kits or AAGMAPI (In AAGM, Solutions are displayed under the APIs tab and APIs that do\r\n     *     not have a Solution.)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AAGMAPI",
                "SolutionAndAPI",
                "Solution",
                "API",
                "Library",
                "Solution Kit"
              ]
            },
            "example": "API"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Create an API from a git repository.",
        "description": "Required user role: Administrator or Manage APIs",
        "operationId": "437564372addd7ed19b38a617714e9a6",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResourceCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/apis/{id}": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Get an API.",
        "description": "Required user role: Administrator, Manage APIs or API Developer",
        "operationId": "329d18cb0bf562c3c67de9bf14d668f4",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "delete": {
        "tags": [
          "APIs"
        ],
        "summary": "Delete an API.",
        "description": "Required user role: Administrator or Manage APIs",
        "operationId": "a83fdf3593a8ba6d4cc6fa85cb01ee9a",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "patch": {
        "tags": [
          "APIs"
        ],
        "summary": "Update an API.",
        "description": "Required user role: Administrator, Manage APIs or API Developer",
        "operationId": "da23a7a6c5aedbedbfb12d4080169423",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the API or solution. The value can be extracted via AAGM´s API or can be found by clicking on the API or solution within the GUI (displayed in the top right corner).",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiResourceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/clusters": {
      "get": {
        "tags": [
          "Nodes"
        ],
        "summary": "Get a filtered list of clusters.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Manage Nodes",
        "operationId": "4b2bf746f64a256829252126cd3ea0c8",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClusterResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments": {
      "get": {
        "tags": [
          "Environment"
        ],
        "summary": "Get a filtered list of environments.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Manage Nodes",
        "operationId": "80b8e74196d852327b11e549f53ba944",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnvironmentResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "post": {
        "tags": [
          "Environment"
        ],
        "summary": "Create an environment.",
        "description": "Required user role: Administrator",
        "operationId": "f2b0897878b22a83b4a386dfc2931920",
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentResourceCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}": {
      "get": {
        "tags": [
          "Environment"
        ],
        "summary": "Get an environment.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Manage Nodes",
        "operationId": "f886f650167aef52bdd36f3aea88a118",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EnvironmentResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Environment"
        ],
        "summary": "Delete an environment.",
        "description": "Required user role: Administrator",
        "operationId": "b2808e42d938efe3edd7d3c978293903",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Environment"
        ],
        "summary": "Update an environment.",
        "description": "Required user role: Administrator",
        "operationId": "2ab253c31191fa07d3b006f43bb78249",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrations": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get a filtered list of migrations.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Auditor",
        "operationId": "4c5d5e9035cbfb8f95179b20c80a2c81",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MigrationResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/migrations/{id}": {
      "get": {
        "tags": [
          "Migration"
        ],
        "summary": "Get a Migration",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Auditor",
        "operationId": "e1ee9e30ed10077c5dac121ed51fd427",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the Migrattion",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MigrationResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/nodes": {
      "get": {
        "tags": [
          "Nodes"
        ],
        "summary": "Get a filtered list of nodes.",
        "description": "Required user role: Administrator, Perform Migrations, Manage APIs, API Developer or Manage Nodes",
        "operationId": "a425fe771d992fd5a5bbc0b59b0d0274",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cluster",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NodeResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/jobs": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a filtered list of jobs.",
        "description": "Required user role: none",
        "operationId": "8f1462ebd67e955700670f8f399c52f1",
        "parameters": [
          {
            "name": "runstate",
            "in": "query",
            "description": "Filter jobs by state\r\n    \u003Cul\u003E\r\n    \u003Cli\u003E0 - Waiting\u003C/li\u003E\r\n    \u003Cli\u003E1 - Running\u003C/li\u003E\r\n    \u003Cli\u003E2 - Finished\u003C/li\u003E\r\n    \u003Cli\u003E3 - Error\u003C/li\u003E\r\n    \u003C/ul\u003E",
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2,
                3
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/QueueItemResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/jobs/{id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job.",
        "description": "Required user role: none",
        "operationId": "323a6a723b523552ae76506d453a461b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueItemResource"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "summary": "Get a list of available templates.",
        "description": "Required user role: Administrator",
        "operationId": "fd507b1b80dc282a0b3ea80b3b0c4b6d",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TemplateResource"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "post": {
        "tags": [
          "Templates"
        ],
        "summary": "Create a template.",
        "description": "Required user role: Administrator",
        "operationId": "dafd5ca9cf152615feb2c570247b0816",
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateResourceCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Templates"
        ],
        "summary": "Update a template.",
        "description": "Required user role: Administrator",
        "operationId": "4268eb66333d0ebee642210d3e7c6a6a",
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateResource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewResourceResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/apiKeys": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Get all API Keys.",
        "description": "Required user role: Administrator",
        "operationId": "6870de8a760f2a07764a35193738d7f3",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKey"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "put": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Update an API key.",
        "description": "Required user role: Administrator",
        "operationId": "bfda89588da5920360144ee7fd34f2ca",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "post": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Create an API key.",
        "description": "Required user role: Administrator. \u003Cbr /\u003EIf no id, apiKey or secret is provided, one is generated. \u003Cbr /\u003E  If the API Key already exists, no error message is returned, but an update is carried out.",
        "operationId": "2bf24e799d3a8e54167acd771a637eca",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyNew"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/apiKeys/{apiKeyId}": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Get an API key.",
        "description": "Required user role: Administrator",
        "operationId": "f9a1acf99afa8d50e4defaf5e096950b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "apiKeyId",
            "in": "path",
            "description": "The id of the api key. The value can be extracted via AAGM´s API (GET /environments/{id}/apiKeys).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "delete": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Delete an API key.",
        "description": "Required user role: Administrator \u003Cbr /\u003E If the API Key does not exist, no error message is returned.",
        "operationId": "c3d6d18c3eea714890dec96f6973ffab",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "apiKeyId",
            "in": "path",
            "description": "The id of the api key. The value can be extracted via AAGM´s API (GET /environments/{id}/apiKeys).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/apiKeys/{apiKeyId}/new-secret": {
      "put": {
        "tags": [
          "APIIDA API Control Plane - API Keys"
        ],
        "summary": "Update an API keys secret.",
        "description": "Required user role: Administrator. \u003Cbr /\u003EIf no secret is provided, one is generated.",
        "operationId": "8241fe6c1351110a3395cc1f68b48ef9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "apiKeyId",
            "in": "path",
            "description": "The id of the api key. The value can be extracted via AAGM´s API (GET /environments/{id}/apiKeys).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyUpdateSecret"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKey"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/apiPlans": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - API Plans"
        ],
        "summary": "Create an API plan.",
        "description": "Required user role: Administrator",
        "operationId": "8f6d67b74342acf1eed3e3e528f388f6",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiPlan"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "put": {
        "tags": [
          "APIIDA API Control Plane - API Plans"
        ],
        "summary": "Update an API plan.",
        "description": "Required user role: Administrator \u003Cbr /\u003E If the plan does not exist, no error is returned but the plan is created.",
        "operationId": "8400a2b761fc464637382aa8cd165621",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPlanUpdate"
              }
            }
          }
        },
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "post": {
        "tags": [
          "APIIDA API Control Plane - API Plans"
        ],
        "summary": "create an API plan",
        "description": "Required user role: Administrator \u003Cbr /\u003E If no ID is provided, one is generated. \u003Cbr /\u003E  If the plan already exists, no error message is returned, but an update is carried out.",
        "operationId": "3725a3095c2ac646c33691c1e7e58aef",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "json": {
              "schema": {
                "$ref": "#/components/schemas/ApiPlanNew"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPlanCreated"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/apiPlans/{apiPlanId}": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - API Plans"
        ],
        "summary": "Get an API plan.",
        "description": "Required user role: Administrator",
        "operationId": "37c35efc1b23303ee58df93f85d78d4b",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "apiPlanId",
            "in": "path",
            "description": "The id of the api plan. The value can be extracted via Gateway Manager API (GET /environments/{id}/apiPlans).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPlan"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      },
      "delete": {
        "tags": [
          "APIIDA API Control Plane - API Plans"
        ],
        "summary": "Delete an API plan.",
        "description": "Required user role: Administrator \u003Cbr /\u003E If the API Plan does not exist, no error message is returned.",
        "operationId": "bf771ca8d7f550d2f2ddfd0efff391f9",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "apiPlanId",
            "in": "path",
            "description": "The id of the api plan. The value can be extracted via Gateway Manager API (GET /environments/{id}/apiPlans).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/NoContent"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    },
    "/environments/{id}/metrics": {
      "get": {
        "tags": [
          "APIIDA API Control Plane - APIs"
        ],
        "summary": "Get all Metrics.",
        "description": "Required user role: Administrator",
        "operationId": "22ae24703b5316808c2f49781f213eac",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal id of the environment. The value can be extracted via AAGM´s API or in the\r\n     *     Environments Tab of the Configuration menu.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "Node 1": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Metric"
                      }
                    },
                    "Node 2": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Metric"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "4XX": {
            "$ref": "#/components/responses/4XX"
          },
          "5XX": {
            "$ref": "#/components/responses/5XX"
          }
        },
        "security": [
          {
            "apiKeyScheme": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MigrationRequestBody": {
        "required": [
          "source",
          "targets"
        ],
        "properties": {
          "source": {
            "required": [
              "type",
              "parameters"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "git",
                  "gateway"
                ]
              },
              "parameters": {
                "properties": {
                  "node": {
                    "description": "name of source node or cluster (only required if source type is gateway)",
                    "type": "string"
                  },
                  "branch": {
                    "description": "the branch that acts as the source of the migration (only required if source\r\n     *     type is git). You can use branch OR tag but not both.",
                    "type": "string"
                  },
                  "tag": {
                    "description": "the tag that acts as the source of the migration (only required if source type is\r\n     *     git).  You can use branch OR tag but not both.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "targets": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "Gateway 2"
            }
          },
          "oneTimeMigrationMappingRegexActions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MigrationMappingRegexAction"
            }
          },
          "test": {
            "description": "If set to true, the migration is only tested but not performed",
            "type": "boolean"
          },
          "skipReloadResources": {
            "description": "If set to true, synchronization of the gateways before the migration is skipped",
            "type": "boolean"
          },
          "comment": {
            "type": "string",
            "example": "This comment is written to the revision history"
          }
        },
        "type": "object"
      },
      "GitCredentialResource": {
        "properties": {
          "id": {
            "description": "id of the git Credential",
            "type": "integer",
            "example": 1
          },
          "description": {
            "description": "description of the git Credential",
            "type": "string",
            "example": "myGitCredential"
          }
        },
        "type": "object"
      },
      "ApiResource": {
        "properties": {
          "id": {
            "description": "The id of the API in the Gateway Manager",
            "type": "integer",
            "example": 42
          },
          "name": {
            "description": "The display name of the API in the Gateway Manager",
            "type": "string",
            "example": "myAPI"
          },
          "type": {
            "description": "An API, is a service in the node, a solution, is a folder with services, a library, is a collection of resources.",
            "type": "string",
            "enum": [
              "API",
              "Solution Kit",
              "Library",
              "Solution"
            ]
          },
          "description": {
            "description": "The description of the API in the Gateway Manager",
            "type": "string",
            "example": "The description of my API"
          },
          "urlPattern": {
            "description": "(Only if the type is API) The url pattern under which the API can be reached in the node (resolution path). It is needed to distinguish and validate the APIs. (readonly)",
            "type": "string",
            "example": "/test/petstore"
          },
          "solution": {
            "description": "(Only if the type is API) If the API is part of a solution/folder, the id (in AAGM) of the solution/folder is transferred here.",
            "type": "integer"
          },
          "repository": {
            "description": "The repository",
            "type": "string",
            "example": "git@github.com:XXyy/myCoolLib.git"
          },
          "gitcredential": {
            "description": "Id of the gitCredential that is valid for this repository.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ApiResourceCreate": {
        "required": [
          "name",
          "type",
          "repository",
          "gitcredential"
        ],
        "properties": {
          "name": {
            "description": "The display name of the API in the Gateway Manager",
            "type": "string",
            "example": "myAPI"
          },
          "type": {
            "description": "An API, is a service in the node, a solution, is a folder with services, a library, is a\r\n     *     collection of resources.",
            "type": "string",
            "enum": [
              "API",
              "Library",
              "Solution"
            ]
          },
          "description": {
            "description": "The description of the API in the Gateway Manager",
            "type": "string",
            "example": "The description of my API"
          },
          "solution": {
            "description": "(Only if the type is API) If the API is part of a solution/folder, the id (in AAGM) of the\r\n     *     solution/folder is transferred here.",
            "type": "integer"
          },
          "repository": {
            "description": "The repository",
            "type": "string",
            "example": "git@github.com:XXyy/myCoolLib.git"
          },
          "gitcredential": {
            "description": "Id of the gitCredential that is valid for this repository.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ApiResourceUpdate": {
        "properties": {
          "name": {
            "description": "The display name of the API in the Gateway Manager",
            "type": "string",
            "example": "myAPI"
          },
          "type": {
            "description": "An API, is a service in the node, a solution, is a folder with services, a library, is a collection of resources.",
            "type": "string",
            "enum": [
              "API",
              "Library",
              "Solution"
            ]
          },
          "description": {
            "description": "The description of the API in the Gateway Manager",
            "type": "string",
            "example": "The description of my API"
          },
          "solution": {
            "description": "(Only if the type is API) If the API is part of a solution/folder, the id (in AAGM) of the solution/folder is transferred here.",
            "type": "integer"
          },
          "repository": {
            "description": "The repository",
            "type": "string",
            "example": "git@github.com:XXyy/myCoolLib.git"
          },
          "gitcredential": {
            "description": "Id of the gitCredential that is valid for this repository.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ClusterResource": {
        "properties": {
          "id": {
            "description": "ID of Cluster",
            "type": "integer"
          },
          "name": {
            "description": "Description",
            "type": "string"
          },
          "environment": {
            "description": "ID of Environemnt",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "EnvironmentResource": {
        "properties": {
          "id": {
            "description": "ID of Environment",
            "type": "integer"
          },
          "name": {
            "description": "Description",
            "type": "string"
          },
          "shorthand": {
            "description": "Shorthand Symbol",
            "type": "string"
          },
          "color": {
            "description": "Color",
            "type": "string"
          },
          "type": {
            "description": "Form factor of the environment (0=Appliances, 4=Container Gateways)",
            "type": "integer"
          },
          "protected": {
            "description": "Is this environment protected? (Requires PW for write operations)",
            "type": "boolean"
          },
          "proxy": {
            "description": "Proxy hostname. If left empty no proxy is used.",
            "type": "string"
          },
          "proxyAuth": {
            "description": "Does the proxy need authentication?",
            "type": "boolean"
          },
          "proxyUser": {
            "description": "Proxy username",
            "type": "string"
          },
          "proxyPass": {
            "description": "Proxy password. Not filled on GET requests, but you can set it in write operations.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "EnvironmentResourceCreate": {
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "Description",
            "type": "string"
          },
          "shorthand": {
            "description": "Shorthand Symbol",
            "type": "string"
          },
          "color": {
            "description": "Color",
            "type": "string"
          },
          "type": {
            "description": "Form factor of the environment (0=Appliances, 4=Container Gateways)",
            "type": "integer"
          },
          "protected": {
            "description": "Is this environment protected? (Requires PW for write operations)",
            "type": "boolean"
          },
          "proxy": {
            "description": "Proxy hostname. If left empty no proxy is used.",
            "type": "string"
          },
          "proxyAuth": {
            "description": "Does the proxy need authentication?",
            "type": "boolean"
          },
          "proxyUser": {
            "description": "Proxy username",
            "type": "string"
          },
          "proxyPass": {
            "description": "Proxy password. Not filled on GET requests, but you can set it in write operations.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MigrationMappingRegexAction": {
        "description": "Here you can set regular expressions for a migration that set the actions of the migration mappings. The already defined regex have lower priority. But here, too, the last regex wins.",
        "required": [
          "regex",
          "type",
          "action"
        ],
        "properties": {
          "regex": {
            "description": "The Regular Expression is applied to the name of the resource.",
            "type": "string",
            "example": "/^[a-zA-Z0-9]+$/"
          },
          "type": {
            "description": "Type of resource to which the regular expression is to be applied.",
            "type": "string",
            "enum": [
              "FOLDER",
              "ACTIVE_CONNECTOR",
              "SSG_ACTIVE_CONNECTOR",
              "ASSERTION_SECURITY_ZONE",
              "ASSERTION_ACCESS",
              "CASSANDRA_CONNECTION",
              "CASSANDRA_CONFIGURATION",
              "TRUSTED_CERTIFICATE",
              "TRUSTED_CERT",
              "CLUSTER_PROPERTY",
              "SOLUTION_KIT",
              "CUSTOM_KEY_VALUE",
              "CUSTOM_KEY_VALUE_STORE",
              "EMAIL_LISTENER",
              "ENCAPSULATED_ASSERTION",
              "FIREWALL_RULE",
              "GENERIC_ENTITY",
              "GENERIC",
              "GROUP",
              "HTTP_CONFIGURATION",
              "ID_PROVIDER_CONFIG",
              "INTERFACE_TAG",
              "JDBC_CONNECTION",
              "JMS_DESTINATION",
              "JMS_ENDPOINT",
              "LISTEN_PORT",
              "SSG_CONNECTOR",
              "POLICY_BACKED_SERVICE",
              "SSG_KEY_ENTRY",
              "REVOCATION_CHECK_POLICY",
              "REVOCATION_CHECKING_POLICY",
              "ROLE",
              "RBAC_ROLE",
              "SCHEDULED_TASK",
              "SECURE_PASSWORD",
              "PASSWORD",
              "SECURITY_ZONE",
              "SITEMINDER_CONFIGURATION",
              "SERVER_MODULE_FILE",
              "POLICY",
              "SERVICE",
              "RESOURCE_ENTRY",
              "USER"
            ]
          },
          "action": {
            "description": "Action to be applied to the migration mapping if the resource matches the type and name of the regex.",
            "type": "string",
            "enum": [
              "NewOrUpdate",
              "NewOrExisting",
              "AlwaysCreateNew",
              "Ignore",
              "Delete"
            ]
          }
        },
        "type": "object"
      },
      "MigrationResource": {
        "properties": {
          "id": {
            "description": "ID of migration",
            "type": "integer"
          },
          "date": {
            "description": "Date of migration",
            "type": "string"
          },
          "assignee": {
            "description": "Id of the user to whom the migration was assigned.",
            "type": "integer"
          },
          "source": {
            "description": "Source of the migration can be either a gateway(name), git or file",
            "type": "string"
          },
          "target": {
            "description": "Target of the migration is a gateway(name)",
            "type": "string"
          },
          "resources": {
            "description": "Migrated Resources",
            "type": "string"
          },
          "status": {
            "description": "Status of an migration can be ERROR, SUCCESS, ASSIGNED, PREPARED or NOT PREPARED",
            "type": "string"
          },
          "errorText": {
            "description": "In case of an error. Here is the error message",
            "type": "string"
          },
          "performedBy": {
            "description": "Id of the user to ececuted the migration.",
            "type": "integer"
          },
          "description": {
            "description": "The description of the migration",
            "type": "string"
          },
          "link": {
            "description": "The link of the migration",
            "type": "string"
          },
          "comment": {
            "description": "The comment of the migration",
            "type": "string"
          },
          "rolledback": {
            "description": "Whether the migration was rolled back again after it was executed.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "MigrationResourceSelector": {
        "description": "This selector object can be used to find the resources in the source node. For most resources, name and type are sufficient, for FOLDER the path to root is also necessary and for TRUSTED_CERTIFICATE the fingerprint.",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "description": "Name of Resource",
            "type": "string",
            "example": "FolderDirectlyUnderRootFolder"
          },
          "type": {
            "description": "Type of Resource",
            "type": "string",
            "enum": [
              "FOLDER",
              "ACTIVE_CONNECTOR",
              "SSG_ACTIVE_CONNECTOR",
              "ASSERTION_SECURITY_ZONE",
              "ASSERTION_ACCESS",
              "CASSANDRA_CONNECTION",
              "CASSANDRA_CONFIGURATION",
              "TRUSTED_CERTIFICATE",
              "TRUSTED_CERT",
              "CLUSTER_PROPERTY",
              "SOLUTION_KIT",
              "CUSTOM_KEY_VALUE",
              "CUSTOM_KEY_VALUE_STORE",
              "EMAIL_LISTENER",
              "ENCAPSULATED_ASSERTION",
              "FIREWALL_RULE",
              "GENERIC_ENTITY",
              "GENERIC",
              "GROUP",
              "HTTP_CONFIGURATION",
              "ID_PROVIDER_CONFIG",
              "INTERFACE_TAG",
              "JDBC_CONNECTION",
              "JMS_DESTINATION",
              "JMS_ENDPOINT",
              "LISTEN_PORT",
              "SSG_CONNECTOR",
              "POLICY_BACKED_SERVICE",
              "SSG_KEY_ENTRY",
              "REVOCATION_CHECK_POLICY",
              "REVOCATION_CHECKING_POLICY",
              "ROLE",
              "RBAC_ROLE",
              "SCHEDULED_TASK",
              "SECURE_PASSWORD",
              "PASSWORD",
              "SECURITY_ZONE",
              "SITEMINDER_CONFIGURATION",
              "SERVER_MODULE_FILE",
              "POLICY",
              "SERVICE",
              "RESOURCE_ENTRY",
              "USER"
            ]
          },
          "pathToRoot": {
            "description": "Only required if type is folder. Whithout 'root' and starting with /, For a service in a folder named test, which is directly in root, the path would be /test",
            "type": "string",
            "example": "/FolderDirectlyUnderRootFolder"
          },
          "fingerprint": {
            "description": "Only required if type is certificate. The SHA1 fingerprint of the certificate.",
            "type": "string",
            "example": "E6:B6:FB:0E:3E:99:AD:56:33:52:16:52:A7:0F:A0:F2:71:95:96:AD"
          }
        },
        "type": "object"
      },
      "MigrationResult": {
        "properties": {
          "id": {
            "description": "ID of Migration",
            "type": "integer"
          },
          "result": {
            "description": "Result message. If the migration failed partially the errors are within the mapping that failed",
            "type": "string",
            "enum": [
              "Success",
              "Failed ...",
              "Error ..."
            ]
          },
          "mappings": {
            "description": "Mappings of Migration",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MigrationResultMappingResource"
            }
          }
        },
        "type": "object"
      },
      "MigrationResultMappingResource": {
        "properties": {
          "name": {
            "description": "The name of the resource migrated",
            "type": "string"
          },
          "sourceId": {
            "description": "The ID of the resource on the source node",
            "type": "string"
          },
          "targetId": {
            "description": "The ID of the resource on the target node",
            "type": "string"
          },
          "action": {
            "description": "The action that should have been performed on this resource",
            "type": "string"
          },
          "actionTaken": {
            "description": "The action that was actually performed on this resource",
            "type": "string"
          },
          "error": {
            "description": "The error message in case the node supplied one",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NewResourceResult": {
        "properties": {
          "id": {
            "description": "ID of the entity",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "NodeResource": {
        "properties": {
          "id": {
            "description": "ID of Node",
            "type": "integer"
          },
          "name": {
            "description": "Description",
            "type": "string"
          },
          "host": {
            "description": "Host",
            "type": "string"
          },
          "cluster": {
            "description": "ID of Cluster",
            "type": "integer"
          },
          "environment": {
            "description": "ID of Environemnt",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "QueueItemResource": {
        "properties": {
          "id": {
            "description": "ID of Queueitem",
            "type": "integer"
          },
          "status": {
            "description": "current job status",
            "type": "string",
            "enum": [
              "Waiting",
              "Running",
              "Finished",
              "Error"
            ]
          },
          "statusText": {
            "description": "textual description of job status",
            "type": "string"
          },
          "progress": {
            "description": "job progress in percent (0-100)",
            "type": "integer",
            "example": 50
          },
          "data": {
            "description": "optional api specific data",
            "type": "object"
          },
          "description": {
            "description": "The description of the task",
            "type": "string"
          },
          "type": {
            "description": "The type of the task (recurring vs. executed once)",
            "type": "string",
            "enum": [
              "Once",
              "Recurring"
            ]
          },
          "started": {
            "description": "The time the task was started last",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TemplateResource": {
        "properties": {
          "id": {
            "description": "ID of Template",
            "type": "integer"
          },
          "name": {
            "description": "The template's name",
            "type": "string"
          },
          "policyTemplate": {
            "description": "The XML template that is transformed into a service. To create, the policy template must be base64 encoded.",
            "type": "string"
          },
          "templateSpec": {
            "description": "Definition of all the template's variables and blocks. To create, the template must be escaped.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "TemplateResourceCreate": {
        "required": [
          "name",
          "policyTemplate",
          "templateSpec"
        ],
        "properties": {
          "name": {
            "description": "The template's name",
            "type": "string"
          },
          "policyTemplate": {
            "description": "The XML template that is transformed into a service. To create, the policy template must be base64 encoded.",
            "type": "string"
          },
          "templateSpec": {
            "description": "Definition of all the template's variables and blocks. To create, the template must be escaped.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ApiKey": {
        "properties": {
          "id": {
            "type": "string",
            "example": "39a586a3-a879-4e67-a87a-2bb0cb0035f0"
          },
          "apikey": {
            "type": "string",
            "example": "l758146722e407407a8c85e22f5c789b99"
          },
          "secret": {
            "type": "string",
            "example": "5a53b42ce8b34c2884d3cc90bdec6137"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "passive"
            ],
            "example": "active"
          },
          "organization_id": {
            "type": "string",
            "example": "4e9af22b-afbd-46cf-8665-b77f447606ab"
          },
          "organization": {
            "type": "string",
            "example": "MYalcOrg1"
          },
          "label": {
            "type": "string",
            "example": "FxRatesApp-api key 1-xuce7G"
          },
          "oauthCallbackUrl": {
            "type": "string",
            "example": "oob"
          },
          "oauthScope": {
            "type": "string",
            "example": "oob"
          },
          "oauthType": {
            "type": "string",
            "example": "public"
          },
          "subscribed_plans": {
            "description": "Array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "custom_fields": {
            "description": "key/value pairs",
            "type": "object",
            "example": {
              "hallo": "hallo",
              "bye": "bye"
            }
          }
        },
        "type": "object"
      },
      "ApiKeyNew": {
        "properties": {
          "id": {
            "description": "AAGM will generate it if empty",
            "type": "string"
          },
          "apikey": {
            "description": "AAGM will generate it if empty",
            "type": "string"
          },
          "secret": {
            "description": "AAGM will generate it if empty",
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "passive"
            ],
            "example": "active"
          },
          "organization_id": {
            "type": "string",
            "example": "4e9af22b-afbd-46cf-8665-b77f447606ab"
          },
          "organization": {
            "type": "string",
            "example": "MYalcOrg1"
          },
          "label": {
            "type": "string",
            "example": "FxRatesApp-api key 1-xuce7G"
          },
          "oauthCallbackUrl": {
            "type": "string",
            "example": "oob"
          },
          "oauthScope": {
            "type": "string",
            "example": "oob"
          },
          "oauthType": {
            "type": "string",
            "example": "public"
          },
          "subscribed_plans": {
            "description": "Array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "custom_fields": {
            "description": "key/value pairs",
            "type": "object",
            "example": {
              "hallo": "hallo",
              "bye": "bye"
            }
          }
        },
        "type": "object"
      },
      "ApiKeyUpdate": {
        "properties": {
          "id": {
            "type": "string",
            "example": "39a586a3-a879-4e67-a87a-2bb0cb0035f0"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "passive"
            ],
            "example": "active"
          },
          "organization": {
            "description": "TODO",
            "type": "string"
          },
          "label": {
            "type": "string",
            "example": "FxRatesApp-api key 1-xuce7G"
          },
          "oauthCallbackUrl": {
            "type": "string",
            "example": "oob"
          },
          "oauthScope": {
            "type": "string",
            "example": "oob"
          },
          "oauthType": {
            "type": "string",
            "example": "public"
          },
          "subscribed_plans": {
            "description": "Array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "custom_fields": {
            "description": "key/value pairs",
            "type": "object",
            "example": {
              "hallo": "hallo",
              "bye": "bye"
            }
          }
        },
        "type": "object"
      },
      "ApiKeyUpdateSecret": {
        "properties": {
          "secret": {
            "type": "string",
            "example": "5a53b42ce8b34c2884d3cc90bdec6137"
          }
        },
        "type": "object"
      },
      "ApiPlan": {
        "properties": {
          "id": {
            "type": "string",
            "example": "12fcafb1-ce7a-4b52-a809-842d04c137a2"
          },
          "name": {
            "description": "The name of the API plan",
            "type": "string",
            "example": "Gold API plan"
          },
          "apis": {
            "description": "array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "quotaDetails": {
            "$ref": "#/components/schemas/QuotaDetails"
          },
          "rateLimitDetails": {
            "$ref": "#/components/schemas/RateLimitDetails"
          }
        },
        "type": "object"
      },
      "ApiPlanCreated": {
        "properties": {
          "id": {
            "type": "string",
            "example": "12fcafb1-ce7a-4b52-a809-842d04c137a2"
          },
          "name": {
            "description": "The name of the API plan",
            "type": "string",
            "example": "Gold API plan"
          }
        },
        "type": "object"
      },
      "ApiPlanNew": {
        "properties": {
          "id": {
            "description": "AAGM will generate it if empty",
            "type": "string"
          },
          "name": {
            "description": "The name of the API plan",
            "type": "string",
            "example": "Gold API plan"
          },
          "apis": {
            "description": "array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "quotaDetails": {
            "$ref": "#/components/schemas/QuotaDetails"
          },
          "rateLimitDetails": {
            "$ref": "#/components/schemas/RateLimitDetails"
          }
        },
        "type": "object"
      },
      "ApiPlanUpdate": {
        "properties": {
          "id": {
            "type": "string",
            "example": "12fcafb1-ce7a-4b52-a809-842d04c137a2"
          },
          "name": {
            "description": "The name of the API plan",
            "type": "string",
            "example": "Gold API plan"
          },
          "apis": {
            "description": "array of strings",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "quotaDetails": {
            "$ref": "#/components/schemas/QuotaDetails"
          },
          "rateLimitDetails": {
            "$ref": "#/components/schemas/RateLimitDetails"
          }
        },
        "type": "object"
      },
      "Metric": {
        "properties": {
          "ssghostname": {
            "type": "string",
            "example": "0a316b0ba6ba"
          },
          "ssgnodeName": {
            "type": "string",
            "example": "Gateway1"
          },
          "ssgnodeId": {
            "type": "string",
            "example": "qIDzQU6X9FDAEkw7ADfivJWUAdw9VeGu"
          },
          "ssgnodeIp": {
            "type": "string",
            "example": "172.19.0.11"
          },
          "requestTimeMillis": {
            "type": "string",
            "example": "1708426770638"
          },
          "gatewayTimeMillis": {
            "type": "string",
            "example": "1708426770673"
          },
          "elapsedMillis": {
            "type": "string",
            "example": "34.0"
          },
          "requestTcpRemoteIp": {
            "type": "string",
            "example": "172.19.0.1"
          },
          "requestHttpMethod": {
            "type": "string",
            "example": "GET"
          },
          "requestSize": {
            "type": "string",
            "example": "0"
          },
          "responseSize": {
            "type": "string",
            "example": "1033"
          },
          "requestAuthorized": {
            "type": "string",
            "example": "false"
          },
          "requestAuthenticatedUserId": {
            "type": "string",
            "example": ""
          },
          "requestAuthenticatedUserLogin": {
            "type": "string",
            "example": ""
          },
          "requestAuthType": {
            "type": "string",
            "example": ""
          },
          "requestCompleted": {
            "type": "string",
            "example": "true"
          },
          "apiKey": {
            "type": "string",
            "example": "l3ylcp89nwuh973qgv3istuyycp99c6y3h"
          },
          "apiKeyId": {
            "type": "string",
            "example": "l3ylcp89nwuh973qgv3istuyycp99c6y3h"
          },
          "apiKeyLabel": {
            "type": "string",
            "example": "AAGM Developer"
          },
          "apiKeyStatus": {
            "type": "string",
            "example": "active"
          },
          "apiId": {
            "type": "integer",
            "example": 330
          },
          "serviceOid": {
            "type": "string",
            "example": "b56f10f3c04cd607eb080dce4b042815"
          },
          "serviceName": {
            "type": "string",
            "example": "Demo Alarm API"
          },
          "apiPlanName": {
            "type": "string",
            "example": "AAGM SK APIs - Test Plan"
          },
          "apiPlanId": {
            "type": "string",
            "example": "b2a02f99-7f02-4061-8cc6-0baa658a39eb"
          },
          "apiPlanQuota": {
            "type": "string",
            "example": "1000"
          },
          "apiPlanQuotaEnabled": {
            "type": "string",
            "example": "true"
          },
          "apiPlanRateLimitEnabled": {
            "type": "string",
            "example": "true"
          },
          "apiPlanTimeUnit": {
            "type": "string",
            "example": "5"
          },
          "apiPlanMaxRequestRate": {
            "type": "string",
            "example": "20"
          },
          "organizationId": {
            "type": "string",
            "example": "4e9af22b-afbd-46cf-8665-b77f447606ab"
          },
          "organizationName": {
            "type": "string",
            "example": "default"
          },
          "responseCode": {
            "type": "string",
            "example": ""
          },
          "routingTotalTime": {
            "type": "string",
            "example": ""
          },
          "errorCodes": {
            "type": "string",
            "example": ""
          },
          "errorMessages": {
            "type": "string",
            "example": ""
          }
        },
        "type": "object"
      },
      "QuotaDetails": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "example": true
          },
          "quota": {
            "type": "integer",
            "example": 100
          },
          "timeUnit": {
            "description": "1:SECOND, 2:MINUTE, 3:HOUR ,4:DAY, 5:MONTH",
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4,
              5
            ],
            "example": 4
          }
        },
        "type": "object"
      },
      "RateLimitDetails": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "example": true
          },
          "maxRequestRate": {
            "type": "integer",
            "example": 5
          }
        },
        "type": "object"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "If no valid token is set in the header X-Token.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            },
            "example": {
              "result": "failure",
              "detail": "Access denied"
            }
          }
        }
      },
      "NoContent": {
        "description": "Success - No Content"
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            },
            "example": {
              "result": "failure",
              "detail": "Entity could not be found."
            }
          }
        }
      },
      "4XX": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            },
            "example": {
              "result": "failure",
              "detail": "Reason for the 'Bad Request'"
            }
          }
        }
      },
      "5XX": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            },
            "example": {
              "result": "failure",
              "detail": "Reason for the 'Internal Server Error'"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyScheme": {
        "type": "apiKey",
        "name": "X-TOKEN",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "Login",
      "description": "Access control."
    },
    {
      "name": "APIs",
      "description": "Full control over your APIs register, gitOps, delete and more."
    },
    {
      "name": "Templates",
      "description": "Create standardised APIs automatically."
    },
    {
      "name": "Migration",
      "description": "Migrate APIs or resources from different sources to different targets."
    },
    {
      "name": "Nodes",
      "description": "Get an overview of your nodes."
    },
    {
      "name": "Environment",
      "description": "Manage your environments."
    },
    {
      "name": "Jobs",
      "description": "The jobs currently running in the background. For example, migrations."
    },
    {
      "name": "Probe",
      "description": "General information on the status of your Gateway Manager."
    },
    {
      "name": "Configuration",
      "description": "Settings and miscellaneous."
    },
    {
      "name": "APIIDA API Control Plane - APIs",
      "description": "APIs for integration with the APIIDA API Control Plane. - Migrate an API."
    },
    {
      "name": "APIIDA API Control Plane - API Keys",
      "description": "APIs for integration with the APIIDA API Control Plane. - Manage API Keys in the nodes in environment x."
    },
    {
      "name": "APIIDA API Control Plane - API Plans",
      "description": "APIs for integration with the APIIDA API Control Plane. Manage API Plans in the nodes in environment x."
    }
  ],
  "externalDocs": {
    "description": "Visit our documentation",
    "url": "https://apiida.atlassian.net/wiki/spaces/AAGM/overview"
  }
}