Enable HTTP Script Commands under the app’s scripting settings. This is enabled by default in newer versions. Bring the app to the foreground before each command. The legacy ZORRO example uses runApp("zorro");.
On the phone, use http://127.0.0.1:8844/cmd?. From a computer on the same network, replace 127.0.0.1 with the phone’s LAN IP address.
| Action | Request |
|---|---|
| Create a new record | http://127.0.0.1:8844/cmd?fun=newrecord |
| Set system parameters (v4.2.7) | http://127.0.0.1:8844/cmd?fun=setparam&fakeapps=com.z.go1,com.z.go2&backupapps=com.z.go1,com.z.go2fakeapps: comma-separated bundle IDs to refresh without backup (black check marks). backupapps: bundle IDs to refresh with backup (red check marks). |
| Next record | http://127.0.0.1:8844/cmd?fun=nextrecord |
| Activate a record | http://127.0.0.1:8844/cmd?fun=activerecord&record=RECORD_ID |
| Delete a record | http://127.0.0.1:8844/cmd?fun=deleterecord&record=RECORD_ID |
| List all record names (v2.9.1) | http://127.0.0.1:8844/cmd?fun=getallrecords |
| Get current record name (v2.9.1) | http://127.0.0.1:8844/cmd?fun=getcurrentrecord |
| Set current coordinates | http://127.0.0.1:8844/cmd?fun=setcurrentrecordlocation&location=LONGITUDE,LATITUDECoordinates use longitude,latitude or longitude_latitude. |
| Clear current coordinates | http://127.0.0.1:8844/cmd?fun=clearcurrentrecordlocation |
| Reset location from IP (v4.3.7) | http://127.0.0.1:8844/cmd?fun=resetlocationbyip |
| Get current parameters (v2.9.1) | http://127.0.0.1:8844/cmd?fun=getcurrentrecordparamReturned parameter names can be used with the change command. |
| Change current parameters | http://127.0.0.1:8844/cmd?fun=change&idfa=AFF18523-B306-4E04-BB4D-2DD6CE48C694&idfv=ADF28523-B306-4E04-BB4D-2DD6CE48C694&os=12.1.3&product=iPhone9%2c2&remark=xxxxSupply only parameters to change and URL-encode values. remark adds a note below the record, equivalent to the swipe-to-add-note action. |
HTTP calls return JSON synchronously: {"retcode": NUMBER, "msg": "RESULT_DESCRIPTION"}. The legacy ZORRO result file is /var/mobile/zorroresult.plist. For getcurrentrecordparam, it also contains a data node with the parameters.
Result codes: 1 completed successfully; 0 failed; 100 not activated or expired; 10 invalid runtime environment. Code 2 means still running for file-based results and is not returned by the synchronous HTTP interface.
name: device name (DeviceName), such as “My iPhone”. os: system version, such as 11.2.6; changing it also resets SystemBuildVersion and related Safari parameters. idfa: AdvertisingIdentifier. idfv: IdentifierForVendor. product: ProductType, such as iPhone8,1; changing it also updates HWModel, screen resolution and related values. UniqueDeviceID: UDID, supported from v4.2.7 for enterprise apps that call the private function. remark: record note. Other parameters are not documented here.