-
Notifications
You must be signed in to change notification settings - Fork 57
REST API Fields Request and Response
Rohit Lodha edited this page Apr 5, 2018
·
4 revisions
To use API tool you must be a user. Set up the application by following steps from here, run the application and register.
Url
/api/validate/
Input
-
file
: A file object
Output
-
result
: Result/Errors/Warnings of the verification -
status
: Http Response Status
Example
curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -H "Accept: application/json" http://localhost:8000/api/validate/ | json_pp
Url
/api/compare/
Input
-
file1
: A file object -
file2
: A file object -
rfilename
: Result excel file name ( with or without extension )
Output
-
result
: A link to the result excel file if files are valid and comparison occurs without raising any error otherwise empty -
message
: Error message, if any error occurred while comparing files otherwise empty -
status
: Http Response Status
Example
curl -X POST -u <admin>:<password> -F "file1=@<fileInput1>" -F "file2=<fileInput2>" -F "rfilename=<resultFileName>" -H "Accept: application/json" http://localhost:8000/api/compare/ | json_pp
Url
/api/convert/
Input
-
file
: A file object -
from_format
: Format from which the file is to be converted (See below for available conversion type) -
to_format
: Format to which the file is to be converted -
cfilename
: Result file name ( with or without extension ) -
tagToRdfFormat
: (Optional) Specify the desired output type of RDF ("RDF/XML-ABBREV"; "RDF/XML"; "N-TRIPLET"; "TURTLE"). "RDF/XML-ABBREV" is the default used, if notagToRdfFormat
argument provided
Output
-
result
: A link to the result excel file if files are valid and comparison occurs without raising any error -
message
: Error message, if any error occurred while comparing files -
status
: Http Response Status
Example
curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -F "cfilename=<resultFileNameWithExtension>" -F "from_format=<convertFrom>" -F "to_format=<convertTo>" -H "Accept: application/json" http://localhost:8000/api/convert/ | json_pp
Url
api/check_license/
Input
-
file
: A License file object
Output
-
result
: Result/Errors/Warnings of the Check License -
status
: Http Response Status
Example
curl -X POST -u <admin>:<password> -F "file=@<fileInput>" -H "Accept: application/json" http://localhost:8000/api/check_license/ | json_pp
Http Response Status
- 201 for OK
- 406 for warning raised still file is processed
- 400 for BAD Request
Available Conversion(For Convert tool)
- Tag to RDF
- Tag to Spreadsheet
- RDF to Tag
- RDF to Spreadsheet
- RDF to HTML
- Spreadsheet to Tag
- Spreadsheet to RDF