API » History » Revision 2
Revision 1 (Denis Kildishev, 04/09/2020 08:45 PM) → Revision 2/6 (Denis Kildishev, 04/21/2020 05:06 PM)
h1. API h2. Experimental h3. Test data ed612ae4-ced3-408c-8d64-66d87981611f — id of document 5b9946fe-585c-47f6-93bb-5bb2e37a04d3 — id of new location b7088d84-9c96-4657-abab-7690585ddd8e — id of requirement h3. Methods GET http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f get document and all locs PUT http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/addlocation add location to doc with id before addloc GET http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/locations list all locations GET http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/contents get contents of document and all related resourses in form of multidata have fields *fileName* — name of xhtml file *resources* — list of related resources for example, "imgs/testDoc_html_2f94255ac1355d0d.jpg", "testDoc.xhtml", "imgs/testDoc_html_6a3c8113b28c3ae7.jpg" and several files. File with html content have name «html» DELETE http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3 removes location GET http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3 get location POST http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/addfragment BODY { „start“:“0“, „end“:“20“ „fragment“:“test“; } adds fragment to location POST http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/removefragment BODY { „start“:“0“, „end“:“20“ „fragment“:“test“; } removes fragment from location POST http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/linkto/b7088d84-9c96-4657-abab-7690585ddd8e add link between requirement and location DELETE http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/linkto/b7088d84-9c96-4657-abab-7690585ddd8e remove link between requirement and location