{
  "name": "CBStoreSubsystem",
  "id": "http://com.ingrammicro/appstore/cbstore-subsystem/1.0",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/resource/1.0"
  ],
  "access": {
    "global": true
  },
  "operations": {
    "applications": {
      "path": "/applications",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "CBStoreApplication"
        }
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "application": {
      "path": "/applications/{appId}",
      "verb": "GET",
      "response": {
        "type": "CBStoreApplicationInformation"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "appId": {
          "kind": "path",
          "type": "string",
          "required": true
        }
      }
    },
    "install": {
      "path": "/applications/{appId}/install",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "appId": {
          "kind": "path",
          "type": "string",
          "required": true
        },
        "payload": {
          "kind": "body",
          "type": "object"
        }
      }
    },
    "uninstall": {
      "path": "/applications/{appId}/uninstall",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "appId": {
          "kind": "path",
          "type": "string",
          "required": true
        }
      }
    },
    "update": {
      "path": "/applications/{appId}/update",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "appId": {
          "kind": "path",
          "type": "string",
          "required": true
        },
        "payload": {
          "kind": "body",
          "type": "object"
        }
      }
    }
  },
  "structures": {
    "CBStoreApplication": {
      "type": "object",
      "properties": {
        "storeAppId": {
          "type": "string",
          "description": "App identifier (unique in subsystem)",
          "required": true
        },
        "status": {
          "type": "string",
          "description": "App status (installed_latest represents installed, regardless of version)",
          "required": true,
          "enum": [
            "not_installed",
            "provisioning",
            "installed_latest",
            "installation_not_available"
          ]
        },
        "version": {
          "type": "string",
          "description": "Installed version. Should be returned if app is installed and versionDisplayMode is not display_none"
        },
        "versionDisplayMode": {
          "type": "string",
          "description": "Allows to specify if versions are not supported (and should not be displayed). If not set, display_all is assumed",
          "enum": [
            "display_all",
            "display_none"
          ]
        },
        "applicationViewId": {
          "type": "string",
          "description": "UX1 view id of the installed app"
        },
        "applicationViewType": {
          "type": "string",
          "description": "Type of view that is opened during navigation to applicationViewId",
          "enum": [
            "open",
            "manage"
          ]
        }
      }
    },
    "AttachmentInfo": {
      "type": "object",
      "properties": {
        "mimeType": {
          "type": "string",
          "description": "Attachment mime type"
        },
        "fileName": {
          "type": "string",
          "description": "If specified, attachment with this exact filename is expected"
        }
      }
    },
    "CBStoreApplicationInformation": {
      "type": "object",
      "properties": {
        "storeAppId": {
          "type": "string",
          "description": "App identifier (unique in subsystem)",
          "required": true
        },
        "status": {
          "type": "string",
          "description": "App status (installed_latest represents installed, regardless of version)",
          "required": true,
          "enum": [
            "not_installed",
            "provisioning",
            "installed_latest",
            "installation_not_available"
          ]
        },
        "version": {
          "type": "string",
          "description": "Installed version. Should be returned if app is installed and versionDisplayMode is not display_none"
        },
        "versionDisplayMode": {
          "type": "string",
          "description": "Allows to specify if versions are not supported (and should not be displayed). If not set, display_all is assumed",
          "enum": [
            "display_all",
            "display_none"
          ]
        },
        "applicationViewId": {
          "type": "string",
          "description": "UX1 view id of the installed app"
        },
        "applicationViewType": {
          "type": "string",
          "description": "Type of view that is opened during navigation to applicationViewId",
          "enum": [
            "open",
            "manage"
          ]
        },
        "installationMethod": {
          "type": "string",
          "description": "App installation method",
          "required": true,
          "enum": [
            "api",
            "view",
            "view_and_api",
            "not_available"
          ]
        },
        "uninstallationMethod": {
          "type": "string",
          "description": "App uninstallation method",
          "required": true,
          "enum": [
            "api",
            "view",
            "view_and_api",
            "not_available"
          ]
        },
        "appId": {
          "type": "string",
          "description": "App id for installation shared component"
        },
        "installComponentName": {
          "type": "string",
          "description": "Component name for installation shared component"
        },
        "statusReasonMessage": {
          "type": "string",
          "description": "Status reason message"
        },
        "statusReasonMessageParameters": {
          "type": "object",
          "description": "Key-value dictionary with parameters for status reason message"
        },
        "uninstallStatusReasonMessage": {
          "type": "string",
          "description": "Uninstall status reason message"
        },
        "uninstallStatusReasonMessageParameters": {
          "type": "object",
          "description": "Key-value dictionary with parameters for uninstall status reason message"
        },
        "attachmentInfo": {
          "type": "AttachmentInfo",
          "description": "Information about attachment expected by install method"
        }
      }
    }
  }
}