{
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "schemes": [
    "http",
    "https"
  ],
  "swagger": "2.0",
  "info": {
    "description": "The Model Management System (MMS) delivers AI models and other files needed by edge services to the edge nodes where those services are running. MMS has two components, and therefore two APIs: Cloud Sync Service (CSS) is the MMS component that runs on the management hub that users or devops processes use to load models/files into MMS. The Edge Sync Service (ESS) runs on each edge node and is the API that edge services interact with to get the models/files and find out about updates.\n\nThe Agent Secrets APIs enables service containers to receive updated secrets",
    "title": "Model Management System and Agent Secrets API",
    "version": "1.0.0"
  },
  "host": "localhost",
  "basePath": "/",
  "paths": {
    "/api/v1/destinations/{orgID}": {
      "get": {
        "description": "Provides a list of destinations for an organization, i.e., ESS nodes (belonging to orgID) that have registered with the CSS.\nThis is a CSS only API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "List all known destinations.",
        "operationId": "handleDestinations",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the destinations to return.",
            "name": "orgID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Destinations response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Destination"
              }
            }
          },
          "404": {
            "description": "No destinations found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the destinations",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/destinations/{orgID}/{destType}/{destID}/objects": {
      "get": {
        "description": "Provides a list of objects that are in use by the destination ESS node.\nThis is a CSS only API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "List all objects that are in use by the destination.",
        "operationId": "handleDestinationObjects",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the destination to retrieve objects for.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The destType of the destination to retrieve objects for.",
            "name": "destType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The destID of the destination to retrieve objects for.",
            "name": "destID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Objects response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ObjectStatus"
              }
            }
          },
          "404": {
            "description": "No objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "description": "Get health status of the sync service node.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS",
          "ESS"
        ],
        "summary": "Get health status of the sync service node.",
        "operationId": "handleHealth",
        "parameters": [
          {
            "type": "boolean",
            "description": "Whether or not to include the detailed health status",
            "name": "details",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Health status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/healthReport"
              }
            }
          },
          "500": {
            "description": "Failed to send health status.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}": {
      "get": {
        "description": "Get objects of the specified object type. Either get all of the objects or just those objects that have pending (unconsumed) updates.\nAn application would typically invoke the latter API periodically to check for updates (an alternative is to use a webhook).",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get objects of the specified type.",
        "operationId": "handleListObjects",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the objects to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "When returning updated objects only, whether or not to include the objects that have been marked as received by the application",
            "name": "received",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated objects response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MetaData"
              }
            }
          },
          "404": {
            "description": "No updated objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Register or delete a webhook for the specified object type.\nA webhook is used to process notifications on updates for objects of the specified object type.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Register or delete a webhook.",
        "operationId": "handleWebhook",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the objects for the webhook",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "description": "The webhook's data",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/webhookUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook registered/deleted",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the webhook's data",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}": {
      "get": {
        "description": "Get the metadata of an object of the specified object type and object ID.\nThe metadata indicates if the objects includes data which can then be obtained using the appropriate API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get an object.",
        "operationId": "handleGetObject",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to return",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object response",
            "schema": {
              "$ref": "#/definitions/MetaData"
            }
          },
          "404": {
            "description": "Object not found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the object",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Update/create the object of the specified object type and object ID.\nIf an object with the same type and ID exists that object is updated, otherwise a new object is created.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Update/create an object.",
        "operationId": "handleUpdateObject",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to update/create",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to update/create",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/objectUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object updated",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update/create the object",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "description": "Delete the object of the specified object type and object ID.\nDestinations of the object will be notified that the object has been deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Delete an object.",
        "operationId": "handleDeleteObject",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to delete",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to delete",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object deleted",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to delete the object",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/activate": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as active.\nAn object can be created as inactive which means it is not delivered to its destinations.\nThis API is used to activate such objects and initiate the distribution of the object to its destinations.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Mark an object as active.",
        "operationId": "handleActivateObject",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to mark as active",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as active",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as active",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object active",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/consumed": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as having been consumed by the application.\nAfter the object is marked as consumed it will not be delivered to the application again (even if the sync service is restarted).",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Mark an object as consumed.",
        "operationId": "handleObjectConsumed",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to mark as consumed",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as consumed",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as consumed",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object consumed",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/data": {
      "get": {
        "description": "Get the data of the object of the specified object type and object ID.\nThe metadata of the object indicates if the object includes data (noData is false).",
        "produces": [
          "application/octet-stream",
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get the data of an object.",
        "operationId": "handleObjectGetData",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object whose data will be retrieved",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose data will be retrieved",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object data",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "500": {
            "description": "Failed to retrieve the object's data",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Update the data of the object of the specified object type and object ID.\nThe data can be updated without modifying the object's metadata.",
        "consumes": [
          "application/octet-stream"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Update the data of an object.",
        "operationId": "handleObjectPutData",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object whose data will be updated",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose data will be updated",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "description": "The object's new data. When read data bytes from a file, please set application/octet-stream as Content-Type in header.",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object data updated",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "The specified object doesn't exist",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the object's data",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/deleted": {
      "put": {
        "description": "Confirm the deletion of the object of the specified object type and object ID by the application.\nThe application should invoke this API after it completed the actions associated with deleting the object.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "The service confirms object deletion.",
        "operationId": "handleObjectDeleted",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to confirm its deletion",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to confirm its deletion",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object's deletion confirmed",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to confirm the object's deletion",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/received": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as having been received by the application.\nAfter the object is marked as received it will only be delivered to the application again if specified in the objects request.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Mark an object as received.",
        "operationId": "handleObjectReceived",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object to mark as received",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as received",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as received",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object received",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}/{objectID}/status": {
      "get": {
        "description": "Get the status of the object of the specified object type and object ID.\nThe status can be one of the following:\nnotReady - The object is not ready to be sent to destinations.\nready - The object is ready to be sent to destinations.\nreceived - The object's metadata has been received but not all its data.\ncompletelyReceived - The full object (metadata and data) has been received.\nconsumed - The object has been consumed by the application.\ndeleted - The object was deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get the status of an object.",
        "operationId": "handleObjectStatus",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the object whose status will be retrieved",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose status will be retrieved",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object status",
            "schema": {
              "type": "string",
              "enum": [
                "notReady",
                "ready",
                "received",
                "completelyReceived",
                "consumed",
                "deleted"
              ]
            }
          },
          "500": {
            "description": "Failed to retrieve the object's status",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{objectType}?all_objects=true": {
      "get": {
        "description": "Get all objects of the specified object type that have a destination policy.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get objects with a destination policy of the specified type.",
        "operationId": "handleListAllObjects",
        "parameters": [
          {
            "type": "string",
            "description": "The object type of the objects to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Whether or not to include all objects. If false only updated objects will be returned.",
            "name": "all_objects",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Objects with a destination policy response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ObjectDestinationPolicy"
              }
            }
          },
          "404": {
            "description": "No objects with a destination policy found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}": {
      "get": {
        "description": "Get objects of the specified object type. Either get all of the objects or just those objects that have pending (unconsumed) updates.\nAn application would typically invoke the latter API periodically to check for updates (an alternative is to use a webhook).",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get objects of the specified type.",
        "operationId": "handleListObjects",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the objects to return",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the objects to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "When returning updated objects only, whether or not to include the objects that have been marked as received by the application",
            "name": "received",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated objects response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MetaData"
              }
            }
          },
          "404": {
            "description": "No updated objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Register or delete a webhook for the specified object type.\nA webhook is used to process notifications on updates for objects of the specified object type.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Register or delete a webhook.",
        "operationId": "handleWebhook",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the objects for the webhook",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the objects for the webhook",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "description": "The webhook's data",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/webhookUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook registered/deleted",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the webhook's data",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}": {
      "get": {
        "description": "Get the metadata of an object of the specified object type and object ID.\nThe metadata indicates if the objects includes data which can then be obtained using the appropriate API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get an object.",
        "operationId": "handleGetObject",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to return.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to return",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object response",
            "schema": {
              "$ref": "#/definitions/MetaData"
            }
          },
          "404": {
            "description": "Object not found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the object",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Update/create the object of the specified object type and object ID.\nIf an object with the same type and ID exists that object is updated, otherwise a new object is created.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Update/create an object.",
        "operationId": "handleUpdateObject",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to update/create",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to update/create",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to update/create",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/objectUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object updated",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update/create the object",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "description": "Delete the object of the specified object type and object ID.\nDestinations of the object will be notified that the object has been deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Delete an object.",
        "operationId": "handleDeleteObject",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to delete.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to delete",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to delete",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object deleted",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to delete the object",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/activate": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as active.\nAn object can be created as inactive which means it is not delivered to its destinations.\nThis API is used to activate such objects and initiate the distribution of the object to its destinations.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Mark an object as active.",
        "operationId": "handleActivateObject",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to mark as active",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to mark as active",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as active",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as active",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object active",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/consumed": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as having been consumed by the application.\nAfter the object is marked as consumed it will not be delivered to the application again (even if the sync service is restarted).",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Mark an object as consumed.",
        "operationId": "handleObjectConsumed",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to mark as consumed.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to mark as consumed",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as consumed",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as consumed",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object consumed",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/data": {
      "get": {
        "description": "Get the data of the object of the specified object type and object ID.\nThe metadata of the object indicates if the object includes data (noData is false).",
        "produces": [
          "application/octet-stream",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get the data of an object.",
        "operationId": "handleObjectGetData",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose data will be retrieved",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose data will be retrieved",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose data will be retrieved",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object data",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "500": {
            "description": "Failed to retrieve the object's data",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Update the data of the object of the specified object type and object ID.\nThe data can be updated without modifying the object's metadata.",
        "consumes": [
          "application/octet-stream"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Update the data of an object.",
        "operationId": "handleObjectPutData",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose data will be updated",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose data will be updated",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose data will be updated",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "description": "The object's new data. When read data bytes from a file, please set application/octet-stream as Content-Type in header.",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object data updated",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "The specified object doesn't exist",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the object's data",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/deleted": {
      "put": {
        "description": "Confirm the deletion of the object of the specified object type and object ID by the application.\nThe application should invoke this API after it completed the actions associated with deleting the object.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "The service confirms object deletion.",
        "operationId": "handleObjectDeleted",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to confirm its deletion. Present only when working with a CSS, removed from the path when working with an ESS",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to confirm its deletion",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to confirm its deletion",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object's deletion confirmed",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to confirm the object's deletion",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/destinations": {
      "get": {
        "description": "Get the list of sync service (ESS) nodes which are the destinations of the object of the specified object type and object ID.\nThe delivery status of the object is provided for each destination along with its type and ID.\nThis is a CSS only API.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get the destinations of an object.",
        "operationId": "handleObjectDestinations",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose destinations will be retrieved. Present only when working with a CSS, removed from the path when working with an ESS",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose destinations will be retrieved",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose destinations will be retrieved",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object destinations and their status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/DestinationsStatus"
              }
            }
          },
          "500": {
            "description": "Failed to retrieve the object's destinations",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "description": "Set the list of sync service (ESS) nodes to be the destinations of the object of the specified object type and object ID.\nThis is a CSS only API.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Set the destinations of an object.",
        "operationId": "handleObjectDestinationsUpdate",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose destinations will be updated",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose destinations will be updated",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose destinations will be updated",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "description": "The object's destination list",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object destinations updated",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the object's destinations",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "description": "Add or delete the list of sync service (ESS) nodes to/from be the destinations of the object of the specified object type and object ID.\nThis is a CSS only API.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Add/Delete the destinations of an object.",
        "operationId": "handleObjectDestinationsUpdate",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose destinations will be updated",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose destinations will be updated",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose destinations will be updated",
            "name": "objectID",
            "in": "path",
            "required": true
          },
          {
            "description": "The object's destination list to add or remove",
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/bulkDestUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Object destinations updated",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the object's destinations",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/policyreceived": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as having its destination policy received\nAfter the object is marked as such it will not be delivered to the application listing objects with\na destination policy, unless it adds \"received=true\" to the query parameters.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Mark an object's destination policy as having been received. This is a CSS only API",
        "operationId": "handlePolicyReceived",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to mark as having its destination policy received.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to mark as having its destination policy received",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as having its destination policy received",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as having its destination policy received",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object as having its destination policy received",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/received": {
      "put": {
        "description": "Mark the object of the specified object type and object ID as having been received by the application.\nAfter the object is marked as received it will only be delivered to the application again if specified in the objects request.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Mark an object as received.",
        "operationId": "handleObjectReceived",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object to mark as received",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object to mark as received",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object to mark as received",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "Object marked as received",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object received",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}/{objectID}/status": {
      "get": {
        "description": "Get the status of the object of the specified object type and object ID.\nThe status can be one of the following:\nnotReady - The object is not ready to be sent to destinations.\nready - The object is ready to be sent to destinations.\nreceived - The object's metadata has been received but not all its data.\ncompletelyReceived - The full object (metadata and data) has been received.\nconsumed - The object has been consumed by the application.\ndeleted - The object was deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get the status of an object.",
        "operationId": "handleObjectStatus",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object whose status will be retrieved",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the object whose status will be retrieved",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object ID of the object whose status will be retrieved",
            "name": "objectID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Object status",
            "schema": {
              "type": "string",
              "enum": [
                "notReady",
                "ready",
                "received",
                "completelyReceived",
                "consumed",
                "deleted"
              ]
            }
          },
          "500": {
            "description": "Failed to retrieve the object's status",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}/{objectType}?all_objects=true": {
      "get": {
        "description": "Get all objects of the specified object type that have a destination policy.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get objects with a destination policy of the specified type.",
        "operationId": "handleListAllObjects",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the objects to return",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The object type of the objects to return",
            "name": "objectType",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Whether or not to include all objects. If false only updated objects will be returned.",
            "name": "all_objects",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Objects with a destination policy response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ObjectDestinationPolicy"
              }
            }
          },
          "404": {
            "description": "No objects with a destination policy found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}?destination_policy=true": {
      "get": {
        "description": "Get the list of objects that have destination policies.\nAn application would typically invoke this API periodically to check for updates.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get objects that have destination policies.",
        "operationId": "handleListObjectsWithDestinationPolicy",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the updated objects to return",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Must be true to indicate that objects with destinationPolicy are to be retrieved",
            "name": "destination_policy",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Whether or not to include the objects that have been marked as received by the application",
            "name": "received",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The ID of the service (orgID/serviceName) to which objects have affinity, whose Destination Policy should be fetched.",
            "name": "service",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "Objects that have a Destination Policy which was updated since the specified UTC time in nanoseconds should be fetched.",
            "name": "since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Object destination policy response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ObjectDestinationPolicy"
              }
            }
          },
          "404": {
            "description": "No updated objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}?filters=true": {
      "get": {
        "description": "Get the list of objects that satisfy the given filters\nThis is a CSS only API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get objects satisfy the given filters",
        "operationId": "handleListObjectsWithFilters",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the updated objects to return. Present only when working with a CSS, removed from the path when working with an ESS",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Must be true to indicate that objects with filters are to be retrieved",
            "name": "filters",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Must be true to indicate that objects with destinationPolicy are to be retrieved",
            "name": "destinationPolicy",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The ID of the service (orgID/serviceName) to which objects have affinity, whose Destination Policy should be fetched.",
            "name": "dpService",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The property name defined inside destination policy to which objects have affinity, whose Destination Policy should be fetched.",
            "name": "dpPropertyName",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Objects that have a Destination Policy which was updated since the specified timestamp in RFC3339 should be fetched.",
            "name": "since",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Fetch the objects with given object type",
            "name": "objectType",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Fetch the objects with given object id",
            "name": "objectID",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Fetch the objects with given destination type",
            "name": "destinationType",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Fetch the objects with given destination id",
            "name": "destinationID",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Specify true or false. Fetch the objects with noData marked to true/false. If not specified, object will not be filtered by \"noData\" field",
            "name": "noData",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Fetch the objects with expiration time before specified timestamp in RFC3339 format",
            "name": "expirationTimeBefore",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Specify true or false. Fetch the object with deleted marked to true/false. If not specified, object will not be filtered by \"deleted\" field",
            "name": "deleted",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Objects response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/MetaData"
              }
            }
          },
          "404": {
            "description": "No objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/objects/{orgID}?list_object_type=true": {
      "get": {
        "description": "Get the list of objects types under a given org\nThis is a CSS only API.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get objects types",
        "operationId": "handleListObjectTypes",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the object types to retrieve",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Must be true to indicate that object types are to be retrieved",
            "name": "list_object_type",
            "in": "query",
            "required": true
          }
        ]
      }
    },
    "/api/v1/objects?destination_policy=true": {
      "get": {
        "description": "Get the list of objects that have destination policies.\nAn application would typically invoke this API periodically to check for updates.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Get objects that have destination policies.",
        "operationId": "handleListObjectsWithDestinationPolicy",
        "parameters": [
          {
            "type": "boolean",
            "description": "Must be true to indicate that objects with destinationPolicy are to be retrieved",
            "name": "destination_policy",
            "in": "query",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Whether or not to include the objects that have been marked as received by the application",
            "name": "received",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The ID of the service (orgID/serviceName) to which objects have affinity, whose Destination Policy should be fetched.",
            "name": "service",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "Objects that have a Destination Policy which was updated since the specified UTC time in nanoseconds should be fetched.",
            "name": "since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Object destination policy response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ObjectDestinationPolicy"
              }
            }
          },
          "404": {
            "description": "No updated objects found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the updated objects",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/organizations": {
      "get": {
        "description": "Get the list of existing organizations. Relevant to CSS only.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Get organizations.",
        "operationId": "handleGetOrganizations",
        "responses": {
          "200": {
            "description": "Organizations response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/organization"
              }
            }
          },
          "404": {
            "description": "No organizations found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the organizations",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/organizations/{orgID}": {
      "put": {
        "description": "Store organization information. Relevant to CSS only.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Update organization.",
        "operationId": "handleOrganizations",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the organization to update.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Organization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The organization was successfuly updated",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to update the organization",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "description": "Remove organization information and clean up all resources (objects, destinations, etc.) all resources (objects, destinations, etc.) associated\nwith the deleted organization. Relevant to CSS only.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Delete organization.",
        "operationId": "handleDeleteOrganization",
        "parameters": [
          {
            "type": "string",
            "description": "The orgID of the organization to delete.",
            "name": "orgID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The organization was successfuly deleted",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to delete the organization",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/resend": {
      "post": {
        "description": "Used by an ESS to ask the CSS to resend it all the objects (supported only for ESS to CSS requests).\nAn application only needs to use this API in case the data it previously obtained from the ESS was lost.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "ESS"
        ],
        "summary": "Request to resend objects.",
        "operationId": "handleResend",
        "responses": {
          "204": {
            "description": "The request will be sent",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "The request is not allowed on Cloud Sync-Service",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/secrets": {
      "get": {
        "description": "Get the list of updated secrets.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "Secrets"
        ],
        "summary": "Get secrets.",
        "operationId": "handleGetSecrets",
        "responses": {
          "200": {
            "description": "Secrets response",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "404": {
            "description": "No updated secrets found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the secret names of updated secrets",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/secrets/{secretName}": {
      "get": {
        "description": "Get the details of a secret.",
        "produces": [
          "application/json",
          "text/plain"
        ],
        "tags": [
          "Secrets"
        ],
        "summary": "Get a secret.",
        "operationId": "handleGetSecret",
        "parameters": [
          {
            "type": "string",
            "description": "The secret name of the secret object to return",
            "name": "secretName",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Secret response",
            "schema": {
              "$ref": "#/definitions/secretObject"
            }
          },
          "400": {
            "description": "Secret name not specified",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "Secret not found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to retrieve the secret",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/secrets/{secretName}?received=true": {
      "post": {
        "description": "Mark the secret as having been received by the service.\nAfter the secret is marked as received, it will no longer be returned by GET /secrets again.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "Secrets"
        ],
        "summary": "Mark a secret as received.",
        "operationId": "handleSecretReceived",
        "parameters": [
          {
            "type": "string",
            "description": "The secret name of the secret to mark as received",
            "name": "secretName",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Secret marked as received",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "Secret name not specified",
            "schema": {
              "type": "string"
            }
          },
          "404": {
            "description": "Secret not found",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to mark the object consumed",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/security/{type}/{orgID}": {
      "get": {
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Retrieve the list of destination type or object type of ACLs for an organization.",
        "operationId": "handleACLGetAll",
        "parameters": [
          {
            "enum": [
              "destinations",
              "objects"
            ],
            "type": "string",
            "description": "The type of the ACL whose username list should be retrieved.",
            "name": "type",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The orgID in which the ACL for the destination type or object type exists.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "If true, display object/destination types that has ACL list associated with",
            "name": "all_keys",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The destination type or object type that is being protected by the ACL.",
            "name": "key",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The acl user type (user or node) to retrieve.",
            "name": "acl_usertype",
            "in": "query"
          }
        ]
      },
      "put": {
        "description": "Bulk add/remove of user(s) to/from an ACL for all destination types or all object types. If the\nfirst username is being added, the ACL is created. If the last username is removed, the ACL\nis deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Bulk add/remove of user(s) to/from an ACL for all destination types or all object types.",
        "operationId": "handleBulkACLUpdateForAllTypes",
        "parameters": [
          {
            "enum": [
              "destinations",
              "objects"
            ],
            "type": "string",
            "description": "The type of the ACL to which the specified username(s) will be added/removed.",
            "name": "type",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The orgID in which the ACL for the destination type or object type exists.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/bulkACLUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The username(s) were added/removed to/from the specified ACL.",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to add/remove the username(s) to/from the specified ACL.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/security/{type}/{orgID}/{key}": {
      "put": {
        "description": "Bulk add/remove of username(s) to/from an ACL for a destination type or an object type. If the\nfirst username is being added, the ACL is created. If the last username is removed, the ACL\nis deleted.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Bulk add/remove of username(s) to/from an ACL for a destination type or an object type.",
        "operationId": "handleBulkACLUpdate",
        "parameters": [
          {
            "enum": [
              "destinations",
              "objects"
            ],
            "type": "string",
            "description": "The type of the ACL to which the specified user(s) will be added/removed.",
            "name": "type",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The orgID in which the ACL for the destination type or object type exists.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The destination type or object type that is being protected by the ACL.",
            "name": "key",
            "in": "path",
            "required": true
          },
          {
            "name": "payload",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/bulkACLUpdate"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The user(s) were added/removed to/from the specified ACL.",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to add/remove the user(s)to/from the specified ACL.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/api/v1/security/{type}/{orgID}/{key}/{aclUserType}/{username}": {
      "delete": {
        "description": "Remove a user from an ACL for a destination type or an object type. If the last username is removed,\nthe ACL is deleted as well.",
        "produces": [
          "text/plain"
        ],
        "tags": [
          "CSS"
        ],
        "summary": "Remove a user from an ACL for a destination type or an object type.",
        "operationId": "handleACLDelete",
        "parameters": [
          {
            "enum": [
              "destinations",
              "objects"
            ],
            "type": "string",
            "description": "The type of the ACL to remove the specified username from.",
            "name": "type",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The orgID in which the ACL for the destination type or object type exists.",
            "name": "orgID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The destination type or object type that is being protected by the ACL.",
            "name": "key",
            "in": "path",
            "required": true
          },
          {
            "enum": [
              "user",
              "node"
            ],
            "type": "string",
            "description": "The acl user type of given username to be deleted",
            "name": "acl_usertype",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "The username to remove from the specified ACL.",
            "name": "username",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "The username was removed from the specified ACL.",
            "schema": {
              "type": "string"
            }
          },
          "500": {
            "description": "Failed to remove the username from the specified ACL.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "ACLentry": {
      "description": "ACLentry contains ACL information about each user",
      "type": "object",
      "properties": {
        "ACLRole": {
          "type": "string"
        },
        "ACLUserType": {
          "type": "string"
        },
        "Username": {
          "type": "string"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "DBHealthStatusInfo": {
      "description": "DBHealthStatusInfo describes the health status of the database of the sync-service node",
      "type": "object",
      "properties": {
        "dbReadFailures": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "DBReadFailures"
        },
        "dbStatus": {
          "type": "string",
          "x-go-name": "DBStatus"
        },
        "dbWriteFailures": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "DBWriteFailures"
        },
        "disconnectedFromDB": {
          "type": "boolean",
          "x-go-name": "DisconnectedFromDB"
        },
        "lastDisconnectFromDBDuration": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "LastDisconnectFromDBDuration"
        },
        "timeSinceLastReadWriteError": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "TimeSinceLastReadWriteError"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "Destination": {
      "description": "Each sync service edge node (ESS) has an address that is composed of the node's ID, Type, and Organization.\nAn ESS node communicates with the CSS using either MQTT or HTTP.",
      "type": "object",
      "title": "Destination describes a sync service node.",
      "required": [
        "destinationType",
        "destinationID",
        "communication",
        "codeVersion"
      ],
      "properties": {
        "codeVersion": {
          "description": "CodeVersion is the sync service code version used by the destination",
          "type": "string",
          "x-go-name": "CodeVersion"
        },
        "communication": {
          "description": "Communication is the communication protocol used by the destination to connect (can be MQTT or HTTP)",
          "type": "string",
          "enum": [
            "HTTP",
            "MQTT"
          ],
          "x-go-name": "Communication"
        },
        "destinationID": {
          "description": "DestID is the destination ID",
          "type": "string",
          "x-go-name": "DestID"
        },
        "destinationOrgID": {
          "description": "DestOrgID is the destination organization ID\nEach sync service object belongs to a single organization",
          "type": "string",
          "x-go-name": "DestOrgID"
        },
        "destinationType": {
          "description": "DestType is the destination type",
          "type": "string",
          "x-go-name": "DestType"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "DestinationsStatus": {
      "description": "DestinationsStatus describes the delivery status of an object for a destination\nDestinationsStatus provides information about the delivery status of an object for a certain destination.\nThe status can be one of the following:\nIndication whether the object has been delivered to the destination\npending - inidicates that the object is pending delivery to this destination\ndelivering - indicates that the object is being delivered to this destination\ndelivered - indicates that the object was delivered to this destination\nconsumed - indicates that the object was consumed by this destination\ndeleted - indicates that this destination acknowledged the deletion of the object\nerror - indicates that a feedback error message was received from this destination",
      "type": "object",
      "required": [
        "destinationType",
        "destinationID",
        "status"
      ],
      "properties": {
        "destinationID": {
          "description": "DestID is the destination ID",
          "type": "string",
          "x-go-name": "DestID"
        },
        "destinationType": {
          "description": "DestType is the destination type",
          "type": "string",
          "x-go-name": "DestType"
        },
        "message": {
          "description": "Message is the message for the destination",
          "type": "string",
          "x-go-name": "Message"
        },
        "status": {
          "description": "Status is the destination status",
          "type": "string",
          "enum": [
            "pending",
            "delivering",
            "delivered",
            "consumed",
            "deleted",
            "error"
          ],
          "x-go-name": "Status"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "HealthStatusInfo": {
      "description": "HealthStatusInfo describes the health status of the sync-service node",
      "type": "object",
      "properties": {
        "healthStatus": {
          "type": "string",
          "x-go-name": "HealthStatus"
        },
        "nodeType": {
          "type": "string",
          "x-go-name": "NodeType"
        },
        "upTime": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "UpTime"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "MQTTHealthStatusInfo": {
      "description": "MQTTHealthStatusInfo describes the health status of the MQTT connection of the sync-service node",
      "type": "object",
      "properties": {
        "disconnectedFromMQTTBroker": {
          "type": "boolean",
          "x-go-name": "DisconnectedFromMQTTBroker"
        },
        "lastDisconnectFromBrokerDuration": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "LastDisconnectFromBrokerDuration"
        },
        "mqttConnectionStatus": {
          "type": "string",
          "x-go-name": "MQTTConnectionStatus"
        },
        "publishFailures": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "PublishFailures"
        },
        "subscribeFailures": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "SubscribeFailures"
        },
        "timeSinceLastPublishError": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "TimeSinceLastPublishError"
        },
        "timeSinceLastSubscribeError": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "TimeSinceLastSubscribeError"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "MetaData": {
      "description": "Every object includes metadata (mandatory) and data (optional). The metadata and data can be updated independently.\nEach sync service node (ESS) has an address that is composed of the node's ID, Type, and Organization.\nTo send an object to a single node set the destinationType and destinationID fields to match the node's Type and ID.\nTo send an object to all the nodes of a certain type set destinationType to the appropriate type and leave destinationID empty.\nIf both destinationType and destinationID are empty the object is sent to all nodes.",
      "type": "object",
      "title": "MetaData is the metadata that identifies and defines the sync service object.",
      "required": [
        "objectID",
        "objectType"
      ],
      "properties": {
        "activationTime": {
          "description": "ActivationTime is a timestamp/date as to when this object should automatically be activated.\nThe timestamp should be provided in RFC3339 format.\nOptional field, if omitted (and Inactive is true) the object is never automatically activated.",
          "type": "string",
          "x-go-name": "ActivationTime"
        },
        "autodelete": {
          "description": "AutoDelete is a flag indicating whether to delete the object after it is delivered to all its destinations from the DestinationsList.\nOptional field, default is false (do not delete).\nThis field is used only when working with the CSS. Objects are always deleted after delivery on the ESS.",
          "type": "boolean",
          "x-go-name": "AutoDelete"
        },
        "chunkSize": {
          "description": "ChunkSize is an internal field indicating the maximal message payload size.\nThis field should not be set by users.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "ChunkSize"
        },
        "consumers": {
          "description": "ExpectedConsumers is the number of applications that are expected to indicate that they have consumed the object.\nOptional field, default is 1.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "ExpectedConsumers"
        },
        "dataID": {
          "description": "DataID is an internal data ID.\nThis field should not be set by users.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "DataID"
        },
        "deleted": {
          "description": "Deleted is a flag indicating to applications polling for updates that this object has been deleted.\nRead only field, should not be set by users.",
          "type": "boolean",
          "x-go-name": "Deleted"
        },
        "description": {
          "description": "Description is a textual description of the object.\nOptional field, empty by default.",
          "type": "string",
          "x-go-name": "Description"
        },
        "destinationDataUri": {
          "description": "DestinationDataURI is a URI indicating where the receiver of the object should store it.\nCurrently only file URIs are supported.\nThis field is available only when working with the CSS.\nOptional field, if omitted the object is stored in the node's internal storage.",
          "type": "string",
          "x-go-name": "DestinationDataURI"
        },
        "destinationID": {
          "description": "DestID is the ID of the destination. If omitted the object is sent to all ESSs with the same DestType.\nThis field is ignored when working with ESS (the destination is the CSS).",
          "type": "string",
          "x-go-name": "DestID"
        },
        "destinationOrgID": {
          "description": "DestOrgID is the organization ID of the object (an object belongs to exactly one organization).\nThis field is ignored when working with ESS (the ESS's orgID is used).",
          "type": "string",
          "x-go-name": "DestOrgID"
        },
        "destinationPolicy": {
          "$ref": "#/definitions/Policy"
        },
        "destinationType": {
          "description": "DestType is the type of destination to send the object to.\nIf omitted (and if DestinationsList is omitted too) the object is broadcasted to all known destinations.\nThis field is ignored when working with ESS (the destination is always the CSS).",
          "type": "string",
          "x-go-name": "DestType"
        },
        "destinationsList": {
          "description": "DestinationsList is the list of destinations as type:id pairs to send the object to.\nWhen a DestinationsList is provided DestType and DestID must be omitted.\nThis field is ignored when working with ESS (the destination is always the CSS).",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "DestinationsList"
        },
        "expiration": {
          "description": "Expiration is a timestamp/date indicating when the object expires.\nWhen the object expires it is automatically deleted.\nThe timestamp should be provided in RFC3339 format.\nThis field is available only when working with the CSS.\nOptional field, if omitted the object doesn't expire.",
          "type": "string",
          "x-go-name": "Expiration"
        },
        "hashAlgorithm": {
          "description": "HashAlgorithm used for data signature sign/verification. \"SHA1\" and \"SHA256\" are supported hash algorithms.\nValid values are: \"SHA1\", \"SHA256\"\nOptional field, if omitted the data signature/verification will not be applied",
          "type": "string",
          "x-go-name": "HashAlgorithm"
        },
        "inactive": {
          "description": "Inactive is a flag indicating that this object is inactive for now.\nAn object can be created as inactive which means it is not delivered to its destination. The object can be activated later.\nOptional field, default is false (object active).",
          "type": "boolean",
          "x-go-name": "Inactive"
        },
        "instanceID": {
          "description": "InstanceID is an internal instance ID.\nThis field should not be set by users.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "InstanceID"
        },
        "link": {
          "description": "Link is a link to where the data for this object can be fetched from.\nThe link is set and used by the application. The sync service does not access the link.\nOptional field, if omitted the data must be provided by the application.",
          "type": "string",
          "x-go-name": "Link"
        },
        "metaOnly": {
          "description": "MetaOnly is a flag that indicates that this update is only of the metadata. The current object's data is left unchanged.\nOptional field, default is false (both data and metadata are updated).",
          "type": "boolean",
          "x-go-name": "MetaOnly"
        },
        "noData": {
          "description": "NoData is a flag indicating that there is no data for this object.\nObjects with no data can be used, for example, to send notifications.\nOptional field, default is false (object includes data).",
          "type": "boolean",
          "x-go-name": "NoData"
        },
        "objectID": {
          "description": "ObjectID is a unique identifier of the object",
          "type": "string",
          "x-go-name": "ObjectID"
        },
        "objectSize": {
          "description": "ObjectSize is an internal field indicating the size of the object's data.\nThis field should not be set by users.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "ObjectSize"
        },
        "objectType": {
          "description": "ObjectType is the type of the object.\nThe type is used to group multiple objects, for example when checking for object updates.",
          "type": "string",
          "x-go-name": "ObjectType"
        },
        "originID": {
          "description": "OriginID is the ID of origin of the object. Set by the internal code.\nRead only field, should not be set by users.",
          "type": "string",
          "x-go-name": "OriginID"
        },
        "originType": {
          "description": "OriginType is the type of origin of the object. Set by the internal code.\nRead only field, should not be set by users.",
          "type": "string",
          "x-go-name": "OriginType"
        },
        "ownerID": {
          "description": "OwnerID is an internal field indicating who creates the object\nThis field should not be set by users",
          "type": "string",
          "x-go-name": "OwnerID"
        },
        "public": {
          "description": "Public is a flag indicate this object is visiable to all users in all orgs\nOptional field, default is false (not visiable to all users)",
          "type": "boolean",
          "x-go-name": "Public"
        },
        "publicKey": {
          "description": "PublicKey is a base64 encoded string. It is the publicKey to verify the data of the object\nOptional field, if omitted the data will not be verified with public key and signature",
          "type": "string",
          "x-go-name": "PublicKey"
        },
        "signature": {
          "description": "Signature is a base64 encoded string. It is the data signature to verify data of the object\nOptional field, if omitted the data will not be verified with public key and signature",
          "type": "string",
          "x-go-name": "Signature"
        },
        "sourceDataUri": {
          "description": "SourceDataURI is a URI indicating where the sender of the object should read the data from.\nCurrently only file URIs are supported.\nThis field is available only when working with the ESS.\nOptional field, if omitted the object's data should be provided by the user.",
          "type": "string",
          "x-go-name": "SourceDataURI"
        },
        "uploadChunkSize": {
          "description": "UploadChunkSize is an internal field indicating the upload chunk size used when uploading the\nthe model (if chunking was used)\nThis field should not be set by users.",
          "type": "integer",
          "format": "int64",
          "x-go-name": "UploadChunkSize"
        },
        "version": {
          "description": "Version is the object's version (as used by the application).\nOptional field, empty by default.",
          "type": "string",
          "x-go-name": "Version"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "ObjectDestinationPolicy": {
      "type": "object",
      "title": "ObjectDestinationPolicy contains information about an object that has a Destination Policy.",
      "required": [
        "orgID",
        "objectType",
        "objectID"
      ],
      "properties": {
        "destinationPolicy": {
          "$ref": "#/definitions/Policy"
        },
        "destinations": {
          "description": "Destinations is the list of the object's current destinations",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DestinationsStatus"
          },
          "x-go-name": "Destinations"
        },
        "objectID": {
          "description": "ObjectID is a unique identifier of the object",
          "type": "string",
          "x-go-name": "ObjectID"
        },
        "objectType": {
          "description": "ObjectType is the type of the object.\nThe type is used to group multiple objects, for example when checking for object updates.",
          "type": "string",
          "x-go-name": "ObjectType"
        },
        "orgID": {
          "description": "OrgID is the organization ID of the object (an object belongs to exactly one organization).",
          "type": "string",
          "x-go-name": "OrgID"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "ObjectStatus": {
      "description": "ObjectStatus describes the delivery status of an object for a destination\nThe status can be one of the following:\nIndication whether the object has been delivered to the destination\ndelivering - indicates that the object is being delivered\ndelivered - indicates that the object was delivered\nconsumed - indicates that the object was consumed\ndeleted - indicates that this destination acknowledged the deletion of the object\nerror - indicates that a feedback error message was received",
      "type": "object",
      "required": [
        "objectType",
        "objectID",
        "status"
      ],
      "properties": {
        "objectID": {
          "description": "ObjectID is the object ID",
          "type": "string",
          "x-go-name": "ObjectID"
        },
        "objectType": {
          "description": "ObjectType is the object type",
          "type": "string",
          "x-go-name": "ObjectType"
        },
        "orgID": {
          "description": "OrgID is the organization ID of the organization",
          "type": "string",
          "x-go-name": "OrgID"
        },
        "status": {
          "description": "Status is the object status for this destination",
          "type": "string",
          "enum": [
            "delivering",
            "delivered",
            "consumed",
            "deleted",
            "error"
          ],
          "x-go-name": "Status"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "Organization": {
      "description": "Organization contains organization's information",
      "type": "object",
      "properties": {
        "address": {
          "description": "Address is the broker address to be used when connecting to this organization",
          "type": "string",
          "x-go-name": "Address"
        },
        "orgID": {
          "description": "OrgID is the organization ID of the organization",
          "type": "string",
          "x-go-name": "OrgID"
        },
        "password": {
          "description": "Password is the password to be used when connecting to this organization",
          "type": "string",
          "x-go-name": "Password"
        },
        "user": {
          "description": "User is the user name to be used when connecting to this organization",
          "type": "string",
          "x-go-name": "User"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "Policy": {
      "description": "Policy describes a policy made up of a set of properties and constraints",
      "type": "object",
      "properties": {
        "constraints": {
          "description": "Constraints is a set of expressions that form the constraints for the policy",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "Constraints"
        },
        "properties": {
          "description": "Properties is the set of properties for a particular policy",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PolicyProperty"
          },
          "x-go-name": "Properties"
        },
        "services": {
          "description": "Services is the list of services this object has affinity for",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ServiceID"
          },
          "x-go-name": "Services"
        },
        "timestamp": {
          "description": "Timestamp indicates when the policy was last updated (result of time.Now().UTC().UnixNano())",
          "type": "integer",
          "format": "int64",
          "x-go-name": "Timestamp"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "PolicyProperty": {
      "description": "PolicyProperty is a property in a policy",
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "description": "Name is the name of the property",
          "type": "string",
          "x-go-name": "Name"
        },
        "type": {
          "description": "Type is the type of the property.\nIt is only required where the system can't interpret the value correctly by context.",
          "type": "string",
          "x-go-name": "Type"
        },
        "value": {
          "description": "Value is the value of the property",
          "type": "object",
          "x-go-name": "Value"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "ServiceID": {
      "description": "ServiceID contains the ID of a service to which an object may have affinity for",
      "type": "object",
      "properties": {
        "arch": {
          "description": "Arch is the architecture of the service",
          "type": "string",
          "x-go-name": "Arch"
        },
        "orgID": {
          "description": "OrgID is the organization ID of the service",
          "type": "string",
          "x-go-name": "OrgID"
        },
        "serviceName": {
          "description": "ServiceName is the name of the service",
          "type": "string",
          "x-go-name": "ServiceName"
        },
        "version": {
          "description": "Version is the version of the service",
          "type": "string",
          "x-go-name": "Version"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "UsageInfo": {
      "description": "UsageInfo describes the usage of the sync-service node",
      "type": "object",
      "properties": {
        "clientRequests": {
          "type": "integer",
          "format": "uint64",
          "x-go-name": "ClientRequests"
        },
        "registeredESS": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "RegisteredESS"
        },
        "storedObjects": {
          "type": "integer",
          "format": "uint32",
          "x-go-name": "StoredObjects"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/common"
    },
    "bulkACLUpdate": {
      "description": "bulkACLUpdate is the payload used when performing a bulk update on an ACL (either adding uses to an\nACL or removing users from an ACL.",
      "type": "object",
      "properties": {
        "action": {
          "description": "Action is an action, which can be either add (to add users) or remove (to remove users)",
          "type": "string",
          "x-go-name": "Action"
        },
        "users": {
          "description": "aclUsers is an array of ACL entries to be added or removed from the ACL as appropriate. Don's specify ACLRole if action is \"remove\"",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ACLentry"
          },
          "x-go-name": "Users"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    },
    "bulkDestUpdate": {
      "description": "bulkDestUpdate is the payload used when need to add or remove destinations for an object",
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "x-go-name": "Action"
        },
        "destinations": {
          "description": "Destinations is an array of destinations, each entry is an string in form of \"\u003cdestinationType\u003e:\u003cdestinationID\u003e\"",
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "Destinations"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    },
    "healthReport": {
      "type": "object",
      "properties": {
        "dbHealth": {
          "$ref": "#/definitions/DBHealthStatusInfo"
        },
        "general": {
          "$ref": "#/definitions/HealthStatusInfo"
        },
        "mqttHealth": {
          "$ref": "#/definitions/MQTTHealthStatusInfo"
        },
        "usage": {
          "$ref": "#/definitions/UsageInfo"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    },
    "objectUpdate": {
      "description": "objectUpdate includes the object's metadata and data\nA sync service object includes metadata and optionally binary data.\nWhen an object is created the metadata must be provided. The metadata and the data can then be updated together or one at a time.",
      "type": "object",
      "properties": {
        "data": {
          "description": "Data is a the object's binary data",
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint8"
          },
          "x-go-name": "Data"
        },
        "meta": {
          "$ref": "#/definitions/MetaData"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    },
    "organization": {
      "description": "organization includes the organization's id and broker address",
      "type": "object",
      "properties": {
        "address": {
          "description": "Broker address",
          "type": "string",
          "x-go-name": "Address"
        },
        "org-id": {
          "description": "Organization ID",
          "type": "string",
          "x-go-name": "OrgID"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    },
    "secretObject": {
      "type": "object",
      "title": "secretObject includes the secret key and secret value.",
      "properties": {
        "key": {
          "type": "string",
          "x-go-name": "Key"
        },
        "value": {
          "type": "string",
          "x-go-name": "Value"
        }
      },
      "x-go-package": "github.com/open-horizon/anax/resource"
    },
    "webhookUpdate": {
      "description": "webhookUpdate includes the webhook's action and URL\nA webhook can be used to allow the sync service to invoke actions when new information becomes available.\nAn application can choose between using a webhook and periodically polling the sync service for updates.",
      "type": "object",
      "properties": {
        "action": {
          "description": "Action is an action can be either register (create/update a webhook) or delete (delete the webhook)",
          "type": "string",
          "x-go-name": "Action"
        },
        "url": {
          "description": "URL is the URL to invoke when new information for the object is available",
          "type": "string",
          "x-go-name": "URL"
        }
      },
      "x-go-package": "github.com/open-horizon/edge-sync-service/core/base"
    }
  }
}