Skip to content

Using the siegfried server

Richard Lehane edited this page Feb 22, 2015 · 17 revisions

The siegfried server has two modes of identification: GET request, where a file or directory path is given in the URL and the server retrieves the file(s); or POST request, where the file is sent over the network as form-data.

GET request

``GET /identify/URL-safe base64 encoded file name or folder name(?nr=true&format=csv|yaml|json)

E.g. http://localhost:8080/identify/YzpcTXkgRG9jdW1lbnRzXGhlbGxvX3dvcmxkLmRvYw==

Parameters

nr (optional) - this parameter can be used to stop sub-directory recursion when a directory path is given.

format (optional) - this parameter can be used to select the output format (csv, yaml, json). Default is json. Alternatively, HTTP content negotiation can be used.

POST request

POST /identify(?format=csv|yaml|json) Attach a file as form-data with the key "file".

E.g. curl localhost:8080/identify -F [email protected]

Parameters

format (optional) - this parameter can be used to select the output format (csv, yaml, json). Default is json. Alternatively, HTTP content negotiation can be used.

Clone this wiki locally