Changes between Version 14 and Version 29 of Help/RemoteControlCommands


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/RemoteControlCommands

    v14 v29  
    66A complete list of commands and mandatory/optional parameters is shown at http://127.0.0.1:8111/ (when JOSM is running).
    77
    8 === {{{load_and_zoom}}} ===
     8=== {{{load_and_zoom}}} ===#load_and_zoom
    99Instructs JOSM to download a bounding box from the API, zoom to the downloaded area and optionally select one or more objects.
    1010{{{
     
    1919|| `new_layer` ||  O  || If '''true''', downloads to a new layer. (Overwrites user preference, see #19308) ||
    2020|| `layer_name` ||  O  || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
    21 || `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [[Action/LockedLayer|locked]] ||
    22 || `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [[Help/Action/BlockDownload|blocked]] ||
    23 || `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [[Help/Action/EncourageDiscourageUpload|blocked or discouraged]] ||
     21|| `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [wikitr:/Help/Action/LockedLayer locked] ||
     22|| `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [wikitr:/Help/Action/BlockDownload blocked] ||
     23|| `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [wikitr:/Help/Action/EncourageDiscourageUpload blocked or discouraged] ||
    2424|| `addtags` ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ||
    2525|| `select` ||  O  || Comma-separated list of objects that should be selected. Object specifiers are combinations of the words "way", "node", or "relation", and the numerical object id. Example: {{{select=way38473,node12399,node54646}}}. Since r13212 the special value **currentselection** let JOSM keep its previous selection. ||
     
    2727|| `changeset_comment` ||  O  || Comment of the changeset ||
    2828|| `changeset_source` ||  O  || Source of the changeset ||
    29 || `changeset_hashtags` ||  O  || Hashtags of the changeset (since r13109) ||
    30 || `changeset_tags` ||  O  || Optional parameter to add changeset tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". This command uses the same syntax as the [#addtags addtags] parameter. `changeset_comment` and `changeset_source` currently override the `comment` and `source` tags passed in this parameter, but this may change in the future. First available in r15316. ||
    31 || `search` ||  O  || Search objects in the current data layer. See [wiki:/Help/Action/Search Search] ||
     29|| `changeset_hashtags` ||  O  || Hashtags of the changeset ''(since r13109)'' ||
     30|| `changeset_tags` ||  O  || Optional parameter to add changeset tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". This command uses the same syntax as the [#addtags addtags] parameter. `changeset_comment` and `changeset_source` currently override the `comment` and `source` tags passed in this parameter, but this may change in the future. ''(since r15316)'' ||
     31|| `search` ||  O  || Search objects in the current data layer. See [wikitr:/Help/Action/Search Search] ||
    3232
    3333==== Example ====
     
    5858|| `new_layer` ||  O  || If '''true''', downloads to a new layer. (Overwrites user preference, see #19308) ||
    5959|| `layer_name` ||  O  || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
    60 || `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [[Action/LockedLayer|locked]] ||
    61 || `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [[Help/Action/BlockDownload|blocked]] ||
    62 || `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [[Help/Action/EncourageDiscourageUpload|blocked or discouraged]] ||
     60|| `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [wikitr:/Help/Action/LockedLayer locked] ||
     61|| `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [wikitr:/Help/Action/BlockDownload blocked] ||
     62|| `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [wikitr:/Help/Action/EncourageDiscourageUpload blocked or discouraged] ||
    6363|| `changeset_tags` ||  O  || Optional parameter to add changeset tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". This command uses the same syntax as the [#addtags addtags] parameter. First available in r16324. ||
    6464
    6565=== {{{load_data}}} ===
    66 (since version 1.6)
     66''(since version 1.6)''
     67
    6768Instruct JOSM to load OSM data, directly encoded in the URL, instead of coming from an external file. This is only suited for smaller data (some browsers limit the maximum URL length), but it is faster (since no download is required), and in many cases where dynamically generated data is needed, it's easier to generate.
    6869
     
    7677|| `mime_type` ||  O  || Mime type of the data, by default this is "application/x-osm+xml", which is currently the only supported mime type, but in the future other mime types could be supported ||
    7778|| `layer_name` ||  O  || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
    78 || `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [[Action/LockedLayer|locked]] ||
    79 || `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [[Help/Action/BlockDownload|blocked]] ||
    80 || `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [[Help/Action/EncourageDiscourageUpload|blocked or discouraged]] ||
     79|| `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [wikitr:/Help/Action/LockedLayer locked] ||
     80|| `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [wikitr:/Help/Action/BlockDownload blocked] ||
     81|| `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [wikitr:/Help/Action/EncourageDiscourageUpload blocked or discouraged] ||
    8182
    8283=== {{{open_file }}} ===
     
    9899where
    99100||= **Parameter** =||= **Required/ \\ Optional** =||= **Meaning** =||
    100 || `url` ||  R  || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
     101|| `url` ||  R or `id`  || The Request URL, including patterns. Must be the last parameter, everything after "&url=" is interpreted as URL, even if it contains "&" characters.  ||
     102|| `id` ||  R or `url`  || The imagery ID in JOSM, see [[Maps]] (since r17655).  ||
    101103|| `title` ||  O  || The display name of the layer ||
    102 || `type` ||  O  || Type of the layer. Possible values are `wms`, `tms` and `bing` [[BR]] (since !RemoteControl Version 1.3) ||
     104|| `type` ||  O  || Type of the layer. Possible values are `wms`, `tms` and `bing` ''(defaults to `wms`, since !RemoteControl Version 1.3)'' ||
    103105|| `cookies` ||  O  ||  ||
    104 || `min_zoom` ||  O  || The minimum zoom level [[BR]] (since !RemoteControl Version 1.4) ||
    105 || `max_zoom` ||  O  || The maximum zoom level. For higher scales, the images of the maximum level is enlarged \\ (since !RemoteControl Version 1.4) ||
    106 
    107 
    108 mandatory parameters: url
    109 optional parameters: title, type, cookies, min_zoom, max_zoom
     106|| `min_zoom` ||  O  || The minimum zoom level ''(since !RemoteControl Version 1.4)'' ||
     107|| `max_zoom` ||  O  || The maximum zoom level. For higher scales, the images of the maximum level is enlarged ''(since !RemoteControl Version 1.4)'' ||
     108|| `name` ||  O  || alias for `title` ''(since !RemoteControl Version 1.10)'' ||
     109|| `attribution-text` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     110|| `attribution-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     111|| `bestMarked` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     112|| `bounds` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     113|| `category` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     114|| `country-code` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     115|| `customHttpHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     116|| `date` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     117|| `default-layers` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     118|| `description` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     119|| `eula` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     120|| `icon` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     121|| `id` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     122|| `logo-image` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     123|| `logo-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     124|| `metadataHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     125|| `minimumTileExpire` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     126|| `modTileFeatures` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     127|| `noTileChecksums` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     128|| `noTileHeaders` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     129|| `overlay` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     130|| `permission-reference-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     131|| `pixel-per-eastnorth` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     132|| `projections` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     133|| `shapes` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     134|| `terms-of-use-text` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     135|| `terms-of-use-url` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     136|| `tileSize` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     137|| `transparent` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     138|| `type` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
     139|| `valid-georeference` ||  O  || ''(since !RemoteControl Version 1.10)'' ||
    110140
    111141==== Examples ====
    112 * TMS layer "osm" {{{http://tile.openstreetmap.org/{zoom}/{x}/{y}.png}}}
    113 
    114 [http://localhost:8111/imagery?title=osm&type=tms&url=http://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png]
     142* TMS layer "osm" {{{https://tile.openstreetmap.org/{zoom}/{x}/{y}.png}}}
     143
     144http://localhost:8111/imagery?title=osm&type=tms&min_zoom=1&max_zoom=20&url=https://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png
    115145
    116146* WMS layer "landsat" {{{http://irs.gis-lab.info/?layers=landsat&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox} }}}
    117 [http://localhost:8111/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D]
     147http://localhost:8111/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D
     148
     149* "Bing" layer
     150
     151http://localhost:8111/imagery?id=Bing
    118152
    119153
     
    129163|| `addtags` ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ||
    130164|| `relation_members` ||  O  || If '''true''', downloads objects members of the relations as well. ||
    131 || `referrers` ||  O  || If '''true''', downloads referrers of the object as well. I.e. parent relations, and for nodes, additionally, parent ways. (since r6782) ||
     165|| `referrers` ||  O  || If '''true''', downloads referrers of the object as well. I.e. parent relations, and for nodes, additionally, parent ways. ''(since r6782)'' ||
    132166|| `layer_name` ||  O  || Only valid when the data is loaded in a new layer; Gives JOSM a hint on how to name the layer ||
    133 || `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [[Action/LockedLayer|locked]] ||
    134 || `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [[Help/Action/BlockDownload|blocked]] ||
    135 || `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [[Help/Action/EncourageDiscourageUpload|blocked or discouraged]] ||
     167|| `layer_locked` ||  O  || Only valid when the data is loaded in a new layer; If '''true''', new layer is [wikitr:/Help/Action/LockedLayer locked] ||
     168|| `download_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' , download is [wikitr:/Help/Action/BlockDownload blocked] ||
     169|| `upload_policy` ||  O  || Only valid when the data is loaded in a new layer; If '''never''' or '''false''', upload is [wikitr:/Help/Action/EncourageDiscourageUpload blocked or discouraged] ||
    136170
    137171==== Example ====
     
    151185|| `lon` ||  R  || The longitude of the node ||
    152186|| `lat` ||  R  || The latitude of the node ||
    153 || `addtags` \\ ''(since v1.5)'' ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ||
     187|| `addtags` ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ''(since v1.5)'' ||
    154188
    155189==== Example ====
     
    168202||= **Parameter** =||= **Required/ \\ Optional** =||= **Meaning** =||
    169203|| `way` ||  R  || Pairs of latitude, longitude coordinates separated by semicolon. ||
    170 || `addtags` ''(since v1.5)'' ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ||
     204|| `addtags` ||  O  || Optional parameter to add tags. The key and value is separated by "=" and multiple tags can be separated by a Pipe "|". See [#addtags details]. ''(since v1.5)'' ||
    171205
    172206==== Example ====
     
    194228      "minor": 0
    195229   },
    196    "application": "JOSM RemoteControl"
     230   "application": "JOSM RemoteControl",
     231   "version": 16587, // JOSM version (since r16587)
     232   "osm_server": "default" // indicates that the user is using the OSM server by "default" or "custom" (since r19416)
    197233}
    198234}}}
     
    256292}}}
    257293
     294=== {{{openapi.json}}} ===
     295JOSM RemoteControl as [https://swagger.io/specification/ OpenAPI Specification]
     296
     297* http://localhost:8111/openapi.json
     298* https://petstore.swagger.io/?url=http://localhost:8111/openapi.json
     299
    258300
    259301=== Adding, changing or deleting tags === #addtags
     
    272314[http://localhost:8111/load_and_zoom?addtags=wikipedia%3Ade=%7Cmaxspeed=&select=way23071688,way23076176,way23076177,&left=13.739727546842&right=13.740890970188&top=51.049987191025&bottom=51.048466954325].
    273315
     316=== {{{export}}} ===
     317''(since JOSM r19425)''
     318
     319Returns the content of the active layer in the `.osm` format
     320{{{
     321GET /export
     322}}}
     323
     324If there is no active layer, or it is in the process of uploading changes, an empty response will be returned.
     325
     326
    274327=== Other commands ===
    275328Remotecontrol allows other plugins to add additional commands. The other registers a RequestHandler class and specifies a command to be handled by this class. The command syntax has to be defined by the other plugin.
    276329
    277 Reverter plugin since version 27091 makes use of this feature.
    278 
     330==== Reverter ====
     331Reverter plugin since version 27091 makes use of this feature. See [source:osm/applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetHandler.java RevertChangesetHandler.java].
     332
     333==== Mapillary ====
     334See [https://github.com/JOSM/Mapillary/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/remotecontrol/MapillaryRemoteControl.java MapillaryRemoteControl.java].
     335Either `sequence` or `photo` must be specified, but not both. Since the remote control class was written for multiple imagery sources, the id for either `sequence` or `photo` ''must'' be prefixed with `Mapillary/`.
     336
     337==== Compilation of plugin remote control commands ====
     338||= Plugin =||= **Command** =||= **Parameter** =||= **Required/ \\ Optional** =||= **Meaning** =||
     339|| Reverter || `revert_changeset` ||  ||  || Base command to revert a changeset ||
     340|| || || `id` ||  R  || The changeset id to use (should match regex `[0-9]+`). Since version 36321, you can pass multiple ids separated by commas. ||
     341|| MapWithAI || `mapwithai` || || || Base command to download MapWithAI data ||
     342|| || || `max_obj` ||  O  || Set the maximum number of objects the user can add per action from the MapWithAI layer. Should match regex `[0-9]+`. ||
     343|| || || `switch_layer` ||  O  || Use if you want to force users to automatically switch layers when they add data to OSM. Takes `true`/`false`. ||
     344|| || || `bbox` ||  O  || The bbox to download (`lat,lon,lat,lon` -- assumes the bbox will not cross meridian) ||
     345|| || || `crop_bbox` ||  O  || Crop downloaded MapWithAI data (roads only) to this bbox. Tasking managers may also generate a well-known layer. ||
     346|| || || `url` ||  O  || The URL to use instead of the built-in data sources. Useful for imports (please make certain you went through the import process). ||
     347|| || || `source` ||  O  || The source to use when uploading to OSM (changeset source) ||
     348|| Mapillary || `photo` || || || Base command to download a Mapillary photo (may be extended to other imagery sources in the future) ||
     349|| || || `photo` ||  R/O  || The id of the image to show and download. Either this or `sequence` must be specified. ||
     350|| || || `sequence` ||  R/O  || The id of the sequence to show and download. First image is shown in image viewer. ||
    279351----
    280352Back to [wikitr:/Help/Preferences/RemoteControl Remote control preferences] \\