{
  "openapi": "3.0.1",
  "info": {
    "title": "Exchange API",
    "description": "<b>Note:</b> Test the API with curl:<br><br><code>curl -sS -u &lt;org&gt;/iamapikey:&lt;key&gt; https://&lt;host&gt;:&lt;port&gt;/edge-exchange/v1/orgs/... | jq</code></br></br>This API specification is intended to be used by developers",
    "termsOfService": "",
    "license": {
      "name": "Apache License Version 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "version": "2.154.0"
  },
  "externalDocs": {
    "description": "Open-horizon ExchangeAPI",
    "url": "https://github.com/open-horizon/exchange-api"
  },
  "servers": [
    {
      "url": "http://localhost:8083"
    },
    {
      "url": "https://localhost:8083"
    }
  ],
  "security": [],
  "paths": {
    "/v1/admin/dropdb": {
      "post": {
        "tags": [
          "administration"
        ],
        "summary": "Deletes the tables from the database",
        "description": "Deletes the tables from the Exchange database. **Warning: this will delete the data too!** Because this is a dangerous method, you must first get a one-time token using GET /admin/dropdb/token, and use that to authenticate to this REST API method. Can only be run by the root User.",
        "operationId": "postDropDB",
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/admin/initdb": {
      "post": {
        "tags": [
          "administration"
        ],
        "summary": "Creates the table schema in the DB",
        "description": "Creates the tables with the necessary schema in the Exchange DB. This is now called at exchange startup, if necessary. Can only be run by the root user.",
        "operationId": "postInitializeDB",
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/admin/orgstatus": {
      "get": {
        "tags": [
          "administration"
        ],
        "summary": "Returns the org-specific status of the Exchange server",
        "description": "Returns a dictionary of statuses/statistics. Can be run by superuser, hub admins, and org admins.",
        "operationId": "getOrganizationStatus",
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOrgStatus"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/admin/reload": {
      "post": {
        "tags": [
          "administration"
        ],
        "summary": "Tells the exchange reread its config file",
        "description": "Directs the exchange server to reread /etc/horizon/exchange/config.json and continue running with those new settings. Can only be run by the root user.",
        "operationId": "postReload",
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/admin/status": {
      "get": {
        "tags": [
          "administration"
        ],
        "summary": "Returns status of the Exchange server",
        "description": "Returns a dictionary of statuses/statistics. Can be run by any user.",
        "operationId": "adminStatus",
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStatus"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/orgs/{organization}/status": {
      "get": {
        "tags": [
          "organization"
        ],
        "summary": "Returns summary status of the org",
        "description": "Returns the totals of key resources in the org. Can be run by any id in this org or a hub admin.",
        "operationId": "orgStatus",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminStatus"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/admin/version": {
      "get": {
        "tags": [
          "administration"
        ],
        "summary": "Returns the version of the Exchange server",
        "description": "Returns the version of the Exchange server as a simple string (no JSON or quotes). Can be run by anyone.",
        "operationId": "getVersion",
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/admin/dropdb/token": {
      "get": {
        "tags": [
          "administration"
        ],
        "summary": "Gets a 1-time token for deleting the DB",
        "description": "Returns a timed token that can be given to POST /admin/dropdb. The token is good for 10 minutes. Since dropping the DB tables deletes all of their data, this is a way of confirming you really want to do it. This can only be run as root.",
        "operationId": "getToken",
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDropdbTokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/orgs/{organization}/AgentFileVersion": {
      "get": {
        "tags": [
          "agent file version"
        ],
        "summary": "Get all agent file versions",
        "description": "Get all agent certificate, configuration, and software file versions. Run by agreement bot",
        "operationId": "getAgentConfigMgmt",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVersionsResponse"
                },
                "example": {
                  "agentSoftwareVersions": [
                    "2.30.0",
                    "2.25.4",
                    "1.4.5-123"
                  ],
                  "agentConfigVersions": [
                    "0.0.4",
                    "0.0.3"
                  ],
                  "agentCertVersions": [
                    "0.0.15"
                  ],
                  "lastUpdated": ""
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "agent file version"
        ],
        "summary": "Put all agent file versions",
        "description": "Put all agent certificate, configuration, and software file versions. Run by agreement bot",
        "operationId": "putAgentConfigMgmt",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAgbotsRequest"
              },
              "example": {
                "agentSoftwareVersions": [
                  "2.30.0",
                  "2.25.4",
                  "1.4.5-123"
                ],
                "agentConfigVersions": [
                  "0.0.4",
                  "0.0.3"
                ],
                "agentCertVersions": [
                  "0.0.15"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agent file version"
        ],
        "summary": "Delete all agent file versions",
        "description": "Delete all agent certificate, configuration, and software file versions. Run by agreement bot",
        "operationId": "deleteAgentConfigMgmt",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}": {
      "get": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Returns an Agreement Bot (AgBot)",
        "description": "Returns the AgBot with the specified identifier. Can be run by a User or the AgBot.",
        "operationId": "getAgreementBot",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only a single attribute can be specified. If not specified, the entire node resource (including services) will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotsResponse"
                },
                "example": {
                  "agbots": {
                    "orgid/agbotname": {
                      "token": "string",
                      "name": "string",
                      "owner": "string",
                      "msgEndPoint": "",
                      "lastHeartbeat": "2020-05-27T19:01:10.713Z[UTC]",
                      "publicKey": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Add/updates an Agreement Bot (AgBot)",
        "description": "This must be called by the User to add an AgBot, and then can be called by that User or AgBot to update itself.",
        "operationId": "putAgreementBot",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAgbotsRequest"
              },
              "example": {
                "token": "abc",
                "name": "myagbot",
                "publicKey": "ABCDEF"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "resource add/updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Deletes an Agreement Bot (AgBot)",
        "description": "Also deletes the agreements stored for this AgBot (but does not actually cancel the agreements between the Nodes and AgBot). Can be run by the owning User or the Agbot.",
        "operationId": "deleteAgreementBot",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Updates one attribute of an Agreement Bo (Agbot)",
        "description": "This can be called by the User or the AgBot.",
        "operationId": "patchAgreementBot",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the following attributes",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchAgbotsRequest"
              },
              "example": {
                "token": "abc",
                "name": "myagbot",
                "msgEndPoint": "string",
                "publicKey": "ABCDEF"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots": {
      "get": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Returns all Agreement Bots",
        "description": "Returns all Agreement Bots (AgBots). Can be run by any User.",
        "operationId": "getAgreementBots",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idfilter",
            "in": "query",
            "description": "Filter results to only include AgBots with this identifier (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter results to only include AgBots with this name (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include AgBots with this owner (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotsResponse"
                },
                "example": {
                  "agbots": {
                    "orgid/agbotname": {
                      "token": "string",
                      "name": "string",
                      "owner": "string",
                      "msgEndPoint": "",
                      "lastHeartbeat": "2020-05-27T19:01:10.713Z[UTC]",
                      "publicKey": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/heartbeat": {
      "post": {
        "tags": [
          "agreement bot"
        ],
        "summary": "Tells the Exchange this Agreement Bot is still operating",
        "description": "Lets the Exchange know this Agreement Bot (AgBot) is still active. Can be run by the owning User or the AgBot.",
        "operationId": "postHeartbeat",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/agreements/{agreement}": {
      "get": {
        "tags": [
          "agreement bot/agreement"
        ],
        "summary": "Returns an Agreement for an Agreement Bot (AgBot)",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "getAgreement",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreement",
            "in": "path",
            "description": "Agreement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotAgreementsResponse"
                },
                "example": {
                  "agreements": {
                    "agreementname": {
                      "service": {
                        "orgid": "string",
                        "pattern": "string",
                        "url": "string"
                      },
                      "state": "string",
                      "lastUpdated": "2019-05-14T16:34:37.173Z[UTC]",
                      "dataLastReceived": ""
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "agreement bot/agreement"
        ],
        "summary": "Adds/updates an Agreement of an Agreement Bot (AgBot)",
        "description": "This is called by the owning User or the AgBot to give their information about the Agreement.",
        "operationId": "putAgreement",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreement",
            "in": "path",
            "description": "Agreement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutAgbotAgreementRequest"
              },
              "example": {
                "service": {
                  "orgid": "string",
                  "pattern": "string",
                  "url": "string"
                },
                "state": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/agreement"
        ],
        "summary": "Deletes an Agreement of an Agreement Bot (AgBot)",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "deleteAgreement",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreement",
            "in": "path",
            "description": "Agreement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/agreements": {
      "get": {
        "tags": [
          "agreement bot/agreement"
        ],
        "summary": "Returns all Agreements this Agreement Bot (AgBot) is apart of.",
        "description": "Can be run by the owning User or the Agbot.",
        "operationId": "getAgreements",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotAgreementsResponse"
                },
                "example": {
                  "agreements": {
                    "agreementname": {
                      "service": {
                        "orgid": "string",
                        "pattern": "string",
                        "url": "string"
                      },
                      "state": "string",
                      "lastUpdated": "2019-05-14T16:34:37.173Z[UTC]",
                      "dataLastReceived": ""
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/agreement"
        ],
        "summary": "Deletes all Agreements this Agreement Bot (AgBot) has.",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "deleteAgreements",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agreements/confirm": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Confirms if this agbot agreement is active",
        "description": "Confirms whether or not this agreement id is valid, is owned by an agbot owned by this same username, and is a currently active agreement. Can only be run by an agbot or user.",
        "operationId": "postConfirm",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAgreementsConfirmRequest"
              },
              "example": {
                "agreementId": "ABCDEF"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/deployment/patterns/{deploymentpattern}": {
      "get": {
        "tags": [
          "agreement bot/deployment pattern"
        ],
        "summary": "Returns a Pattern this Agreement Bot is serving",
        "description": "Returns the specified Pattern with the for the specified Agreement Bot (AgBot). The deploymentpattern should be in the form patternOrgid_pattern. Can be run by the owning User or the AgBot.",
        "operationId": "getDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deploymentpattern",
            "in": "path",
            "description": "Deployment Pattern identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotPatternsResponse"
                },
                "example": {
                  "patterns": {
                    "patternname": {
                      "patternOrgid": "string",
                      "pattern": "string",
                      "nodeOrgid": "string",
                      "lastUpdated": "2019-05-14T16:34:36.397Z[UTC]"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/deployment pattern"
        ],
        "summary": "Deletes a Deployment Pattern of an Agreement Bot",
        "description": "Deletes a Deployment Pattern that this Agreement Bot (AgBot) was serving. Can be run by the owning User or the AgBot.",
        "operationId": "deleteDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deploymentpattern",
            "in": "path",
            "description": "Deployment Pattern identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/deployment/patterns": {
      "get": {
        "tags": [
          "agreement bot/deployment pattern"
        ],
        "summary": "Returns all patterns served by this agbot",
        "description": "Returns all patterns that this agbot is finding nodes for to make agreements with them. Can be run by the owning user or the agbot.",
        "operationId": "getDeploymentPatterns",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deployment_pattern",
            "in": "query",
            "description": "Filter by a Deployment Pattern",
            "allowEmptyValue": true
          },
          {
            "name": "deployment_pattern_organization",
            "in": "query",
            "description": "Filter by the Organization of a Deployment Pattern",
            "allowEmptyValue": true
          },
          {
            "name": "node_organization",
            "in": "query",
            "description": "Filter by the Organization of a Node",
            "allowEmptyValue": true
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotPatternsResponse"
                },
                "example": {
                  "patterns": {
                    "pattern1": {
                      "patternOrgid": "string",
                      "pattern": "string",
                      "nodeOrgid": "string",
                      "lastUpdated": "2019-05-14T16:34:36.295Z[UTC]"
                    },
                    "pattern2": {
                      "patternOrgid": "string",
                      "pattern": "string",
                      "nodeOrgid": "string",
                      "lastUpdated": "2019-05-14T16:34:36.397Z[UTC]"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "agreement bot/deployment pattern"
        ],
        "summary": "Adds a Deployment Pattern that the Agreement Bot should serve",
        "description": "Adds a new Deployment Pattern and Organization that this Agreement Bot (AgBot) should find Nodes for to make agreements with them. This is called by the owning User or the AgBot to give their information about the Deployment Pattern.",
        "operationId": "postDeploymentPatterns",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAgbotPatternRequest"
              },
              "example": {
                "patternOrgid": "string",
                "pattern": "string",
                "nodeOrgid": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/deployment pattern"
        ],
        "summary": "Deletes all Deployement Patterns of an Agreement Bot",
        "description": "Deletes all of the current Deployment Patterns that this Agreement Bot (AgBot) was serving. Can be run by the owning User or the AgBot.",
        "operationId": "deleteDeploymentPatterns",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/deployment/policies": {
      "get": {
        "tags": [
          "agreement bot/deployment policy"
        ],
        "summary": "Returns all Deployment Policies served by this Agreement Bot (AgBot)",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "getDeploymentPolicies",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deployment_policy",
            "in": "query",
            "description": "Filter by a Deployment Policy",
            "allowEmptyValue": true
          },
          {
            "name": "deployment_policy_organization",
            "in": "query",
            "description": "Filter by the Organization of a Deployment Policy",
            "allowEmptyValue": true
          },
          {
            "name": "node_organization",
            "in": "query",
            "description": "Filter by the Organization of a Node",
            "allowEmptyValue": true
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotBusinessPolsResponse"
                },
                "example": {
                  "businessPols": {
                    "buspolid": {
                      "businessPolOrgid": "string",
                      "businessPol": "string",
                      "deployment_policy": "string",
                      "nodeOrgid": "string",
                      "lastUpdated": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "agreement bot/deployment policy"
        ],
        "summary": "Adds a Deployment Policy that this Agreement Bot (AgBot) should serve",
        "description": "This AgBot should find Nodes for this Deployment Policy to make agreements with. This is called by the owning User or the AgBot to give their information about the Deployment Policy.",
        "operationId": "postDeploymentPolicies",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAgbotBusinessPolRequest"
              },
              "example": {
                "businessPolOrgid": "string",
                "businessPol": "string",
                "nodeOrgid": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/deployment policy"
        ],
        "summary": "Deletes all Deployment Policies this Agreement Bot (AgBot) is serving.",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "deleteDeploymentPolicies",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/deployment/policies/{deploymentpolicy}": {
      "get": {
        "tags": [
          "agreement bot/deployment policy"
        ],
        "summary": "Returns a Deployment Policy this Agreement Bot (AgBot) is serving",
        "description": "The buspolid should be in the form businessPolOrgid_businessPol. Can be run by the owning User or the AgBot.",
        "operationId": "getDeploymentPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deploymentpolicy",
            "in": "path",
            "description": "Deployment Policy identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotBusinessPolsResponse"
                },
                "example": {
                  "businessPols": {
                    "buspolid": {
                      "businessPolOrgid": "string",
                      "businessPol": "string",
                      "nodeOrgid": "string",
                      "lastUpdated": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/deployment policy"
        ],
        "summary": "Deletes a Deployment Policy this Agreement Bot (AgBot) is serving",
        "description": "Can be run by the owning User or the AgBot.",
        "operationId": "deleteDeploymentPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deploymentpolicy",
            "in": "path",
            "description": "Deployment Policy identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/msgs/{message}": {
      "get": {
        "tags": [
          "agreement bot/message"
        ],
        "summary": "Returns A specific Message that has been sent to this Agreement Bot (AgBot).",
        "description": "Deleted/post-TTL (Time To Live) Messages will not be returned. Can be run by a User or the AgBot.",
        "operationId": "getMessage",
        "parameters": [
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "path",
            "description": "Message identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotMsgsResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "agreement bot/message"
        ],
        "summary": "Deletes a Message of an Agreement Bot (AgBot)",
        "description": "This should be done by the AgBot after each Message is read. Can be run by the owning User or the AgBot.",
        "operationId": "deleteMessage",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "path",
            "description": "Message identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/agbots/{agreementbot}/msgs": {
      "get": {
        "tags": [
          "agreement bot/message"
        ],
        "summary": "Returns all Messages sent to this Agreement Bot (AgBot).",
        "description": "They will be returned in the order they were sent. All Messages that have been sent to this AgBot will be returned, unless the AgBot has deleted some, or some are past their TTL. Can be run by a User or the AgBot.",
        "operationId": "getMessages",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxmsgs",
            "in": "query",
            "description": "Maximum number of Messages returned. If this is less than the number of Messages available, the oldest Messages are returned. Defaults to unlimited.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAgbotMsgsResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "agreement bot/message"
        ],
        "summary": "Sends a Message from a Node to an Agreement Bot (AgBot)",
        "description": "The Node must first sign the Message (with its private key) and then encrypt the msg (with the AgBot's public key). Can be run by any Node.",
        "operationId": "postMessages",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agreementbot",
            "in": "path",
            "description": "Agreement Bot identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostAgbotsMsgsRequest"
              },
              "example": {
                "message": "VW1RxzeEwTF0U7S96dIzSBQ/hRjyidqNvBzmMoZUW3hpd3hZDvs",
                "ttl": 86400
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/catalog/patterns/patterns": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "Returns patterns in the IBM catalog",
        "description": "Returns public pattern definitions from orgs of the specified orgtype (default is IBM). Can be run by any user, node, or agbot.",
        "operationId": "getDeploymentPatterns_1",
        "parameters": [
          {
            "name": "orgtype",
            "in": "query",
            "description": "Filter results to only include orgs with this org type. A common org type is 'IBM'.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "IBM"
                  ]
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPatternsResponse"
                },
                "example": {
                  "patterns": {
                    "orgid/patternname": {
                      "owner": "string",
                      "label": "My Pattern",
                      "description": "blah blah",
                      "public": true,
                      "services": [
                        {
                          "serviceUrl": "string",
                          "serviceOrgid": "string",
                          "serviceArch": "string",
                          "agreementLess": false,
                          "serviceVersions": [
                            {
                              "version": "4.5.6",
                              "deployment_overrides": "string",
                              "deployment_overrides_signature": "a",
                              "priority": {
                                "priority_value": 50,
                                "retries": 1,
                                "retry_durations": 3600,
                                "verified_durations": 52
                              },
                              "upgradePolicy": {
                                "lifecycle": "immediate",
                                "time": "01:00AM"
                              }
                            }
                          ],
                          "dataVerification": {
                            "metering": {
                              "tokens": 1,
                              "per_time_unit": "min",
                              "notification_interval": 30
                            },
                            "URL": "",
                            "enabled": true,
                            "interval": 240,
                            "check_rate": 15,
                            "user": "",
                            "password": ""
                          },
                          "nodeHealth": {
                            "missing_heartbeat_interval": 600,
                            "check_agreement_status": 120
                          }
                        }
                      ],
                      "userInput": [],
                      "agreementProtocols": [
                        {
                          "name": "Basic"
                        }
                      ],
                      "lastUpdated": "2019-05-14T16:34:34.194Z[UTC]"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/catalog/services": {
      "get": {
        "tags": [
          "catalog"
        ],
        "summary": "Returns services in the IBM catalog",
        "description": "Returns public service definitions from orgs of the specified orgtype (default is IBM). Can be run by any user, node, or agbot.",
        "operationId": "getServicesCatalog",
        "parameters": [
          {
            "name": "orgtype",
            "in": "query",
            "description": "Filter results to only include orgs with this org type. A common org type is 'IBM'.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "IBM"
                  ]
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetServicesResponse"
                },
                "example": {
                  "services": {
                    "orgid/servicename": {
                      "owner": "string",
                      "label": "string",
                      "description": "blah blah",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "1.2.3",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.221Z[UTC]"
                    },
                    "orgid/servicename2": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "4.5.6",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [
                        {
                          "url": "string",
                          "org": "string",
                          "version": "[1.0.0,INFINITY)",
                          "versionRange": "[1.0.0,INFINITY)",
                          "arch": "string"
                        }
                      ],
                      "userInput": [
                        {
                          "name": "foo",
                          "label": "The Foo Value",
                          "type": "string",
                          "defaultValue": "bar"
                        }
                      ],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.680Z[UTC]"
                    },
                    "orgid/servicename3": {
                      "owner": "string",
                      "label": "string",
                      "description": "fake",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "string",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "",
                      "deploymentSignature": "",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-12-13T15:38:57.679Z[UTC]"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns/{pattern}": {
      "get": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Returns a pattern",
        "description": "Returns the pattern with the specified id. Can be run by a user, node, or agbot.",
        "operationId": "getDeploymentPattern_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified. If not specified, the entire pattern resource will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPatternsResponse"
                },
                "example": {
                  "patterns": {
                    "orgid/patternname": {
                      "owner": "string",
                      "label": "My Pattern",
                      "description": "blah blah",
                      "public": true,
                      "services": [
                        {
                          "serviceUrl": "string",
                          "serviceOrgid": "string",
                          "serviceArch": "string",
                          "agreementLess": false,
                          "serviceVersions": [
                            {
                              "version": "4.5.6",
                              "deployment_overrides": "string",
                              "deployment_overrides_signature": "a",
                              "priority": {
                                "priority_value": 50,
                                "retries": 1,
                                "retry_durations": 3600,
                                "verified_durations": 52
                              },
                              "upgradePolicy": {
                                "lifecycle": "immediate",
                                "time": "01:00AM"
                              }
                            }
                          ],
                          "dataVerification": {
                            "metering": {
                              "tokens": 1,
                              "per_time_unit": "min",
                              "notification_interval": 30
                            },
                            "URL": "",
                            "enabled": true,
                            "interval": 240,
                            "check_rate": 15,
                            "user": "",
                            "password": ""
                          },
                          "nodeHealth": {
                            "missing_heartbeat_interval": 600,
                            "check_agreement_status": 120
                          }
                        }
                      ],
                      "userInput": [],
                      "secretBinding": [],
                      "agreementProtocols": [
                        {
                          "name": "Basic"
                        }
                      ],
                      "lastUpdated": "2019-05-14T16:34:34.194Z[UTC]",
                      "clusterNamespace": "MyNamespace"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Adds a pattern",
        "description": "Creates a pattern resource. A pattern resource specifies all of the services that should be deployed for a type of node. When a node registers with Horizon, it can specify a pattern name to quickly tell Horizon what should be deployed on it. This can only be called by a user.",
        "operationId": "putDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "See details in the POST route.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutPatternRequest"
              },
              "example": {
                "label": "name of the edge pattern",
                "description": "descriptive text",
                "public": false,
                "services": [
                  {
                    "serviceUrl": "mydomain.com.weather",
                    "serviceOrgid": "myorg",
                    "serviceArch": "amd64",
                    "agreementLess": false,
                    "serviceVersions": [
                      {
                        "version": "1.0.1",
                        "deployment_overrides": "{\"services\":{\"location\":{\"environment\":[\"USE_NEW_STAGING_URL=false\"]}}}",
                        "deployment_overrides_signature": "",
                        "priority": {
                          "priority_value": 50,
                          "retries": 1,
                          "retry_durations": 3600,
                          "verified_durations": 52
                        },
                        "upgradePolicy": {
                          "lifecycle": "immediate",
                          "time": "01:00AM"
                        }
                      }
                    ],
                    "dataVerification": {
                      "enabled": true,
                      "URL": "",
                      "user": "",
                      "password": "",
                      "interval": 480,
                      "check_rate": 15,
                      "metering": {
                        "tokens": 1,
                        "per_time_unit": "min",
                        "notification_interval": 30
                      }
                    },
                    "nodeHealth": {
                      "missing_heartbeat_interval": 600,
                      "check_agreement_status": 120
                    }
                  }
                ],
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "myorg",
                    "serviceUrl": "myservice",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "agreementProtocols": [
                  {
                    "name": "Basic"
                  }
                ],
                "clusterNamespace": "MyNamespace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Adds a pattern",
        "description": "Creates a pattern resource. A pattern resource specifies all of the services that should be deployed for a type of node. When a node registers with Horizon, it can specify a pattern name to quickly tell Horizon what should be deployed on it. This can only be called by a user.",
        "operationId": "postDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutPatternRequest"
              },
              "example": {
                "label": "name of the edge pattern",
                "description": "descriptive text",
                "public": false,
                "services": [
                  {
                    "serviceUrl": "mydomain.com.weather",
                    "serviceOrgid": "myorg",
                    "serviceArch": "amd64",
                    "agreementLess": false,
                    "serviceVersions": [
                      {
                        "version": "1.0.1",
                        "deployment_overrides": "{\"services\":{\"location\":{\"environment\":[\"USE_NEW_STAGING_URL=false\"]}}}",
                        "deployment_overrides_signature": "",
                        "priority": {
                          "priority_value": 50,
                          "retries": 1,
                          "retry_durations": 3600,
                          "verified_durations": 52
                        },
                        "upgradePolicy": {
                          "lifecycle": "immediate",
                          "time": "01:00AM"
                        }
                      }
                    ],
                    "dataVerification": {
                      "enabled": true,
                      "URL": "",
                      "user": "",
                      "password": "",
                      "interval": 480,
                      "check_rate": 15,
                      "metering": {
                        "tokens": 1,
                        "per_time_unit": "min",
                        "notification_interval": 30
                      }
                    },
                    "nodeHealth": {
                      "missing_heartbeat_interval": 600,
                      "check_agreement_status": 120
                    }
                  }
                ],
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "myorg",
                    "serviceUrl": "myservice",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "agreementProtocols": [
                  {
                    "name": "Basic"
                  }
                ],
                "clusterNamespace": "MyNamespace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Deletes a pattern",
        "description": "Deletes a pattern. Can only be run by the owning user.",
        "operationId": "deleteDeploymentPattern_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Updates 1 attribute of a pattern",
        "description": "Updates one attribute of a pattern. This can only be called by the user that originally created this pattern resource.",
        "operationId": "patchDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the attributes",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchPatternRequest"
              },
              "example": {
                "label": "name of the edge pattern",
                "description": "descriptive text",
                "public": false,
                "services": [
                  {
                    "serviceUrl": "mydomain.com.weather",
                    "serviceOrgid": "myorg",
                    "serviceArch": "amd64",
                    "agreementLess": false,
                    "serviceVersions": [
                      {
                        "version": "1.0.1",
                        "deployment_overrides": "{\"services\":{\"location\":{\"environment\":[\"USE_NEW_STAGING_URL=false\"]}}}",
                        "deployment_overrides_signature": "",
                        "priority": {
                          "priority_value": 50,
                          "retries": 1,
                          "retry_durations": 3600,
                          "verified_durations": 52
                        },
                        "upgradePolicy": {
                          "lifecycle": "immediate",
                          "time": "01:00AM"
                        }
                      }
                    ],
                    "dataVerification": {
                      "enabled": true,
                      "URL": "",
                      "user": "",
                      "password": "",
                      "interval": 480,
                      "check_rate": 15,
                      "metering": {
                        "tokens": 1,
                        "per_time_unit": "min",
                        "notification_interval": 30
                      }
                    },
                    "nodeHealth": {
                      "missing_heartbeat_interval": 600,
                      "check_agreement_status": 120
                    }
                  }
                ],
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "myorg",
                    "serviceUrl": "myservice",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "agreementProtocols": [
                  {
                    "name": "Basic"
                  }
                ],
                "clusterNamespace": "MyNamespace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns": {
      "get": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Returns all patterns",
        "description": "Returns all pattern definitions in this organization. Can be run by any user, node, or agbot.",
        "operationId": "getDeploymentPatterns_2",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idfilter",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this id (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this owner (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "public",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this public setting",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this label (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this description (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clusternamespace",
            "in": "query",
            "description": "Filter results to only include deployment patterns with this cluster namespace (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPatternsResponse"
                },
                "example": {
                  "patterns": {
                    "orgid/patternname": {
                      "owner": "string",
                      "label": "My Pattern",
                      "description": "blah blah",
                      "public": true,
                      "services": [
                        {
                          "serviceUrl": "string",
                          "serviceOrgid": "string",
                          "serviceArch": "string",
                          "agreementLess": false,
                          "serviceVersions": [
                            {
                              "version": "4.5.6",
                              "deployment_overrides": "string",
                              "deployment_overrides_signature": "a",
                              "priority": {
                                "priority_value": 50,
                                "retries": 1,
                                "retry_durations": 3600,
                                "verified_durations": 52
                              },
                              "upgradePolicy": {
                                "lifecycle": "immediate",
                                "time": "01:00AM"
                              }
                            }
                          ],
                          "dataVerification": {
                            "metering": {
                              "tokens": 1,
                              "per_time_unit": "min",
                              "notification_interval": 30
                            },
                            "URL": "",
                            "enabled": true,
                            "interval": 240,
                            "check_rate": 15,
                            "user": "",
                            "password": ""
                          },
                          "nodeHealth": {
                            "missing_heartbeat_interval": 600,
                            "check_agreement_status": 120
                          }
                        }
                      ],
                      "userInput": [],
                      "secretBinding": [],
                      "agreementProtocols": [
                        {
                          "name": "Basic"
                        }
                      ],
                      "lastUpdated": "2019-05-14T16:34:34.194Z[UTC]",
                      "clusterNamespace": "MyNamespace"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns/{pattern}/nodehealth": {
      "post": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Returns agreement health of nodes of a particular pattern",
        "description": "Returns the lastHeartbeat and agreement times for all nodes that are this pattern and have changed since the specified lastTime. Can be run by a user or agbot (but not a node).",
        "operationId": "postNodeHealth",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostNodeHealthRequest"
              },
              "example": {
                "lastTime": "2017-09-28T13:51:36.629Z[UTC]",
                "nodeOrgids": [
                  "org1",
                  "org2",
                  "..."
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostNodeHealthResponse"
                },
                "example": {
                  "nodes": {
                    "string": {
                      "lastHeartbeat": "string",
                      "agreements": {
                        "string": {
                          "lastUpdated": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns/{pattern}/search": {
      "post": {
        "tags": [
          "deployment pattern"
        ],
        "summary": "Returns matching nodes of a particular pattern",
        "description": "Returns the matching nodes that are using this pattern and do not already have an agreement for the specified service. Can be run by a user or agbot (but not a node).",
        "operationId": "postSearchNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPatternSearchRequest"
              },
              "example": {
                "arch": "arm",
                "nodeOrgids": [
                  "org1",
                  "org2",
                  "..."
                ],
                "secondsStale": 60,
                "serviceUrl": "myorg/mydomain.com.sdr"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostPatternSearchResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns/{pattern}/keys/{keyid}": {
      "get": {
        "tags": [
          "deployment pattern/key"
        ],
        "summary": "Returns a key/cert for this pattern",
        "description": "Returns the signing public key/cert with the specified keyid for this pattern. The raw content of the key/cert is returned, not json. Can be run by any credentials able to view the pattern.",
        "operationId": "getKeyDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "Signing public key/certificate identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "deployment pattern/key"
        ],
        "summary": "Adds/updates a key/cert for the pattern",
        "description": "Adds a new signing public key/cert, or updates an existing key/cert, for this pattern. This can only be run by the pattern owning user.",
        "operationId": "putKeyDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "ID of the pattern to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "ID of the key to be added/updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Note that the input body is just the bytes of the key/cert (not the typical json), so the 'Content-Type' header must be set to 'text/plain'.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutPatternKeyRequest"
              },
              "example": {
                "key": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "deployment pattern/key"
        ],
        "summary": "Deletes a key of a pattern",
        "description": "Deletes a key/cert for this pattern. This can only be run by the pattern owning user.",
        "operationId": "deleteKeyDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "ID of the key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/patterns/{pattern}/keys/{pattern}/keys": {
      "get": {
        "tags": [
          "deployment pattern/key"
        ],
        "summary": "Returns all keys/certs for this pattern",
        "description": "Returns all the signing public keys/certs for this pattern. Can be run by any credentials able to view the pattern.",
        "operationId": "getKeysDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "deployment pattern/key"
        ],
        "summary": "Deletes all keys of a pattern",
        "description": "Deletes all of the current keys/certs for this pattern. This can only be run by the pattern owning user.",
        "operationId": "deleteKeysDeploymentPattern",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "path",
            "description": "Pattern name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/policies": {
      "get": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Returns all deployment policies",
        "description": "Returns all deployment policy definitions in this organization. Can be run by any user, node, or agbot.",
        "operationId": "getDeploymentPolicies_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idfilter",
            "in": "query",
            "description": "Filter results to only include Deployment Policies with this Identifier (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include Deployment Policies with this Owner (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "Filter results to only include Deployment Policies with this Label (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Filter results to only include Deployment Policies with this Description (can include '%' for wildcard - the URL encoding for '%' is '%25')",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessPoliciesResponse"
                },
                "example": {
                  "businessPolicy": {
                    "orgid/mybuspol": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "service": {
                        "name": "string",
                        "org": "string",
                        "arch": "string",
                        "serviceVersions": [
                          {
                            "version": "1.2.3",
                            "priority": null,
                            "upgradePolicy": null
                          }
                        ],
                        "nodeHealth": {
                          "missing_heartbeat_interval": 600,
                          "check_agreement_status": 120
                        },
                        "clusterNamespace": "MyNamespace"
                      },
                      "userInput": [],
                      "secretBinding": [],
                      "properties": [
                        {
                          "name": "string",
                          "type": "string",
                          "value": "string"
                        }
                      ],
                      "constraints": [
                        "a == b"
                      ],
                      "lastUpdated": "string",
                      "created": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/policies/{policy}": {
      "get": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Returns a deployment policy",
        "description": "Returns the deployment policy with the specified id. Can be run by a user, node, or agbot.",
        "operationId": "getDeploymentPolicy_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Deployment Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified. If not specified, the entire deployment policy resource will be returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBusinessPoliciesResponse"
                },
                "example": {
                  "businessPolicy": {
                    "orgid/mybuspol": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "service": {
                        "name": "string",
                        "org": "string",
                        "arch": "string",
                        "serviceVersions": [
                          {
                            "version": "1.2.3",
                            "priority": null,
                            "upgradePolicy": null
                          }
                        ],
                        "nodeHealth": {
                          "missing_heartbeat_interval": 600,
                          "check_agreement_status": 120
                        },
                        "clusterNamespace": "MyNamespace"
                      },
                      "userInput": [],
                      "secretBinding": [],
                      "properties": [
                        {
                          "name": "string",
                          "type": "string",
                          "value": "string"
                        }
                      ],
                      "constraints": [
                        "a == b"
                      ],
                      "lastUpdated": "string",
                      "created": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Updates a deployment policy",
        "description": "Updates a deployment policy resource. This can only be called by the user that created it.",
        "operationId": "putDeploymentPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Business Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Deployment Policy object that needs to be updated. See details in the POST route above.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutBusinessPolicyRequest"
              },
              "example": {
                "label": "name of the deployment policy",
                "description": "descriptive text",
                "service": {
                  "name": "mydomain.com.weather",
                  "org": "myorg",
                  "arch": "amd64",
                  "serviceVersions": [
                    {
                      "version": "1.0.1",
                      "priority": {
                        "priority_value": 50,
                        "retries": 1,
                        "retry_durations": 3600,
                        "verified_durations": 52
                      },
                      "upgradePolicy": {
                        "lifecycle": "immediate",
                        "time": "01:00AM"
                      }
                    }
                  ],
                  "nodeHealth": {
                    "missing_heartbeat_interval": 600,
                    "check_agreement_status": 120
                  },
                  "clusterNamespace": "MyNamespace"
                },
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "string",
                    "serviceUrl": "string",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Adds a deployment policy",
        "description": "Creates a deployment policy resource. A deployment policy resource specifies the service that should be deployed based on the specified properties and constraints. This can only be called by a user.",
        "operationId": "postDeploymentPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Deployment Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutBusinessPolicyRequest"
              },
              "example": {
                "label": "name of the deployment policy",
                "description": "descriptive text",
                "service": {
                  "name": "mydomain.com.weather",
                  "org": "myorg",
                  "arch": "amd64",
                  "serviceVersions": [
                    {
                      "version": "1.0.1",
                      "priority": {
                        "priority_value": 50,
                        "retries": 1,
                        "retry_durations": 3600,
                        "verified_durations": 52
                      },
                      "upgradePolicy": {
                        "lifecycle": "immediate",
                        "time": "01:00AM"
                      }
                    }
                  ],
                  "nodeHealth": {
                    "missing_heartbeat_interval": 600,
                    "check_agreement_status": 120
                  },
                  "clusterNamespace": "MyNamespace"
                },
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "string",
                    "serviceUrl": "string",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Deletes a deployment policy",
        "description": "Deletes a deployment policy. Can only be run by the owning user.",
        "operationId": "deleteDeploymentPolicy_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Deployment Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Updates 1 attribute of a deployment policy",
        "description": "Updates one attribute of a deployment policy. This can only be called by the user that originally created this deployment policy resource.",
        "operationId": "patchDeploymentPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Business Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the attributes",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutBusinessPolicyRequest"
              },
              "example": {
                "label": "name of the deployment policy",
                "description": "descriptive text",
                "service": {
                  "name": "mydomain.com.weather",
                  "org": "myorg",
                  "arch": "amd64",
                  "serviceVersions": [
                    {
                      "version": "1.0.1",
                      "priority": {
                        "priority_value": 50,
                        "retries": 1,
                        "retry_durations": 3600,
                        "verified_durations": 52
                      },
                      "upgradePolicy": {
                        "lifecycle": "immediate",
                        "time": "01:00AM"
                      }
                    }
                  ],
                  "nodeHealth": {
                    "missing_heartbeat_interval": 600,
                    "check_agreement_status": 120
                  },
                  "clusterNamespace": "MyNamespace"
                },
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "secretBinding": [
                  {
                    "serviceOrgid": "string",
                    "serviceUrl": "string",
                    "serviceArch": "amd64",
                    "serviceVersionRange": "x.y.z",
                    "secrets": [
                      {
                        "<service-secret-name1>": "<vault-secret-name1>"
                      },
                      {
                        "<service-secret-name2>": "<vault-secret-name2>"
                      }
                    ],
                    "enableNodeLevelSecrets": false
                  }
                ],
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/deployment/policies/{policy}/search": {
      "post": {
        "tags": [
          "deployment policy"
        ],
        "summary": "Returns matching nodes for this deployment policy",
        "description": "Returns the matching nodes for this deployment policy that do not already have an agreement for the specified service. Can be run by a user or agbot (but not a node).",
        "operationId": "postDeploymentPolicySearch",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policy",
            "in": "path",
            "description": "Deployment Policy name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostBusinessPolicySearchRequest"
              },
              "example": {
                "changedSince": "123456L",
                "nodeOrgids": [
                  "org1",
                  "org2",
                  "..."
                ],
                "numEntries": 100,
                "session": "token"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostBusinessPolicySearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad request"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "old session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicySearchResponseDesync"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orgs/{organization}/managementpolicies": {
      "get": {
        "tags": [
          "management policy"
        ],
        "summary": "Returns all node management policies",
        "description": "Returns all management policy definitions in this organization. Can be run by any user, node, or agbot.",
        "operationId": "getManagementPolicies",
        "parameters": [
          {
            "name": "description",
            "in": "query",
            "description": "Filter results to only include management policies with this description (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idfilter",
            "in": "query",
            "description": "Filter results to only include management policies with this id (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "Filter results to only include management policies with this label (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "manifest",
            "in": "query",
            "description": "Filter results to only include management policies with this manifest (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include management policies with this owner (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetManagementPoliciesResponse"
                },
                "example": {
                  "managementPolicy": {
                    "orgid/mymgmtpol": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "properties": [
                        {
                          "name": "string",
                          "type": "string",
                          "value": "string"
                        }
                      ],
                      "constraints": [
                        "a == b"
                      ],
                      "patterns": [
                        "pat1"
                      ],
                      "enabled": true,
                      "agentUpgradePolicy": {
                        "atLeastVersion": "current",
                        "start": "now",
                        "duration": 0
                      },
                      "lastUpdated": "string",
                      "created": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/managementpolicies/{mgmtpolicy}": {
      "get": {
        "tags": [
          "management policy"
        ],
        "summary": "Returns a node management policy",
        "description": "Returns the management policy with the specified id. Can be run by any user, node, or agbot.",
        "operationId": "getManagementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Node management policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified. If not specified, the entire management policy resource will be returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetManagementPoliciesResponse"
                },
                "example": {
                  "owner": "string",
                  "label": "string",
                  "description": "string",
                  "constraints": [
                    "a == b"
                  ],
                  "properties": [
                    {
                      "name": "string",
                      "type": "string",
                      "value": "string"
                    }
                  ],
                  "patterns": [
                    "pat1"
                  ],
                  "enabled": true,
                  "start": "now",
                  "duration": 0,
                  "agentUpgradePolicy": {
                    "manifest": "<org/manifestId>",
                    "allowDowngrade": false
                  },
                  "lastUpdated": "string"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "management policy"
        ],
        "summary": "Updates a node management policy",
        "description": "Updates a node management policy resource. A node management policy controls the updating of the edge node agents. This can only be called by a user.",
        "operationId": "putManagementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Management Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutManagementPolicyRequest"
              },
              "example": {
                "label": "name of the management policy",
                "description": "descriptive text",
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ],
                "patterns": [
                  "pat1"
                ],
                "enabled": true,
                "agentUpgradePolicy": {
                  "atLeastVersion": "current",
                  "start": "now",
                  "duration": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "management policy"
        ],
        "summary": "Adds a node management policy",
        "description": "Creates a node management policy resource. A node management policy controls the updating of the edge node agents. This can only be called by a user.",
        "operationId": "postManagementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Management Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutManagementPolicyRequest"
              },
              "example": {
                "label": "name of the management policy",
                "description": "descriptive text",
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ],
                "patterns": [
                  "pat1"
                ],
                "enabled": true,
                "agentUpgradePolicy": {
                  "atLeastVersion": "current",
                  "start": "now",
                  "duration": 0
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "management policy"
        ],
        "summary": "Deletes a management policy",
        "description": "Deletes a management policy. Can only be run by the owning user.",
        "operationId": "deleteManagementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Management Policy name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/services_configstate": {
      "post": {
        "tags": [
          "node"
        ],
        "summary": "Changes config state of registered services",
        "description": "Suspends (or resumes) 1 or more services on this edge node. Can be run by the node owner or the node.",
        "operationId": "postConfigurationState",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostNodeConfigStateRequest"
              },
              "example": {
                "org": "myorg",
                "url": "myserviceurl",
                "configState": "suspended",
                "version": "1.0.0"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/node-details": {
      "get": {
        "tags": [
          "node"
        ],
        "summary": "Returns all nodes (edge devices) with node errors, policy and status. Can be run by any user or agbot.",
        "description": "Returns all nodes with node errors, policy and status",
        "operationId": "getDetails",
        "parameters": [
          {
            "name": "arch",
            "in": "query",
            "description": "Filter results to only include nodes with this architecture (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "query",
            "description": "Filter results to only include nodes with this id (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter results to only include nodes with this name (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter results to only include nodes with this type ('device' or 'cluster')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include nodes with this owner (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NodeDetails"
                  }
                },
                "example": [
                  {
                    "arch": "string",
                    "connectivity": {
                      "string": false
                    },
                    "constraints": [
                      "string",
                      "string",
                      "string"
                    ],
                    "errors": [
                      {
                        "event_code": "string",
                        "hidden": true,
                        "message": "string",
                        "record_id": "string"
                      }
                    ],
                    "heartbeatIntervals": {
                      "intervalAdjustment": 0,
                      "minInterval": 0,
                      "maxInterval": 0
                    },
                    "id": "string",
                    "lastHeartbeat": "string",
                    "lastUpdatedNode": "string",
                    "lastUpdatedNodeError": "string",
                    "lastUpdatedNodePolicy": "string",
                    "lastUpdatedNodeStatus": "string",
                    "msgEndPoint": "",
                    "name": "string",
                    "nodeType": "device",
                    "owner": "string",
                    "orgid": "string",
                    "pattern": "",
                    "properties": [
                      {
                        "string": "string"
                      },
                      {
                        "string": "string"
                      },
                      {
                        "string": "string"
                      }
                    ],
                    "publicKey": "string",
                    "registeredServices": [
                      {
                        "configState": "active",
                        "numAgreements": 0,
                        "policy": "",
                        "properties": [],
                        "url": "string"
                      },
                      {
                        "configState": "active",
                        "numAgreements": 0,
                        "policy": "",
                        "properties": [],
                        "url": "string"
                      },
                      {
                        "configState": "active",
                        "numAgreements": 0,
                        "policy": "",
                        "properties": [],
                        "url": "string"
                      }
                    ],
                    "runningServices": "|orgid/serviceid|",
                    "services": [
                      {
                        "agreementId": "string",
                        "arch": "string",
                        "containerStatus": [],
                        "operatorStatus": {},
                        "orgid": "string",
                        "serviceUrl": "string",
                        "version": "string",
                        "configState": "string"
                      }
                    ],
                    "softwareVersions": {},
                    "token": "string",
                    "userInput": [
                      {
                        "inputs": [
                          {
                            "name": "var1",
                            "value": "someString"
                          },
                          {
                            "name": "var2",
                            "value": 5
                          },
                          {
                            "name": "var3",
                            "value": 22.2
                          }
                        ],
                        "serviceArch": "string",
                        "serviceOrgid": "string",
                        "serviceUrl": "string",
                        "serviceVersionRange": "string",
                        "ha_group": "string"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/errors": {
      "get": {
        "tags": [
          "node/error"
        ],
        "summary": "Returns the node errors",
        "description": "Returns any node errors. Can be run by any user or the node.",
        "operationId": "getErrors",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeError"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node/error"
        ],
        "summary": "Adds/updates node error list",
        "description": "Adds or updates any error of a node. This is called by the node or owning user.",
        "operationId": "putErrors",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/List"
              },
              "example": {
                "errors": [
                  {
                    "record_id": "string",
                    "message": "string",
                    "event_code": "string",
                    "hidden": false
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/error"
        ],
        "summary": "Deletes the error list of a node",
        "description": "Deletes the error list of a node. Can be run by the owning user or the node.",
        "operationId": "deleteErrors",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/heartbeat": {
      "post": {
        "tags": [
          "node"
        ],
        "summary": "Tells the exchange this node is still operating",
        "description": "Lets the exchange know this node is still active so it is still a candidate for contracting. Can be run by the owning user or the node.",
        "operationId": "postHeartbeatNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}": {
      "get": {
        "tags": [
          "node"
        ],
        "summary": "Returns a node",
        "description": "Returns the node (edge device) with the specified id. Can be run by that node, a user, or an agbot.",
        "operationId": "getNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified, and it must be 1 of the direct attributes of the node resource (not of the services). If not specified, the entire node resource (including services) will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodesResponse"
                },
                "example": {
                  "nodes": {
                    "orgid/nodeid": {
                      "token": "string",
                      "name": "string",
                      "owner": "string",
                      "nodeType": "device",
                      "pattern": "",
                      "registeredServices": [
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        },
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        },
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        }
                      ],
                      "userInput": [
                        {
                          "serviceOrgid": "string",
                          "serviceUrl": "string",
                          "serviceArch": "string",
                          "serviceVersionRange": "string",
                          "inputs": [
                            {
                              "name": "var1",
                              "value": "someString"
                            },
                            {
                              "name": "var2",
                              "value": 5
                            },
                            {
                              "name": "var3",
                              "value": 22.2
                            }
                          ]
                        }
                      ],
                      "msgEndPoint": "",
                      "softwareVersions": {},
                      "lastHeartbeat": "string",
                      "publicKey": "string",
                      "arch": "string",
                      "heartbeatIntervals": {
                        "minInterval": 0,
                        "maxInterval": 0,
                        "intervalAdjustment": 0
                      },
                      "ha_group": "groupName",
                      "lastUpdated": "string",
                      "clusterNamespace": "MyNamespace",
                      "isNamespaceScoped": false
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node"
        ],
        "summary": "Add/updates a node",
        "description": "Adds a new edge node, or updates an existing node. This must be called by the user to add a node, and then can be called by that user or node to update itself.",
        "operationId": "putNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noheartbeat",
            "in": "query",
            "description": "If set to 'true', skip the step to update the lastHeartbeat field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodesRequest"
              },
              "example": {
                "token": "abc",
                "name": "rpi3",
                "nodeType": "device",
                "pattern": "myorg/mypattern",
                "arch": "arm",
                "registeredServices": [
                  {
                    "url": "IBM/github.com.open-horizon.examples.cpu",
                    "numAgreements": 1,
                    "policy": "{}",
                    "properties": [
                      {
                        "name": "arch",
                        "value": "arm",
                        "propType": "string",
                        "op": "="
                      }
                    ]
                  }
                ],
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "msgEndPoint": "",
                "softwareVersions": {
                  "horizon": "1.2.3"
                },
                "publicKey": "ABCDEF",
                "heartbeatIntervals": {
                  "minInterval": 10,
                  "maxInterval": 120,
                  "intervalAdjustment": 10
                },
                "clusterNamespace": "MyNamespace",
                "isNamespaceScoped": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource add/updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node"
        ],
        "summary": "Deletes a node",
        "description": "Deletes a node (RPi), and deletes the agreements stored for this node (but does not actually cancel the agreements between the node and agbots). Can be run by the owning user or the node.",
        "operationId": "deleteNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "node"
        ],
        "summary": "Updates 1 attribute of a node",
        "description": "Updates some attributes of a node. This can be called by the user or the node.",
        "operationId": "patchNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the following attributes",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchNodesRequest"
              },
              "example": {
                "token": "abc",
                "name": "rpi3",
                "nodeType": "device",
                "pattern": "myorg/mypattern",
                "arch": "arm",
                "registeredServices": [
                  {
                    "url": "IBM/github.com.open-horizon.examples.cpu",
                    "numAgreements": 1,
                    "policy": "{}",
                    "properties": [
                      {
                        "name": "arch",
                        "value": "arm",
                        "propType": "string",
                        "op": "="
                      }
                    ]
                  }
                ],
                "userInput": [
                  {
                    "serviceOrgid": "IBM",
                    "serviceUrl": "ibm.cpu2msghub",
                    "serviceArch": "",
                    "serviceVersionRange": "[0.0.0,INFINITY)",
                    "inputs": [
                      {
                        "name": "foo",
                        "value": "bar"
                      }
                    ]
                  }
                ],
                "msgEndPoint": "",
                "softwareVersions": {
                  "horizon": "1.2.3"
                },
                "publicKey": "ABCDEF",
                "heartbeatIntervals": {
                  "minInterval": 10,
                  "maxInterval": 120,
                  "intervalAdjustment": 10
                },
                "clusterNamespace": "MyNamespace",
                "isNamespaceScoped": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes": {
      "get": {
        "tags": [
          "node"
        ],
        "summary": "Returns all nodes",
        "description": "Returns all nodes (edge devices). Can be run by any user or agbot.",
        "operationId": "getNodes",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "idfilter",
            "in": "query",
            "description": "Filter results to only include nodes with this id (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter results to only include nodes with this name (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include nodes with this owner (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nodetype",
            "in": "query",
            "description": "Filter results to only include nodes with this nodeType ('device' or 'cluster')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "arch",
            "in": "query",
            "description": "Filter results to only include nodes with this arch (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodesResponse"
                },
                "example": {
                  "nodes": {
                    "orgid/nodeid": {
                      "token": "string",
                      "name": "string",
                      "owner": "string",
                      "nodeType": "device",
                      "pattern": "",
                      "registeredServices": [
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        },
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        },
                        {
                          "url": "string",
                          "numAgreements": 0,
                          "configState": "active",
                          "policy": "",
                          "properties": [],
                          "version": ""
                        }
                      ],
                      "userInput": [
                        {
                          "serviceOrgid": "string",
                          "serviceUrl": "string",
                          "serviceArch": "string",
                          "serviceVersionRange": "string",
                          "inputs": [
                            {
                              "name": "var1",
                              "value": "someString"
                            },
                            {
                              "name": "var2",
                              "value": 5
                            },
                            {
                              "name": "var3",
                              "value": 22.2
                            }
                          ]
                        }
                      ],
                      "msgEndPoint": "",
                      "softwareVersions": {},
                      "lastHeartbeat": "string",
                      "publicKey": "string",
                      "arch": "string",
                      "heartbeatIntervals": {
                        "minInterval": 0,
                        "maxInterval": 0,
                        "intervalAdjustment": 0
                      },
                      "ha_group": "groupName",
                      "lastUpdated": "string",
                      "clusterNamespace": "MyNamespace",
                      "isNamespaceScoped": false
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/policy": {
      "get": {
        "tags": [
          "node/policy"
        ],
        "summary": "Returns the node policy",
        "description": "Returns the node run time policy. Can be run by a user or the node.",
        "operationId": "getPolicyNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodePolicy"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node/policy"
        ],
        "summary": "Adds/updates the node policy",
        "description": "Adds or updates the policy of a node. This is called by the node or owning user.",
        "operationId": "putPolicyNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noheartbeat",
            "in": "query",
            "description": "If set to 'true', skip the step to update the node's lastHeartbeat field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodePolicyRequest"
              },
              "example": {
                "label": "human readable name of the node policy",
                "description": "descriptive text",
                "properties": [
                  {
                    "name": "mycommonprop",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ],
                "deployment": {
                  "properties": [
                    {
                      "name": "mydeploymentprop",
                      "value": "value2",
                      "type": "string"
                    }
                  ],
                  "constraints": [
                    "c == d"
                  ]
                },
                "management": {
                  "properties": [
                    {
                      "name": "mymanagementprop",
                      "value": "value3",
                      "type": "string"
                    }
                  ],
                  "constraints": [
                    "e == f"
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/policy"
        ],
        "summary": "Deletes the policy of a node",
        "description": "Deletes the policy of a node. Can be run by the owning user or the node.",
        "operationId": "deletePolicyNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/status": {
      "get": {
        "tags": [
          "node/status"
        ],
        "summary": "Returns the node status",
        "description": "Returns the node run time status, for example service container status. Can be run by a user or the node.",
        "operationId": "getStatusNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeStatus"
                },
                "example": {
                  "connectivity": {
                    "string": true
                  },
                  "services": [
                    {
                      "agreementId": "string",
                      "serviceUrl": "string",
                      "orgid": "string",
                      "version": "string",
                      "arch": "string",
                      "containerStatus": [],
                      "operatorStatus": {},
                      "configState": "string"
                    }
                  ],
                  "runningServices": "|orgid/serviceid|",
                  "lastUpdated": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node/status"
        ],
        "summary": "Adds/updates the node status",
        "description": "Adds or updates the run time status of a node. This is called by the node or owning user.",
        "operationId": "putStatusNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodeStatusRequest"
              },
              "example": {
                "connectivity": {
                  "string": true
                },
                "services": [
                  {
                    "agreementId": "78d7912aafb6c11b7a776f77d958519a6dc718b9bd3da36a1442ebb18fe9da30",
                    "serviceUrl": "mydomain.com.location",
                    "orgid": "ling.com",
                    "version": "1.2",
                    "arch": "amd64",
                    "containerStatus": [
                      {
                        "name": "/dc23c045eb64e1637d027c4b0236512e89b2fddd3f06290c7b2354421d9d8e0d-location",
                        "image": "summit.hovitos.engineering/x86/location:v1.2",
                        "created": 1506086099,
                        "state": "running"
                      }
                    ],
                    "operatorStatus": {},
                    "configState": "active"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/status"
        ],
        "summary": "Deletes the status of a node",
        "description": "Deletes the status of a node. Can be run by the owning user or the node.",
        "operationId": "deleteStatusNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/agreements/{agid}": {
      "get": {
        "tags": [
          "node/agreement"
        ],
        "summary": "Returns an agreement for a node",
        "description": "Returns the agreement with the specified agid for the specified node id. Can be run by a user or the node.",
        "operationId": "getAgreementNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agid",
            "in": "path",
            "description": "ID of the agreement.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeAgreementsResponse"
                },
                "example": {
                  "agreements": {
                    "agreementname": {
                      "services": [
                        {
                          "orgid": "string",
                          "url": "string"
                        }
                      ],
                      "agrService": {
                        "orgid": "string",
                        "pattern": "string",
                        "url": "string"
                      },
                      "state": "string",
                      "lastUpdated": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node/agreement"
        ],
        "summary": "Adds/updates an agreement of a node",
        "description": "Adds a new agreement of a node, or updates an existing agreement. This is called by the node or owning user to give their information about the agreement.",
        "operationId": "putAgreementNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agid",
            "in": "path",
            "description": "ID of the agreement to be added/updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "noheartbeat",
            "in": "query",
            "description": "If set to 'true', skip the step to update the node's lastHeartbeat field.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodeAgreementRequest"
              },
              "example": {
                "services": [
                  {
                    "orgid": "myorg",
                    "url": "mydomain.com.rtlsdr"
                  }
                ],
                "agreementService": {
                  "orgid": "myorg",
                  "pattern": "myorg/mypattern",
                  "url": "myorg/mydomain.com.sdr"
                },
                "state": "negotiating"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/agreement"
        ],
        "summary": "Deletes an agreement of a node",
        "description": "Deletes an agreement of a node. Can be run by the owning user or the node.",
        "operationId": "deleteAgreementNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agid",
            "in": "path",
            "description": "ID of the agreement to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/agreements": {
      "get": {
        "tags": [
          "node/agreement"
        ],
        "summary": "Returns all agreements this node is in",
        "description": "Returns all agreements that this node is part of. Can be run by a user or the node.",
        "operationId": "getAgreementsNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeAgreementsResponse"
                },
                "example": {
                  "agreements": {
                    "agreementname": {
                      "services": [
                        {
                          "orgid": "string",
                          "url": "string"
                        }
                      ],
                      "agrService": {
                        "orgid": "string",
                        "pattern": "string",
                        "url": "string"
                      },
                      "state": "string",
                      "lastUpdated": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/agreement"
        ],
        "summary": "Deletes all agreements of a node",
        "description": "Deletes all of the current agreements of a node. Can be run by the owning user or the node.",
        "operationId": "deleteAgreementsNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/managementStatus/{mgmtpolicy}": {
      "get": {
        "tags": [
          "node/management policy"
        ],
        "summary": "Returns status for nodeid",
        "description": "Returns the management status of the node (edge device) with the specified id. Can be run by that node, a user, or an agbot.",
        "operationId": "getStatusMangementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified, and it must be 1 of the direct attributes of the node resource (not of the services). If not specified, the entire node resource (including services) will be returned",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "ID of the node management policy.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNMPStatusResponse"
                },
                "example": {
                  "managementStatus": {
                    "mgmtpolicy": {
                      "agentUpgradePolicyStatus": {
                        "scheduledTime": "<RFC3339 timestamp>",
                        "startTime": "<RFC3339 timestamp>",
                        "endTime": "<RFC3339 timestamp>",
                        "upgradedVersions": {
                          "softwareVersion": "1.1.1",
                          "certVersion": "2.2.2",
                          "configVersion": "3.3.3"
                        },
                        "status": "success|failed|in progress",
                        "errorMessage": "Upgrade process failed",
                        "lastUpdated": ""
                      }
                    }
                  },
                  "lastIndex": "0"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "node/management policy"
        ],
        "summary": "Adds/updates the status of the Management Policy running on the Node.",
        "description": "Adds or updates the run time status of a Management Policy running on a Node. This is called by the Agreement Bot.",
        "operationId": "putStatusManagementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "Node identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Management Policy identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodeMgmtPolStatusRequest"
              },
              "example": {
                "agentUpgradePolicyStatus": {
                  "scheduledTime": "<RFC3339 timestamp>",
                  "startTime": "<RFC3339 timestamp>",
                  "endTime": "<RFC3339 timestamp>",
                  "upgradedVersions": {
                    "softwareVersion": "1.1.1",
                    "certVersion": "2.2.2",
                    "configVersion": "3.3.3"
                  },
                  "status": "success|failed|in progress",
                  "errorMessage": "Upgrade process failed"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/management policy"
        ],
        "summary": "Deletes the status of the Management Policy running on the Node",
        "description": "Deletes the run time status of a Management Policy running on a Node. This is called by the Agreement Bot.",
        "operationId": "deleteStatusMangementPolicy",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "Node identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mgmtpolicy",
            "in": "path",
            "description": "Management Policy identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/managementStatus": {
      "get": {
        "tags": [
          "node/management policy"
        ],
        "summary": "Returns status for nodeid",
        "description": "Returns the management status of the node (edge device) with the specified id. Can be run by that node, a user, or an agbot.",
        "operationId": "getStatusManagementPolicies",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified, and it must be 1 of the direct attributes of the node resource (not of the services). If not specified, the entire node resource (including services) will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNMPStatusResponse"
                },
                "example": {
                  "managementStatus": {
                    "mgmtpolicy1": {
                      "agentUpgradePolicyStatus": {
                        "scheduledTime": "<RFC3339 timestamp>",
                        "startTime": "<RFC3339 timestamp>",
                        "endTime": "<RFC3339 timestamp>",
                        "upgradedVersions": {
                          "softwareVersion": "1.1.1",
                          "certVersion": "2.2.2",
                          "configVersion": "3.3.3"
                        },
                        "status": "success|failed|in progress",
                        "errorMessage": "Upgrade process failed",
                        "lastUpdated": ""
                      }
                    },
                    "mgmtpolicy2": {
                      "agentUpgradePolicyStatus": {
                        "scheduledTime": "<RFC3339 timestamp>",
                        "startTime": "<RFC3339 timestamp>",
                        "endTime": "<RFC3339 timestamp>",
                        "upgradedVersions": {
                          "softwareVersion": "1.1.1",
                          "certVersion": "2.2.2",
                          "configVersion": "3.3.3"
                        },
                        "status": "success|failed|in progress",
                        "errorMessage": "Upgrade process failed",
                        "lastUpdated": ""
                      }
                    }
                  },
                  "lastIndex": "0"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/msgs/{msgid}": {
      "get": {
        "tags": [
          "node/message"
        ],
        "summary": "Returns A specific message that has been sent to this node.",
        "description": "Returns A specific message that has been sent to this node. Deleted/post-TTL (Time To Live) messages will not be returned. Can be run by a user or the node.",
        "operationId": "getMessageNode",
        "parameters": [
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "msgid",
            "in": "path",
            "description": "Specific node message.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeMsgsResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "node/message"
        ],
        "summary": "Deletes a msg of an node",
        "description": "Deletes a message that was sent to an node. This should be done by the node after each msg is read. Can be run by the owning user or the node.",
        "operationId": "deleteMessageNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "msgid",
            "in": "path",
            "description": "ID of the msg to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/nodes/{node}/msgs": {
      "get": {
        "tags": [
          "node/message"
        ],
        "summary": "Returns all msgs sent to this node",
        "description": "Returns all msgs that have been sent to this node. They will be returned in the order they were sent. All msgs that have been sent to this node will be returned, unless the node has deleted some, or some are past their TTL. Can be run by a user or the node.",
        "operationId": "getMessagesNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxmsgs",
            "in": "query",
            "description": "Maximum number of messages returned. If this is less than the number of messages available, the oldest messages are returned. Defaults to unlimited.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeMsgsResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "node/message"
        ],
        "summary": "Sends a msg from an agbot to a node",
        "description": "Sends a msg from an agbot to a node. The agbot must 1st sign the msg (with its private key) and then encrypt the msg (with the node's public key). Can be run by any agbot.",
        "operationId": "postMessagesNode",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "ID of the node to send a message to.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostNodesMsgsRequest"
              },
              "example": {
                "message": "VW1RxzeEwTF0U7S96dIzSBQ/hRjyidqNvBzmMoZUW3hpd3hZDvs",
                "ttl": 86400
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{org}/hagroups/{hagroup}": {
      "get": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Lists all members of the specified Node Group (HA Group)",
        "description": "Returns the Node Group along with the member nodes that the caller has permission to view.",
        "operationId": "getNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node Group identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeGroupsResponse"
                },
                "example": {
                  "nodeGroups": [
                    {
                      "name": "nodegroup",
                      "members": [
                        "node1",
                        "node2",
                        "node3"
                      ],
                      "lastUpdated": "2020-02-05T20:28:14.469Z[UTC]"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Update the nodes that belong to an existing Node Group (HA Group)",
        "description": "Replaces the list of nodes that belong to the specified node group with the list of nodes provided in the request body.",
        "operationId": "putNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node Group identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodeGroupsRequest"
              },
              "example": {
                "members": [
                  "node2",
                  "node4",
                  "node5"
                ],
                "description": "New Description"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "node already belongs to other group"
          }
        }
      },
      "post": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Insert the nodes that belong to an existing Node Group (HA Group)",
        "description": "Creates the list of nodes that belong to the specified node group with the list of nodes provided in the request body.",
        "operationId": "postNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node Group identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutNodeGroupsRequest"
              },
              "example": {
                "members": [
                  "node2",
                  "node4",
                  "node5"
                ],
                "description": "New Description"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied: node isn't owned by caller"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "node already belongs to other group"
          }
        }
      },
      "delete": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Deletes a Node Group",
        "description": "Deletes a Highly Available Node Group by name",
        "operationId": "deleteNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{org}/hagroups": {
      "get": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Lists all members of all Node Groups (HA Groups)",
        "description": "Returns all Node Groups in this org along with the member nodes that the caller has permission to view.",
        "operationId": "getNodeGroups",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetNodeGroupsResponse"
                },
                "example": {
                  "nodeGroups": [
                    {
                      "name": "nodegroup1",
                      "members": [
                        "node1",
                        "node2",
                        "node3"
                      ],
                      "lastUpdated": "2020-02-05T20:28:14.469Z[UTC]"
                    },
                    {
                      "name": "nodegroup2",
                      "members": [
                        "nodeA",
                        "nodeB",
                        "nodeC"
                      ],
                      "lastUpdated": "2020-02-05T20:28:14.469Z[UTC]"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{org}/hagroups/{hagroup}/nodes/{node}": {
      "post": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Insert a Node into a High Availablity Node Group",
        "description": "Appends to the list of nodes that belong to the specified node group.",
        "operationId": "postNodeToNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node Group identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "Node Group identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied: node isn't owned by caller"
          },
          "404": {
            "description": "not found"
          },
          "409": {
            "description": "node already belongs to other group"
          }
        }
      },
      "delete": {
        "tags": [
          "high availability node group"
        ],
        "summary": "Deletes a Node from a Node Group",
        "description": "Deletes a Node from a Highly Available Node Group",
        "operationId": "deleteNodeFromNodeGroup",
        "parameters": [
          {
            "name": "org",
            "in": "path",
            "description": "Organization identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hagroup",
            "in": "path",
            "description": "Node Group identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "node",
            "in": "path",
            "description": "Node identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/changes": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Returns recent changes in this org",
        "description": "Returns all the recent resource changes within an org that the caller has permissions to view.",
        "operationId": "postChanges",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceChangesRequest"
              },
              "example": {
                "changeId": 1234,
                "lastUpdated": "2019-05-14T16:34:36.295Z[UTC]",
                "maxRecords": 100,
                "orgList": [
                  "",
                  "",
                  ""
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "changes returned - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceChangesRespObject"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/changes/maxchangeid": {
      "get": {
        "tags": [
          "organization"
        ],
        "summary": "Returns the max changeid of the resource changes",
        "description": "Returns the max changeid of the resource changes. Can be run by the root user, organization admins, or any node or agbot.",
        "operationId": "getMaxChangeId",
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaxChangeIdResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    },
    "/v1/myorgs/v1/myorgs": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Returns the orgs a user can view",
        "description": "Returns all the org definitions in the exchange that match the accounts the caller has access too. Can be run by any user. Request body is the response from /idmgmt/identity/api/v1/users/<user_ID>/accounts API.",
        "operationId": "postMyOrganizations",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/List"
              },
              "example": [
                {
                  "id": "orgid",
                  "name": "MyOrg",
                  "description": "String Description for Account",
                  "createdOn": "2020-09-15T00:20:43.853Z"
                },
                {
                  "id": "orgid2",
                  "name": "otherOrg",
                  "description": "String Description for Account",
                  "createdOn": "2020-09-15T00:20:43.853Z"
                }
              ]
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrgsResponse"
                },
                "example": {
                  "orgs": {
                    "string": {
                      "orgType": "",
                      "label": "",
                      "description": "",
                      "lastUpdated": "",
                      "tags": null,
                      "limits": {
                        "maxNodes": 0
                      },
                      "heartbeatIntervals": {
                        "minInterval": 0,
                        "maxInterval": 0,
                        "intervalAdjustment": 0
                      }
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}": {
      "get": {
        "tags": [
          "organization"
        ],
        "summary": "Returns an org",
        "description": "Returns the org with the specified id. Can be run by any user in this org or a hub admin.",
        "operationId": "getOrganization",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified. If not specified, the entire org resource will be returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrgsResponse"
                },
                "example": {
                  "orgs": {
                    "string": {
                      "orgType": "",
                      "label": "Test Org",
                      "description": "No",
                      "lastUpdated": "2020-08-25T14:04:21.707Z[UTC]",
                      "tags": {
                        "cloud_id": ""
                      },
                      "limits": {
                        "maxNodes": 0
                      },
                      "heartbeatIntervals": {
                        "minInterval": 0,
                        "maxInterval": 0,
                        "intervalAdjustment": 0
                      }
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "organization"
        ],
        "summary": "Updates an org",
        "description": "Does a full replace of an existing org. This can only be called by root, a hub admin, or a user in the org with the admin role.",
        "operationId": "putOrganization",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Does a full replace of an existing org.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutOrgRequest"
              },
              "example": {
                "orgType": "my org type",
                "label": "My org",
                "description": "blah blah",
                "tags": {
                  "cloud_id": "<account-id-here>"
                },
                "limits": {
                  "maxNodes": 50
                },
                "heartbeatIntervals": {
                  "minInterval": 10,
                  "maxInterval": 120,
                  "intervalAdjustment": 10
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Adds an org",
        "description": "Creates an org resource. This can only be called by the root user or a hub admin.",
        "operationId": "postOrganization",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutOrgRequest"
              },
              "example": {
                "orgType": "my org type",
                "label": "My org",
                "description": "blah blah",
                "tags": {
                  "ibmcloud_id": "abc123def456",
                  "cloud_id": "<account-id-here>"
                },
                "limits": {
                  "maxNodes": 50
                },
                "heartbeatIntervals": {
                  "minInterval": 10,
                  "maxInterval": 120,
                  "intervalAdjustment": 10
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "409": {
            "description": "conflict (org already exists)"
          }
        }
      },
      "delete": {
        "tags": [
          "organization"
        ],
        "summary": "Deletes an org",
        "description": "Deletes an org. This can only be called by root or a hub admin.",
        "operationId": "deleteOrganization",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "organization"
        ],
        "summary": "Updates 1 attribute of an org",
        "description": "Updates one attribute of a org. This can only be called by root, a hub admin, or a user in the org with the admin role.",
        "operationId": "patchOrganization",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the attributes:",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutOrgRequest"
              },
              "example": {
                "orgType": "my org type",
                "label": "My org",
                "description": "blah blah",
                "tags": {
                  "cloud_id": "<account-id-here>"
                },
                "limits": {
                  "maxNodes": 0
                },
                "heartbeatIntervals": {
                  "minInterval": 10,
                  "maxInterval": 120,
                  "intervalAdjustment": 10
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs": {
      "get": {
        "tags": [
          "organization"
        ],
        "summary": "Returns all organizations",
        "description": "Returns some or all organization definitions. Can be run by any resource archetype (Agreement Bot, Node, User). Will at minimum always return the organization of the caller.",
        "operationId": "getOrganizations",
        "parameters": [
          {
            "name": "description",
            "in": "query",
            "description": "Filter results to only include organizations with this description (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organization",
            "in": "query",
            "description": "Filter results to only include organizations are this, or are like this (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orgtype",
            "in": "query",
            "description": "Filter results to only include organizations with this org type. Currently the only supported org type for this route is 'IBM'.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "IBM"
                  ]
                }
              }
            }
          },
          {
            "name": "label",
            "in": "query",
            "description": "Filter results to only include organizations with this label (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrgsResponse"
                },
                "example": {
                  "orgs": {
                    "string": {
                      "orgType": "",
                      "label": "",
                      "description": "",
                      "lastUpdated": "",
                      "tags": null,
                      "limits": {
                        "maxNodes": 0
                      },
                      "heartbeatIntervals": {
                        "minInterval": 0,
                        "maxInterval": 0,
                        "intervalAdjustment": 0
                      }
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/search/nodes/error": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Returns nodes in an error state",
        "description": "Returns a list of the id's of nodes in an error state. Can be run by a user or agbot (but not a node). No request body is currently required.",
        "operationId": "postNodeErrorSearch",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostNodeErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/search/nodes/error/all": {
      "get": {
        "tags": [
          "organization"
        ],
        "summary": "Returns all node errors",
        "description": "Returns a list of all the node errors for an organization (that the caller has access to see) in an error state. Can be run by a user or agbot.",
        "operationId": "getNodeErrorsSearch",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllNodeErrorsInOrgResp"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/search/nodehealth": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Returns agreement health of nodes with no pattern",
        "description": "Returns the lastHeartbeat and agreement times for all nodes in this org that do not have a pattern and have had a heartbeat since the specified lastTime. Can be run by an organization admin or agbot (but not a node).",
        "operationId": "postNodeHealthSearch",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostNodeHealthRequest"
              },
              "example": {
                "lastTime": "2017-09-28T13:51:36.629Z[UTC]"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostNodeHealthResponse"
                },
                "example": {
                  "nodes": {
                    "string": {
                      "lastHeartbeat": "string",
                      "agreements": {
                        "string": {
                          "lastUpdated": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/search/nodes/service": {
      "post": {
        "tags": [
          "organization"
        ],
        "summary": "Returns the nodes a service is running on",
        "description": "Returns a list of all the nodes a service is running on. Can be run by a user or agbot (but not a node).",
        "operationId": "postNodeServiceSearch",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostServiceSearchRequest"
              },
              "example": {
                "orgid": "string",
                "serviceURL": "string",
                "serviceVersion": "string",
                "serviceArch": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostServiceSearchResponse"
                },
                "example": {
                  "nodes": [
                    {
                      "string": "string"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}/policy": {
      "get": {
        "tags": [
          "service/policy"
        ],
        "summary": "Returns the service policy",
        "description": "Returns the service policy. Can be run by a user, node or agbot.",
        "operationId": "getPolicyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicePolicy"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "service/policy"
        ],
        "summary": "Adds/updates the service policy",
        "description": "Adds or updates the policy of a service. This can be called by the owning user.",
        "operationId": "putPolicyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutServicePolicyRequest"
              },
              "example": {
                "label": "human readable name of the service policy",
                "description": "descriptive text",
                "properties": [
                  {
                    "name": "mypurpose",
                    "value": "myservice-testing",
                    "type": "string"
                  }
                ],
                "constraints": [
                  "a == b"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service/policy"
        ],
        "summary": "Deletes the policy of a service",
        "description": "Deletes the policy of a service. Can be run by the owning user.",
        "operationId": "deletePolicyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}": {
      "get": {
        "tags": [
          "service"
        ],
        "summary": "Returns a service",
        "description": "Returns the service with the specified id. Can be run by a user, node, or agbot.",
        "operationId": "getService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attribute",
            "in": "query",
            "description": "Which attribute value should be returned. Only 1 attribute can be specified. If not specified, the entire service resource will be returned",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetServicesResponse"
                },
                "example": {
                  "services": {
                    "orgid/servicename": {
                      "owner": "string",
                      "label": "string",
                      "description": "blah blah",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "1.2.3",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.221Z[UTC]"
                    },
                    "orgid/servicename2": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "4.5.6",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [
                        {
                          "url": "string",
                          "org": "string",
                          "version": "[1.0.0,INFINITY)",
                          "versionRange": "[1.0.0,INFINITY)",
                          "arch": "string"
                        }
                      ],
                      "userInput": [
                        {
                          "name": "foo",
                          "label": "The Foo Value",
                          "type": "string",
                          "defaultValue": "bar"
                        }
                      ],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.680Z[UTC]"
                    },
                    "orgid/servicename3": {
                      "owner": "string",
                      "label": "string",
                      "description": "fake",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "string",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "",
                      "deploymentSignature": "",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-12-13T15:38:57.679Z[UTC]"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "service"
        ],
        "summary": "Updates a service",
        "description": "Does a full replace of an existing service. See the description of the body fields in the POST method. This can only be called by the user that originally created it.",
        "operationId": "putService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutServiceRequest"
              },
              "example": {
                "label": "Location for amd64",
                "description": "blah blah",
                "public": true,
                "documentation": "https://console.cloud.ibm.com/docs/services/edge-fabric/poc/sdr.html",
                "url": "github.com.open-horizon.examples.sdr2msghub",
                "version": "1.0.0",
                "arch": "amd64",
                "sharable": "singleton",
                "requiredServices": [
                  {
                    "org": "myorg",
                    "url": "mydomain.com.gps",
                    "version": "[1.0.0,INFINITY)",
                    "arch": "amd64"
                  }
                ],
                "userInput": [
                  {
                    "name": "foo",
                    "label": "The Foo Value",
                    "type": "string",
                    "defaultValue": "bar"
                  }
                ],
                "deployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "deploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "clusterDeployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "clusterDeploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "imageStore": {
                  "storeType": "dockerRegistry"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service"
        ],
        "summary": "Deletes a service",
        "description": "Deletes a service. Can only be run by the owning user.",
        "operationId": "deleteService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "service"
        ],
        "summary": "Updates 1 attribute of a service",
        "description": "Updates one attribute of a service. This can only be called by the user that originally created this service resource.",
        "operationId": "patchService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the attributes",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchServiceRequest"
              },
              "example": {
                "label": "Location for amd64",
                "description": "blah blah",
                "public": true,
                "documentation": "https://console.cloud.ibm.com/docs/services/edge-fabric/poc/sdr.html",
                "url": "github.com.open-horizon.examples.sdr2msghub",
                "version": "1.0.0",
                "arch": "amd64",
                "sharable": "singleton",
                "requiredServices": [
                  {
                    "org": "myorg",
                    "url": "mydomain.com.gps",
                    "version": "[1.0.0,INFINITY)",
                    "arch": "amd64"
                  }
                ],
                "userInput": [
                  {
                    "name": "foo",
                    "label": "The Foo Value",
                    "type": "string",
                    "defaultValue": "bar"
                  }
                ],
                "deployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "deploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "clusterDeployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "clusterDeploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "imageStore": {
                  "storeType": "dockerRegistry"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services": {
      "get": {
        "tags": [
          "service"
        ],
        "summary": "Returns all services",
        "description": "Returns all service definitions in this organization. Can be run by any user, node, or agbot.",
        "operationId": "getServices",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "Filter results to only include services with this owner (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "public",
            "in": "query",
            "description": "Filter results to only include services with this public setting",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "url",
            "in": "query",
            "description": "Filter results to only include services with this url (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "Filter results to only include services with this version (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "arch",
            "in": "query",
            "description": "Filter results to only include services with this arch (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nodetype",
            "in": "query",
            "description": "Filter results to only include services that are deployable on this nodeType. Valid values: devices or clusters",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requiredurl",
            "in": "query",
            "description": "Filter results to only include services that use this service with this url (can include % for wildcard - the URL encoding for % is %25)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetServicesResponse"
                },
                "example": {
                  "services": {
                    "orgid/servicename": {
                      "owner": "string",
                      "label": "string",
                      "description": "blah blah",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "1.2.3",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.221Z[UTC]"
                    },
                    "orgid/servicename2": {
                      "owner": "string",
                      "label": "string",
                      "description": "string",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "4.5.6",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [
                        {
                          "url": "string",
                          "org": "string",
                          "version": "[1.0.0,INFINITY)",
                          "versionRange": "[1.0.0,INFINITY)",
                          "arch": "string"
                        }
                      ],
                      "userInput": [
                        {
                          "name": "foo",
                          "label": "The Foo Value",
                          "type": "string",
                          "defaultValue": "bar"
                        }
                      ],
                      "deployment": "string",
                      "deploymentSignature": "string",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-05-14T16:20:40.680Z[UTC]"
                    },
                    "orgid/servicename3": {
                      "owner": "string",
                      "label": "string",
                      "description": "fake",
                      "public": true,
                      "documentation": "",
                      "url": "string",
                      "version": "string",
                      "arch": "string",
                      "sharable": "singleton",
                      "matchHardware": {},
                      "requiredServices": [],
                      "userInput": [],
                      "deployment": "",
                      "deploymentSignature": "",
                      "clusterDeployment": "",
                      "clusterDeploymentSignature": "",
                      "imageStore": {},
                      "lastUpdated": "2019-12-13T15:38:57.679Z[UTC]"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "service"
        ],
        "summary": "Adds a service",
        "description": "A service resource contains the metadata that Horizon needs to deploy the docker images that implement this service. A service can either be an edge application, or a lower level edge service that provides access to sensors or reusable features. The service can require 1 or more other services that Horizon should also deploy when deploying this service. If public is set to true, the service can be shared across organizations. This can only be called by a user.",
        "operationId": "postServices",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutServiceRequest"
              },
              "example": {
                "label": "Location for amd64",
                "description": "blah blah",
                "public": true,
                "documentation": "https://console.cloud.ibm.com/docs/services/edge-fabric/poc/sdr.html",
                "url": "github.com.open-horizon.examples.sdr2msghub",
                "version": "1.0.0",
                "arch": "amd64",
                "sharable": "singleton",
                "requiredServices": [
                  {
                    "org": "myorg",
                    "url": "mydomain.com.gps",
                    "version": "[1.0.0,INFINITY)",
                    "arch": "amd64"
                  }
                ],
                "userInput": [
                  {
                    "name": "foo",
                    "label": "The Foo Value",
                    "type": "string",
                    "defaultValue": "bar"
                  }
                ],
                "deployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "deploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "clusterDeployment": "{\"services\":{\"location\":{\"image\":\"summit.hovitos.engineering/x86/location:2.0.6\"}}}",
                "clusterDeploymentSignature": "EURzSkDyk66qE6esYUDkLWLzM=",
                "imageStore": {
                  "storeType": "dockerRegistry"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}/dockauths/{dockauthid}": {
      "get": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Returns a docker image token for this service",
        "description": "Returns the docker image authentication token with the specified dockauthid for this service. Can be run by any credentials able to view the service.",
        "operationId": "getDockerAuth",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dockauthid",
            "in": "path",
            "description": "ID of the dockauth.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceDockAuth"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Updates a docker image token for the service",
        "description": "Updates an existing docker image authentication token for this service. This can only be run by the service owning user.",
        "operationId": "putDockerAuth",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dockauthid",
            "in": "path",
            "description": "ID of the dockauth.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "See the POST route for details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutServiceDockAuthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Deletes a docker image auth token of a service",
        "description": "Deletes a docker image auth token for this service. This can only be run by the service owning user.",
        "operationId": "deleteDockerAuth",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dockauthid",
            "in": "path",
            "description": "ID of the dockauth.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}/dockauths": {
      "get": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Returns all docker image tokens for this service",
        "description": "Returns all the docker image authentication tokens for this service. Can be run by any credentials able to view the service.",
        "operationId": "getDockerAuths",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                },
                "example": [
                  {
                    "dockAuthId": 0,
                    "registry": "string",
                    "username": "string",
                    "token": "string",
                    "lastUpdated": "string"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Adds a docker image token for the service",
        "description": "Adds a new docker image authentication token for this service. As an optimization, if a dockauth resource already exists with the same service, registry, username, and token, this method will just update that lastupdated field. This can only be run by the service owning user.",
        "operationId": "postDockerAuths",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutServiceDockAuthRequest"
              },
              "example": {
                "registry": "myregistry.com",
                "username": "mydockeruser",
                "token": "mydockertoken"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service/docker authorization"
        ],
        "summary": "Deletes all docker image auth tokens of a service",
        "description": "Deletes all of the current docker image auth tokens for this service. This can only be run by the service owning user.",
        "operationId": "deleteDockerAuths",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}/keys/{keyid}": {
      "get": {
        "tags": [
          "service/key"
        ],
        "summary": "Returns a key/cert for this service",
        "description": "Returns the signing public key/cert with the specified keyid for this service. The raw content of the key/cert is returned, not json. Can be run by any credentials able to view the service.",
        "operationId": "getKeyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "Key Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "service/key"
        ],
        "summary": "Adds/updates a key/cert for the service",
        "description": "Adds a new signing public key/cert, or updates an existing key/cert, for this service. This can only be run by the service owning user.",
        "operationId": "putKeyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "ID of the service to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "ID of the key to be added/updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Note that the input body is just the bytes of the key/cert (not the typical json), so the 'Content-Type' header must be set to 'text/plain'.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutServiceKeyRequest"
              },
              "example": {
                "key": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service/key"
        ],
        "summary": "Deletes a key of a service",
        "description": "Deletes a key/cert for this service. This can only be run by the service owning user.",
        "operationId": "deleteKeyService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyid",
            "in": "path",
            "description": "ID of the key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/services/{service}/keys": {
      "get": {
        "tags": [
          "service/key"
        ],
        "summary": "Returns all keys/certs for this service",
        "description": "Returns all the signing public keys/certs for this service. Can be run by any credentials able to view the service.",
        "operationId": "getKeysService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                },
                "example": [
                  "mykey.pem"
                ]
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "service/key"
        ],
        "summary": "Deletes all keys of a service",
        "description": "Deletes all of the current keys/certs for this service. This can only be run by the service owning user.",
        "operationId": "deleteKeysService",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "service",
            "in": "path",
            "description": "Service name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/{username}/changepw": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Changes the user's password",
        "description": "Changes the user's password. Only the user itself, root, or a user with admin privilege can update an existing user's password.",
        "operationId": "postChangePassword",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePwRequest"
              },
              "example": {
                "newPassword": "abc"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "password updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/{username}/confirm": {
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Confirms if this username/password is valid",
        "description": "Confirms whether or not this username exists and has the specified password. This can only be called by root or a user in the org with the admin role.",
        "operationId": "postConfirm_1",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "post ok"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/{username}": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Returns a user",
        "description": "Returns the specified username. Can only be run by that user or root.",
        "operationId": "getUser",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsersResponse"
                },
                "example": {
                  "users": {
                    "orgid/username": {
                      "admin": false,
                      "apikeys": [
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        },
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        }
                      ],
                      "email": "string",
                      "hubAdmin": false,
                      "lastUpdated": "string",
                      "password": "string",
                      "updatedBy": "string"
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "put": {
        "tags": [
          "user"
        ],
        "summary": "Updates a user",
        "description": "Updates an existing user. Only the user itself, root, or a user with admin privilege can update an existing user.",
        "operationId": "putUser",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "See details in the POST route.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutUsersRequest"
              },
              "example": {
                "password": "abc",
                "admin": false,
                "hubAdmin": false,
                "email": "me@gmail.com"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "post": {
        "tags": [
          "user"
        ],
        "summary": "Adds a user",
        "description": "Creates a new user. This can be run root/root, or a user with admin privilege. This endpoint is not allowed in OAuth mode.",
        "operationId": "postUser",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostPutUsersRequest"
              },
              "example": {
                "password": "abc",
                "admin": false,
                "hubAdmin": false,
                "email": "me@gmail.com"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource created - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "user"
        ],
        "summary": "Deletes a user",
        "description": "Deletes a user and all of its nodes and agbots. This can only be called by root or a user in the org with the admin role.",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "patch": {
        "tags": [
          "user"
        ],
        "summary": "Updates 1 attribute of a user",
        "description": "Updates 1 attribute of an existing user. Only the user itself, root, or a user with admin privilege can update an existing user.",
        "operationId": "patchUser",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username of the user.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Specify only **one** of the attributes:",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchUsersRequest"
              },
              "example": {
                "password": "abc",
                "admin": false,
                "hubAdmin": false,
                "email": "me@gmail.com"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "resource updated - response body:",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/apikey": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Returns current user info",
        "description": "Returns the authenticated user's own information using apikey authentication.",
        "operationId": "getUserSelf",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsersResponse"
                },
                "example": {
                  "users": {
                    "orgid/username": {
                      "password": "string",
                      "admin": false,
                      "email": "string",
                      "lastUpdated": "string",
                      "updatedBy": "string",
                      "apikeys": [
                        {
                          "id": "string",
                          "description": "string",
                          "lastUpdated": "string"
                        }
                      ]
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Returns all users",
        "description": "Returns all users. Can only be run by the root user, org admins, and hub admins.",
        "operationId": "getUsers",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "response body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsersResponse"
                },
                "example": {
                  "users": {
                    "org1/user1": {
                      "admin": false,
                      "apikeys": [
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        },
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        }
                      ],
                      "email": "user1@email1.com",
                      "hubAdmin": false,
                      "lastUpdated": "2025-05-13T02:34:09.357160Z[UTC]",
                      "password": "***************",
                      "updatedBy": "org1/user1"
                    },
                    "org2/user2": {
                      "admin": true,
                      "apikeys": [
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        },
                        {
                          "description": "string",
                          "id": "string",
                          "label": "string",
                          "lastUpdated": "string"
                        }
                      ],
                      "email": "",
                      "hubAdmin": false,
                      "lastUpdated": "",
                      "password": "***************",
                      "updatedBy": ""
                    }
                  },
                  "lastIndex": 0
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/{username}/apikeys/{apikey}": {
      "get": {
        "tags": [
          "user/apikey"
        ],
        "summary": "Get an API key by ID",
        "description": "Returns API key with the given ID. Must be called by the user on their own behalf (if they are the owner) or by an organization admin.",
        "operationId": "getUserApiKeyById",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "apikey",
            "in": "path",
            "description": "API key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyMetadata"
                },
                "examples": {
                  "200 - API key resource": {
                    "description": "The response body for an API key resource",
                    "value": {
                      "description": "Test API key for user",
                      "id": "50dea228-8bca-4640-4480-4d1ec44ec89f",
                      "label": "api-key-test-0",
                      "lastUpdated": "2025-07-25T13:38:15.295452297Z[UTC]",
                      "owner": "myorg/user0"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          }
        }
      },
      "delete": {
        "tags": [
          "user/apikey"
        ],
        "summary": "Delete an API key for a user",
        "description": "Deletes API key with the given ID. Must be called by the user themselves (if they are the owner) or an organization admin.",
        "operationId": "deleteUserApiKey",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "apikey",
            "in": "path",
            "description": "API key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "deleted"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "internal server error"
          }
        }
      }
    },
    "/v1/orgs/{organization}/users/{username}/apikeys": {
      "post": {
        "tags": [
          "user/apikey"
        ],
        "summary": "Create a new API key for a user",
        "description": "Creates a new API key for the specified user. Can be called by the user or org admin.",
        "operationId": "postUserApiKey",
        "parameters": [
          {
            "name": "organization",
            "in": "path",
            "description": "Organization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "path",
            "description": "Username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostApiKeyRequest"
              },
              "examples": {
                "With description and label": {
                  "summary": "With description and label",
                  "description": "Create API key with an optional description and label",
                  "value": {
                    "description": "Test API key for user",
                    "label": "api-key-test-0"
                  }
                },
                "With description": {
                  "summary": "With description",
                  "description": "Create API key with an optional description",
                  "value": {
                    "description": "Test API key for user",
                    "label": null
                  }
                },
                "With label": {
                  "summary": "With label",
                  "description": "Create API key with an optional label",
                  "value": {
                    "description": null,
                    "label": "api-key-test-0"
                  }
                },
                "Without description and label": {
                  "summary": "Without description and label",
                  "description": "Create API key with no optional request body parameters",
                  "value": {
                    "description": null,
                    "label": null
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostApiKeyResponse"
                },
                "example": {
                  "description": "Test API key for user",
                  "id": "50dea228-8bca-4640-4480-4d1ec44ec89f",
                  "label": "api-key-test-0",
                  "lastUpdated": "2025-07-25T13:38:15.295452297Z[UTC]",
                  "owner": "myorg/user0",
                  "value": "01c00b41d92425484731319e688358019daf3796af5a3a9b85e42bc19fb578d6"
                }
              }
            }
          },
          "400": {
            "description": "bad input"
          },
          "401": {
            "description": "invalid credentials"
          },
          "403": {
            "description": "access denied"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "NAService": {
        "required": [
          "orgid",
          "url"
        ],
        "type": "object",
        "properties": {
          "orgid": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "PostPutServiceDockAuthRequest": {
        "required": [
          "registry",
          "token"
        ],
        "type": "object",
        "properties": {
          "registry": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "PostPatternSearchResponse": {
        "required": [
          "lastIndex",
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatternNodeResponse"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Agbot": {
        "required": [
          "id",
          "lastHeartbeat",
          "msgEndPoint",
          "name",
          "orgid",
          "owner",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "lastHeartbeat": {
            "type": "string"
          },
          "msgEndPoint": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "orgid": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "default": "***************"
          }
        }
      },
      "Node": {
        "required": [
          "arch",
          "heartbeatIntervals",
          "lastHeartbeat",
          "lastUpdated",
          "msgEndPoint",
          "name",
          "nodeType",
          "owner",
          "pattern",
          "publicKey",
          "registeredServices",
          "softwareVersions",
          "token",
          "userInput"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "nodeType": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "registeredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegService"
            }
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          },
          "msgEndPoint": {
            "type": "string"
          },
          "softwareVersions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "lastHeartbeat": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          },
          "ha_group": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "clusterNamespace": {
            "type": "string",
            "default": ""
          },
          "isNamespaceScoped": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "NodeMangementPolicyStatus": {
        "required": [
          "scheduledTime"
        ],
        "type": "object",
        "properties": {
          "scheduledTime": {
            "type": "string"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "upgradedVersions": {
            "$ref": "#/components/schemas/UpgradedVersions"
          },
          "status": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          }
        }
      },
      "MaxChangeIdResponse": {
        "required": [
          "maxChangeId"
        ],
        "type": "object",
        "properties": {
          "maxChangeId": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PatchUsersRequest": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          },
          "hubAdmin": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "PostPutBusinessPolicyRequest": {
        "required": [
          "jsonFormats",
          "label",
          "service"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "secretBinding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneSecretBindingService"
            }
          },
          "service": {
            "$ref": "#/components/schemas/BService"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          }
        }
      },
      "ResourceChangesInnerObject": {
        "required": [
          "changeId",
          "lastUpdated"
        ],
        "type": "object",
        "properties": {
          "changeId": {
            "type": "integer",
            "format": "int64"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "PostNodeHealthResponse": {
        "required": [
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NodeHealthHashElement"
            }
          }
        }
      },
      "AgbotBusinessPol": {
        "required": [
          "businessPol",
          "businessPolOrgid",
          "lastUpdated",
          "nodeOrgid"
        ],
        "type": "object",
        "properties": {
          "businessPolOrgid": {
            "type": "string"
          },
          "businessPol": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "nodeOrgid": {
            "type": "string"
          }
        }
      },
      "PostPutManagementPolicyRequest": {
        "required": [
          "enabled",
          "jsonFormats",
          "label"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agentUpgradePolicy": {
            "$ref": "#/components/schemas/AgentUpgradePolicy"
          },
          "startWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "start": {
            "type": "string",
            "default": "now"
          },
          "enabled": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "PostServiceSearchRequest": {
        "required": [
          "orgid",
          "serviceArch",
          "serviceURL",
          "serviceVersion"
        ],
        "type": "object",
        "properties": {
          "serviceVersion": {
            "type": "string"
          },
          "serviceURL": {
            "type": "string"
          },
          "serviceArch": {
            "type": "string"
          },
          "orgid": {
            "type": "string"
          }
        }
      },
      "PutAgbotAgreementRequest": {
        "required": [
          "service",
          "state"
        ],
        "type": "object",
        "properties": {
          "service": {
            "$ref": "#/components/schemas/AAService"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "PostNodesMsgsRequest": {
        "required": [
          "message",
          "ttl"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "ttl": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AdminDropdbTokenResponse": {
        "required": [
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "GetNMPStatusResponse": {
        "required": [
          "lastIndex",
          "managementStatus"
        ],
        "type": "object",
        "properties": {
          "managementStatus": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NMPStatus"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "PutNodePolicyRequest": {
        "required": [
          "jsonFormats"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "deployment": {
            "$ref": "#/components/schemas/PropertiesAndConstraints"
          },
          "management": {
            "$ref": "#/components/schemas/PropertiesAndConstraints"
          },
          "nodePolicyVersion": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "PatternNodeResponse": {
        "required": [
          "id",
          "nodeType",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nodeType": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          }
        }
      },
      "AdminOrgStatus": {
        "type": "object",
        "properties": {
          "msg": {
            "type": "string",
            "default": ""
          },
          "nodes": {
            "type": "object"
          }
        }
      },
      "PServiceVersions": {
        "required": [
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "deployment_overrides": {
            "type": "string"
          },
          "deployment_overrides_signature": {
            "type": "string"
          },
          "priority": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "upgradePolicy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "PostNodeConfigStateRequest": {
        "required": [
          "configState",
          "jsonFormats",
          "org",
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "configState": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "org": {
            "type": "string"
          }
        }
      },
      "GetAgbotAgreementsResponse": {
        "required": [
          "agreements"
        ],
        "type": "object",
        "properties": {
          "agreements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AgbotAgreement"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "PolicyStatus": {
        "required": [
          "endTime",
          "errorMessage",
          "lastUpdated",
          "scheduledTime",
          "startTime",
          "status",
          "upgradedVersions"
        ],
        "type": "object",
        "properties": {
          "scheduledTime": {
            "type": "string"
          },
          "startTime": {
            "type": "string"
          },
          "endTime": {
            "type": "string"
          },
          "upgradedVersions": {
            "$ref": "#/components/schemas/UpgradedVersions"
          },
          "status": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "ServicePolicy": {
        "required": [
          "constraints",
          "description",
          "label",
          "lastUpdated",
          "properties"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "GetAgbotsResponse": {
        "required": [
          "agbots"
        ],
        "type": "object",
        "properties": {
          "agbots": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Agbot"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "PostPutUsersRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "default": ""
          },
          "admin": {
            "type": "boolean",
            "default": false
          },
          "hubAdmin": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "ResourceChangesRequest": {
        "required": [
          "changeId",
          "maxRecords"
        ],
        "type": "object",
        "properties": {
          "changeId": {
            "type": "integer",
            "format": "int64"
          },
          "lastUpdated": {
            "type": "string"
          },
          "maxRecords": {
            "type": "integer",
            "format": "int32"
          },
          "orgList": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RegService": {
        "required": [
          "numAgreements",
          "policy",
          "properties",
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "numAgreements": {
            "type": "integer",
            "format": "int32"
          },
          "configState": {
            "type": "string"
          },
          "policy": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Prop"
            }
          },
          "version": {
            "type": "string"
          }
        }
      },
      "UpgradedVersions": {
        "required": [
          "certVersion",
          "configVersion",
          "softwareVersion"
        ],
        "type": "object",
        "properties": {
          "softwareVersion": {
            "type": "string"
          },
          "certVersion": {
            "type": "string"
          },
          "configVersion": {
            "type": "string"
          }
        }
      },
      "OrgLimits": {
        "required": [
          "maxNodes"
        ],
        "type": "object",
        "properties": {
          "maxNodes": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "GetNodeGroupsResponse": {
        "required": [
          "nodeGroups"
        ],
        "type": "object",
        "properties": {
          "nodeGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeGroupResp"
            }
          }
        }
      },
      "Tuple2StringOptionString": {
        "required": [
          "_1",
          "_2"
        ],
        "type": "object",
        "properties": {
          "_1": {
            "type": "string"
          },
          "_2": {
            "type": "string"
          }
        }
      },
      "AgbotMsg": {
        "required": [
          "message",
          "msgId",
          "nodeId",
          "nodePubKey",
          "timeExpires",
          "timeSent"
        ],
        "type": "object",
        "properties": {
          "msgId": {
            "type": "integer",
            "format": "int32"
          },
          "nodeId": {
            "type": "string"
          },
          "nodePubKey": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "timeSent": {
            "type": "string"
          },
          "timeExpires": {
            "type": "string"
          }
        }
      },
      "GetNodeMsgsResponse": {
        "required": [
          "messages"
        ],
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeMsg"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "AgbotAgreement": {
        "required": [
          "dataLastReceived",
          "lastUpdated",
          "service",
          "state"
        ],
        "type": "object",
        "properties": {
          "service": {
            "$ref": "#/components/schemas/AAService"
          },
          "state": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "dataLastReceived": {
            "type": "string"
          }
        }
      },
      "PostNodeErrorResponse": {
        "required": [
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "NodePolicy": {
        "required": [
          "constraints",
          "deployment",
          "description",
          "label",
          "lastUpdated",
          "management",
          "nodePolicyVersion",
          "properties"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "deployment": {
            "$ref": "#/components/schemas/PropertiesAndConstraints"
          },
          "management": {
            "$ref": "#/components/schemas/PropertiesAndConstraints"
          },
          "nodePolicyVersion": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "PostServiceSearchResponse": {
        "required": [
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tuple2StringOptionString"
            }
          }
        }
      },
      "Pattern": {
        "required": [
          "agreementProtocols",
          "description",
          "label",
          "lastUpdated",
          "owner",
          "public",
          "secretBinding",
          "services",
          "userInput"
        ],
        "type": "object",
        "properties": {
          "owner": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "public": {
            "type": "boolean"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PServices"
            }
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          },
          "secretBinding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneSecretBindingService"
            }
          },
          "agreementProtocols": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "lastUpdated": {
            "type": "string"
          },
          "clusterNamespace": {
            "type": "string",
            "default": ""
          }
        }
      },
      "AdminStatus": {
        "type": "object",
        "properties": {
          "dbSchemaVersion": {
            "type": "integer",
            "format": "int32",
            "default": -1
          },
          "msg": {
            "type": "string",
            "default": ""
          },
          "numberOfAgbotAgreements": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "numberOfAgbotMsgs": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "numberOfAgbots": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "numberOfNodeAgreements": {
            "type": "integer",
            "format": "int32",
            "default": -1
          },
          "numberOfNodeMsgs": {
            "type": "integer",
            "format": "int32",
            "default": -1
          },
          "numberOfNodes": {
            "type": "integer",
            "format": "int32",
            "default": -1
          },
          "numberOfOrganizations": {
            "type": "integer",
            "format": "int32",
            "default": 0
          },
          "numberOfRegisteredNodes": {
            "type": "integer",
            "format": "int32"
          },
          "numberOfUnregisteredNodes": {
            "type": "integer",
            "format": "int32"
          },
          "numberOfUsers": {
            "type": "integer",
            "format": "int32",
            "default": -1
          },
          "SchemaVersion": {
            "type": "integer",
            "format": "int32",
            "default": -1
          }
        }
      },
      "NAgrService": {
        "required": [
          "orgid",
          "pattern",
          "url"
        ],
        "type": "object",
        "properties": {
          "orgid": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "GetNodesResponse": {
        "required": [
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Node"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "GetServicesResponse": {
        "type": "object",
        "properties": {
          "services": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Service"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "PostPutPatternRequest": {
        "required": [
          "jsonFormats",
          "label",
          "services"
        ],
        "type": "object",
        "properties": {
          "clusterNamespace": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PServices"
            }
          },
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "secretBinding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneSecretBindingService"
            }
          },
          "public": {
            "type": "boolean"
          },
          "agreementProtocols": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          }
        }
      },
      "NMPStatus": {
        "required": [
          "agentUpgradePolicyStatus"
        ],
        "type": "object",
        "properties": {
          "agentUpgradePolicyStatus": {
            "$ref": "#/components/schemas/PolicyStatus"
          }
        }
      },
      "PatchServiceRequest": {
        "required": [
          "jsonFormats"
        ],
        "type": "object",
        "properties": {
          "sharable": {
            "type": "string"
          },
          "deployment": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "documentation": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "requiredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRef"
            }
          },
          "public": {
            "type": "boolean"
          },
          "matchHardware": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "arch": {
            "type": "string"
          },
          "deploymentSignature": {
            "type": "string"
          },
          "clusterDeploymentSignature": {
            "type": "string"
          },
          "clusterDeployment": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "imageStore": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "version": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "userInput": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        }
      },
      "AAService": {
        "required": [
          "orgid",
          "pattern",
          "url"
        ],
        "type": "object",
        "properties": {
          "orgid": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "PostPatternSearchRequest": {
        "type": "object",
        "properties": {
          "arch": {
            "type": "string"
          },
          "nodeOrgids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "numEntries": {
            "type": "string"
          },
          "secondsStale": {
            "type": "integer",
            "format": "int32"
          },
          "serviceUrl": {
            "type": "string",
            "default": ""
          },
          "startIndex": {
            "type": "string"
          }
        }
      },
      "BusinessPolicyNodeResponse": {
        "required": [
          "id",
          "nodeType",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "nodeType": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          }
        }
      },
      "PutNodeGroupsRequest": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          }
        }
      },
      "ResourceChangesRespObject": {
        "required": [
          "changes",
          "exchangeVersion",
          "hitMaxRecords",
          "mostRecentChangeId"
        ],
        "type": "object",
        "properties": {
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeEntry"
            }
          },
          "mostRecentChangeId": {
            "type": "integer",
            "format": "int64"
          },
          "hitMaxRecords": {
            "type": "boolean"
          },
          "exchangeVersion": {
            "type": "string"
          }
        }
      },
      "PatchNodesRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nodeType": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "registeredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegService"
            }
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          },
          "msgEndPoint": {
            "type": "string"
          },
          "softwareVersions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "publicKey": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          },
          "clusterNamespace": {
            "type": "string"
          },
          "isNamespaceScoped": {
            "type": "boolean"
          }
        }
      },
      "ChangePwRequest": {
        "required": [
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "newPassword": {
            "type": "string"
          }
        }
      },
      "AgbotPattern": {
        "required": [
          "lastUpdated",
          "nodeOrgid",
          "pattern",
          "patternOrgid"
        ],
        "type": "object",
        "properties": {
          "lastUpdated": {
            "type": "string"
          },
          "nodeOrgid": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "patternOrgid": {
            "type": "string"
          }
        }
      },
      "PutNodeStatusRequest": {
        "required": [
          "jsonFormats",
          "runningServices",
          "services"
        ],
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneService"
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "runningServices": {
            "type": "string"
          },
          "connectivity": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        }
      },
      "NodeHealthAgreementElement": {
        "required": [
          "lastUpdated"
        ],
        "type": "object",
        "properties": {
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "ApiKeyMetadata": {
        "required": [
          "id",
          "lastUpdated"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "default": ""
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "default": ""
          },
          "lastUpdated": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          }
        }
      },
      "ApiResponse": {
        "required": [
          "code",
          "msg"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "msg": {
            "type": "string"
          }
        }
      },
      "GetBusinessPoliciesResponse": {
        "type": "object",
        "properties": {
          "businessPolicy": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/BusinessPolicy"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "ContainerStatus": {
        "required": [
          "created",
          "image",
          "name",
          "state"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "created": {
            "type": "integer",
            "format": "int32"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "PutNodeMgmtPolStatusRequest": {
        "required": [
          "agentUpgradePolicyStatus"
        ],
        "type": "object",
        "properties": {
          "agentUpgradePolicyStatus": {
            "$ref": "#/components/schemas/NodeMangementPolicyStatus"
          }
        }
      },
      "ServiceDockAuth": {
        "required": [
          "dockAuthId",
          "lastUpdated",
          "registry",
          "token",
          "username"
        ],
        "type": "object",
        "properties": {
          "dockAuthId": {
            "type": "integer",
            "format": "int32"
          },
          "registry": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "BService": {
        "required": [
          "arch",
          "name",
          "org",
          "serviceVersions"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "org": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "serviceVersions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BServiceVersions"
            }
          },
          "nodeHealth": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "clusterNamespace": {
            "type": "string"
          }
        }
      },
      "List": {
        "type": "array",
        "items": {
          "type": "object"
        }
      },
      "PutNodeAgreementRequest": {
        "required": [
          "jsonFormats",
          "state"
        ],
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NAService"
            }
          },
          "agreementService": {
            "$ref": "#/components/schemas/NAgrService"
          },
          "state": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "PostBusinessPolicySearchRequest": {
        "type": "object",
        "properties": {
          "changedSince": {
            "type": "integer",
            "format": "int64",
            "default": 0
          },
          "nodeOrgids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "numEntries": {
            "type": "integer",
            "format": "int32"
          },
          "session": {
            "type": "string"
          },
          "startIndex": {
            "type": "string"
          }
        }
      },
      "GetNodeAgreementsResponse": {
        "required": [
          "agreements"
        ],
        "type": "object",
        "properties": {
          "agreements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NodeAgreement"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "ManagementPolicy": {
        "required": [
          "lastUpdated",
          "owner"
        ],
        "type": "object",
        "properties": {
          "agentUpgradePolicy": {
            "$ref": "#/components/schemas/AgentUpgradePolicy"
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "created": {
            "type": "string",
            "default": ""
          },
          "description": {
            "type": "string",
            "default": ""
          },
          "enabled": {
            "type": "boolean",
            "default": false
          },
          "label": {
            "type": "string",
            "default": ""
          },
          "lastUpdated": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            },
            "default": []
          },
          "start": {
            "type": "string",
            "default": "now"
          },
          "startWindow": {
            "type": "integer",
            "format": "int64",
            "default": 0
          }
        }
      },
      "PostApiKeyRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "NodeGroupResp": {
        "required": [
          "admin",
          "lastUpdated",
          "members",
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "default": ""
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "admin": {
            "type": "boolean"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "Prop": {
        "required": [
          "name",
          "op",
          "propType",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "propType": {
            "type": "string"
          },
          "op": {
            "type": "string"
          }
        }
      },
      "OneUserInputService": {
        "required": [
          "inputs",
          "serviceOrgid",
          "serviceUrl"
        ],
        "type": "object",
        "properties": {
          "serviceOrgid": {
            "type": "string"
          },
          "serviceUrl": {
            "type": "string"
          },
          "serviceArch": {
            "type": "string"
          },
          "serviceVersionRange": {
            "type": "string"
          },
          "inputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputValue"
            }
          }
        }
      },
      "PropertiesAndConstraints": {
        "type": "object",
        "properties": {
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BusinessPolicy": {
        "required": [
          "constraints",
          "created",
          "description",
          "label",
          "lastUpdated",
          "owner",
          "properties",
          "secretBinding",
          "service",
          "userInput"
        ],
        "type": "object",
        "properties": {
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "secretBinding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneSecretBindingService"
            }
          },
          "service": {
            "$ref": "#/components/schemas/BService"
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          }
        }
      },
      "OneSecretBindingService": {
        "required": [
          "secrets",
          "serviceOrgid",
          "serviceUrl"
        ],
        "type": "object",
        "properties": {
          "serviceOrgid": {
            "type": "string"
          },
          "serviceUrl": {
            "type": "string"
          },
          "serviceArch": {
            "type": "string"
          },
          "serviceVersionRange": {
            "type": "string"
          },
          "secrets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "enableNodeLevelSecrets": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "GetPatternsResponse": {
        "type": "object",
        "properties": {
          "patterns": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Pattern"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "PostApiKeyResponse": {
        "required": [
          "id",
          "lastUpdated",
          "owner",
          "value"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "default": ""
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string",
            "default": ""
          },
          "lastUpdated": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "AgentUpgradePolicy": {
        "required": [
          "allowDowngrade",
          "manifest"
        ],
        "type": "object",
        "properties": {
          "allowDowngrade": {
            "type": "boolean"
          },
          "manifest": {
            "type": "string"
          }
        }
      },
      "PostNodeHealthRequest": {
        "required": [
          "lastTime"
        ],
        "type": "object",
        "properties": {
          "lastTime": {
            "type": "string"
          },
          "nodeOrgids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PServices": {
        "required": [
          "serviceArch",
          "serviceOrgid",
          "serviceUrl",
          "serviceVersions"
        ],
        "type": "object",
        "properties": {
          "serviceUrl": {
            "type": "string"
          },
          "serviceOrgid": {
            "type": "string"
          },
          "serviceArch": {
            "type": "string"
          },
          "agreementLess": {
            "type": "boolean"
          },
          "serviceVersions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PServiceVersions"
            }
          },
          "dataVerification": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "nodeHealth": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        }
      },
      "AllNodeErrorsInOrgResp": {
        "required": [
          "nodeErrors"
        ],
        "type": "object",
        "properties": {
          "nodeErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NodeErrorsResp"
            }
          }
        }
      },
      "ServiceRef": {
        "required": [
          "arch",
          "org",
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "org": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "versionRange": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          }
        }
      },
      "PostAgreementsConfirmRequest": {
        "type": "object",
        "properties": {
          "agreementId": {
            "type": "string"
          }
        }
      },
      "NodeStatus": {
        "required": [
          "connectivity",
          "lastUpdated",
          "runningServices",
          "services"
        ],
        "type": "object",
        "properties": {
          "connectivity": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneService"
            }
          },
          "runningServices": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "PostAgbotPatternRequest": {
        "required": [
          "pattern",
          "patternOrgid"
        ],
        "type": "object",
        "properties": {
          "patternOrgid": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          },
          "nodeOrgid": {
            "type": "string"
          }
        }
      },
      "NodeMsg": {
        "required": [
          "agbotId",
          "agbotPubKey",
          "message",
          "msgId",
          "timeExpires",
          "timeSent"
        ],
        "type": "object",
        "properties": {
          "msgId": {
            "type": "integer",
            "format": "int32"
          },
          "agbotId": {
            "type": "string"
          },
          "agbotPubKey": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "timeSent": {
            "type": "string"
          },
          "timeExpires": {
            "type": "string"
          }
        }
      },
      "NodeError": {
        "type": "object"
      },
      "GetUsersResponse": {
        "type": "object",
        "properties": {
          "users": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/User"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "User": {
        "required": [
          "lastUpdated"
        ],
        "type": "object",
        "properties": {
          "admin": {
            "type": "boolean",
            "default": false
          },
          "apikeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyMetadata"
            }
          },
          "email": {
            "type": "string",
            "default": ""
          },
          "hubAdmin": {
            "type": "boolean",
            "default": false
          },
          "lastUpdated": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "default": ""
          },
          "updatedBy": {
            "type": "string",
            "default": ""
          }
        }
      },
      "Org": {
        "required": [
          "description",
          "heartbeatIntervals",
          "label",
          "lastUpdated",
          "limits",
          "orgType"
        ],
        "type": "object",
        "properties": {
          "orgType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "limits": {
            "$ref": "#/components/schemas/OrgLimits"
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          }
        }
      },
      "PutServicePolicyRequest": {
        "required": [
          "jsonFormats"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "GetAgbotMsgsResponse": {
        "required": [
          "messages"
        ],
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgbotMsg"
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "GetAgbotPatternsResponse": {
        "required": [
          "patterns"
        ],
        "type": "object",
        "properties": {
          "patterns": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AgbotPattern"
            }
          }
        }
      },
      "OneUserInputValue": {
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "object"
          }
        }
      },
      "NodeHeartbeatIntervals": {
        "required": [
          "intervalAdjustment",
          "maxInterval",
          "minInterval"
        ],
        "type": "object",
        "properties": {
          "minInterval": {
            "type": "integer",
            "format": "int32"
          },
          "maxInterval": {
            "type": "integer",
            "format": "int32"
          },
          "intervalAdjustment": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "NodeAgreement": {
        "required": [
          "agrService",
          "lastUpdated",
          "services",
          "state"
        ],
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NAService"
            }
          },
          "agrService": {
            "$ref": "#/components/schemas/NAgrService"
          },
          "state": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "PutServiceKeyRequest": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          }
        }
      },
      "GetManagementPoliciesResponse": {
        "type": "object",
        "properties": {
          "managementPolicy": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ManagementPolicy"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "PutNodesRequest": {
        "required": [
          "jsonFormats",
          "name"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nodeType": {
            "type": "string",
            "default": "device"
          },
          "pattern": {
            "type": "string"
          },
          "registeredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegService"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "msgEndPoint": {
            "type": "string",
            "default": ""
          },
          "softwareVersions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "publicKey": {
            "type": "string"
          },
          "arch": {
            "type": "string",
            "default": ""
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          },
          "clusterNamespace": {
            "type": "string"
          },
          "isNamespaceScoped": {
            "type": "boolean",
            "default": false
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "ChangeEntry": {
        "required": [
          "id",
          "operation",
          "orgId",
          "resource",
          "resourceChanges"
        ],
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "resourceChanges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceChangesInnerObject"
            }
          }
        }
      },
      "PolicySearchResponseDesync": {
        "required": [
          "agbot",
          "cause",
          "detailMessage",
          "stackTrace",
          "suppressedExceptions"
        ],
        "type": "object",
        "properties": {
          "stackTrace": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "classLoaderName": {
                  "type": "string"
                },
                "moduleName": {
                  "type": "string"
                },
                "moduleVersion": {
                  "type": "string"
                },
                "methodName": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "lineNumber": {
                  "type": "integer",
                  "format": "int32"
                },
                "className": {
                  "type": "string"
                },
                "nativeMethod": {
                  "type": "boolean"
                }
              }
            }
          },
          "offset": {
            "type": "string"
          },
          "cause": {
            "type": "object",
            "properties": {
              "stackTrace": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "classLoaderName": {
                      "type": "string"
                    },
                    "moduleName": {
                      "type": "string"
                    },
                    "moduleVersion": {
                      "type": "string"
                    },
                    "methodName": {
                      "type": "string"
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "lineNumber": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "className": {
                      "type": "string"
                    },
                    "nativeMethod": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "message": {
                "type": "string"
              },
              "localizedMessage": {
                "type": "string"
              }
            }
          },
          "session": {
            "type": "string"
          },
          "agbot": {
            "type": "string"
          }
        }
      },
      "PutAgbotsRequest": {
        "required": [
          "jsonFormats",
          "name",
          "publicKey",
          "token"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "msgEndPoint": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "PatchAgbotsRequest": {
        "required": [
          "jsonFormats"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "msgEndPoint": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "PostBusinessPolicySearchResponse": {
        "required": [
          "nodes"
        ],
        "type": "object",
        "properties": {
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessPolicyNodeResponse"
            }
          },
          "offsetUpdated": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "AgentVersionsResponse": {
        "required": [
          "agentCertVersions",
          "agentConfigVersions",
          "agentSoftwareVersions",
          "lastUpdated"
        ],
        "type": "object",
        "properties": {
          "agentCertVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agentConfigVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "agentSoftwareVersions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "GetAgbotBusinessPolsResponse": {
        "required": [
          "businessPols"
        ],
        "type": "object",
        "properties": {
          "businessPols": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AgbotBusinessPol"
            }
          }
        }
      },
      "Service": {
        "required": [
          "arch",
          "clusterDeployment",
          "clusterDeploymentSignature",
          "deployment",
          "deploymentSignature",
          "description",
          "documentation",
          "imageStore",
          "label",
          "lastUpdated",
          "organization",
          "owner",
          "public",
          "sharable",
          "url",
          "version"
        ],
        "type": "object",
        "properties": {
          "arch": {
            "type": "string"
          },
          "clusterDeployment": {
            "type": "string"
          },
          "clusterDeploymentSignature": {
            "type": "string"
          },
          "deployment": {
            "type": "string"
          },
          "deploymentSignature": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "documentation": {
            "type": "string"
          },
          "imageStore": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "label": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          },
          "matchHardware": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "organization": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "public": {
            "type": "boolean"
          },
          "requiredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRef"
            },
            "default": []
          },
          "sharable": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "userInput": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "default": []
          },
          "version": {
            "type": "string"
          }
        }
      },
      "PostAgbotsMsgsRequest": {
        "required": [
          "message",
          "ttl"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "ttl": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "NodeDetails": {
        "type": "object",
        "properties": {
          "arch": {
            "type": "string"
          },
          "connectivity": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          },
          "id": {
            "type": "string",
            "default": ""
          },
          "lastHeartbeat": {
            "type": "string"
          },
          "lastUpdatedNode": {
            "type": "string",
            "default": ""
          },
          "lastUpdatedNodeError": {
            "type": "string"
          },
          "lastUpdatedNodePolicy": {
            "type": "string"
          },
          "lastUpdatedNodeStatus": {
            "type": "string"
          },
          "msgEndPoint": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nodeType": {
            "type": "string",
            "default": ""
          },
          "owner": {
            "type": "string",
            "default": ""
          },
          "orgid": {
            "type": "string",
            "default": ""
          },
          "pattern": {
            "type": "string"
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneProperty"
            }
          },
          "publicKey": {
            "type": "string"
          },
          "registeredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegService"
            }
          },
          "runningServices": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneService"
            }
          },
          "softwareVersions": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "token": {
            "type": "string",
            "default": "***************"
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          },
          "ha_group": {
            "type": "string"
          },
          "clusterNamespace": {
            "type": "string"
          },
          "isNamespaceScoped": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "OneService": {
        "required": [
          "agreementId",
          "arch",
          "containerStatus",
          "orgid",
          "serviceUrl",
          "version"
        ],
        "type": "object",
        "properties": {
          "agreementId": {
            "type": "string"
          },
          "serviceUrl": {
            "type": "string"
          },
          "orgid": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "containerStatus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContainerStatus"
            }
          },
          "operatorStatus": {
            "type": "object"
          },
          "configState": {
            "type": "string"
          }
        }
      },
      "Formats": {
        "type": "object"
      },
      "PutPatternKeyRequest": {
        "required": [
          "key"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          }
        }
      },
      "OneProperty": {
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "object"
          }
        }
      },
      "PostPutServiceRequest": {
        "required": [
          "arch",
          "jsonFormats",
          "label",
          "public",
          "sharable",
          "url",
          "version"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "public": {
            "type": "boolean"
          },
          "documentation": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "arch": {
            "type": "string"
          },
          "sharable": {
            "type": "string"
          },
          "matchHardware": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "requiredServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceRef"
            }
          },
          "userInput": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "deployment": {
            "type": "string"
          },
          "deploymentSignature": {
            "type": "string"
          },
          "clusterDeployment": {
            "type": "string"
          },
          "clusterDeploymentSignature": {
            "type": "string"
          },
          "imageStore": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "PostPutOrgRequest": {
        "required": [
          "description",
          "jsonFormats",
          "label"
        ],
        "type": "object",
        "properties": {
          "orgType": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "limits": {
            "$ref": "#/components/schemas/OrgLimits"
          },
          "heartbeatIntervals": {
            "$ref": "#/components/schemas/NodeHeartbeatIntervals"
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "GetOrgsResponse": {
        "type": "object",
        "properties": {
          "orgs": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Org"
            },
            "default": {
              "empty": true,
              "traversableAgain": true
            }
          },
          "lastIndex": {
            "type": "integer",
            "format": "int32",
            "default": 0
          }
        }
      },
      "BServiceVersions": {
        "required": [
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "priority": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "upgradePolicy": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "NodeErrorsResp": {
        "required": [
          "error",
          "lastUpdated",
          "nodeId"
        ],
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "lastUpdated": {
            "type": "string"
          }
        }
      },
      "PatchPatternRequest": {
        "required": [
          "jsonFormats"
        ],
        "type": "object",
        "properties": {
          "clusterNamespace": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PServices"
            }
          },
          "description": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "secretBinding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneSecretBindingService"
            }
          },
          "public": {
            "type": "boolean"
          },
          "agreementProtocols": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "jsonFormats": {
            "$ref": "#/components/schemas/Formats"
          },
          "userInput": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OneUserInputService"
            }
          }
        }
      },
      "NodeHealthHashElement": {
        "required": [
          "agreements"
        ],
        "type": "object",
        "properties": {
          "lastHeartbeat": {
            "type": "string"
          },
          "agreements": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/NodeHealthAgreementElement"
            }
          }
        }
      },
      "PostAgbotBusinessPolRequest": {
        "required": [
          "businessPol",
          "businessPolOrgid"
        ],
        "type": "object",
        "properties": {
          "businessPolOrgid": {
            "type": "string"
          },
          "businessPol": {
            "type": "string"
          },
          "nodeOrgid": {
            "type": "string"
          }
        }
      }
    }
  }
}