update
To change the parameters of an app, use the apps/update method.
Only the top user of the service can use this method in Wialon Hosting.
Endpoint
svc=apps/update¶ms={
"id": <long>,
"name": <text>,
"description": <text>,
"url": <text>,
"flags": <uint>,
"langs": <text>,
"sortOrder": <int>,
"requiredServicesList": <text>,
"billingPlans": <text>
}
Parameters
The request must contain all the following parameters. If a parameter isn’t required for your app, specify an empty value for it ("" for text parameters and 0 for numeric ones).
| Parameter | Description |
|---|---|
| id | App ID. You can get it using the apps/list method with "manageMode":1. |
| name | App name. It can’t be empty. |
| description | App description. It’s also used as the description of the app service. You can leave it empty. |
| url | URL where the app is hosted. It must start with http://, https://, or //. |
| flags | App flags (advanced URL parameters). For the possible values, see Flags. Use 0 if you don’t need any of them. |
| langs | Languages of the interface for which the app is available, separated by commas, for example, "en,ru". If the value is empty, the app is available for all languages. |
| sortOrder | Sort order of the app in the list. |
| requiredServicesList | Names of the services required for the app, separated by commas. Each service must be available in your account. Don’t add a comma at the end of the list. You can leave it empty. |
| billingPlans | Names of the billing plans for which the app is available, separated by commas. Each billing plan must exist in your service. You can leave it empty. |
All the parameters are replaced with the new values. To keep the current value of a parameter, specify it in the request. You can get the current values using the apps/list method with "manageMode":1.
If you change the billingPlans parameter, the app.<serviceName> service (the Display in menu:
Response
If the request is completed successfully, the response is returned in the following format:
[
<long>, /* App ID */
{
"name": <text>, /* App name */
"description": <text>, /* App description */
"url": <text>, /* App URL */
"flags": <uint>, /* App flags */
"sortOrder": <int>, /* Sort order */
"serviceName": <text>, /* Name of the app service without the "app." prefix */
"id": <long>, /* App ID */
"langs": <text>, /* Languages of the interface */
"requiredServicesList": <text>, /* Required services */
"billingPlans": <text> /* Billing plans */
}
]
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters, or one of the parameters is missing. |
| 7 | Access denied: the user isn’t the top user of the service, or the service isn’t Wialon Hosting. This code is also returned if the app with the specified ID isn’t found, the name or URL is incorrect, a required service or billing plan isn’t available, or the app can’t be updated. |