Files
syncthing/rest/svc-deviceid-get.rst
T
Stefan Tatschner e5242d68b4 Change .. code:: to .. code-block::
Sphinx uses .. code-block:: directives to enable highlighting:
http://sphinx-doc.org/markup/code.html#directive-code-block

Use

  for i in *.rst; do
        sed -i 's/code::/code-block::/g' $i
    done

to update these strings to enable proper highlighting.

Note: A have disabled the windows "bash" one, because the highlighting
is broken anyway...
2015-05-29 16:24:58 +02:00

20 lines
683 B
ReStructuredText

GET /rest/svc/deviceid
======================
Verifies and formats a device ID. Accepts all currently valid formats
(52 or 56 characters with or without separators, upper or lower case,
with trivial substitutions). Takes one parameter, ``id``, and returns
either a valid device ID in modern format, or an error.
.. code-block:: bash
$ curl -s http://localhost:8384/rest/svc/deviceid?id=1234 | json
{
"error": "device ID invalid: incorrect length"
}
$ curl -s http://localhost:8384/rest/svc/deviceid?id=p56ioi7m--zjnu2iq-gdr-eydm-2mgtmgl3bxnpq6w5btbbz4tjxzwicq | json
{
"id": "P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2"
}