Market
To install or uninstall apps in developing applications (for example, third-party Market extensions), developers can use the install and uninstall API provided by the Market.
For how to define and call provider, please refer to Service Provider
Provider from Market
| Group | version | dataType | ops |
|---|---|---|---|
| service.appstore | v1 | app | InstallDevAppUninstallDevApp |
Install
Request
URL:
http://$OS_SYSTEM_SERVER/system-server/v1alpha1/app/service.appstore/v1/InstallDevAppMethod:
POSTHeader
httpX-Authorization: token # auth_token in cookie X-Access-Token: access_token # access token get from authorization ProviderBody (Golang struct as an example)
gotype InstallOptions struct { App string `json:"appName"` //required RepoUrl string `json:"repoUrl"` //required CfgUrl string `json:"cfgUrl"` //optional Version string `json:"version"` //required when upgrading Source string `json:"source"` //required }
Success Responses
gotype InstallationResponse struct { Code int `json:"code"` Msg string `json:"message,omitempty"` Data InstallationResponseData `json:"data"` } type InstallationResponseData struct { UID string `json:"uid"` }
Uninstall
Request
URL:
http://$OS_SYSTEM_SERVER/system-server/v1alpha1/app/service.appstore/v1/UninstallDevAppMethod:
POSTHeader
httpX-Authorization: token # auth_token in cookie X-Access-Token: access_token # access token get from authorization ProviderBody (Golang struct as an example)
gotype UninstallData struct { Name string `json:"name"` //required }
Success Responses
gotype InstallationResponse struct { Code int `json:"code"` Msg string `json:"message,omitempty"` Data InstallationResponseData `json:"data"` } type InstallationResponseData struct { UID string `json:"uid"` }