API » History » Version 2
Denis Kildishev, 04/21/2020 05:06 PM
1 | 1 | Denis Kildishev | h1. API |
---|---|---|---|
2 | |||
3 | h2. Experimental |
||
4 | |||
5 | h3. Test data |
||
6 | |||
7 | ed612ae4-ced3-408c-8d64-66d87981611f — id of document |
||
8 | 5b9946fe-585c-47f6-93bb-5bb2e37a04d3 — id of new location |
||
9 | b7088d84-9c96-4657-abab-7690585ddd8e — id of requirement |
||
10 | |||
11 | h3. Methods |
||
12 | |||
13 | 2 | Denis Kildishev | GET |
14 | http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f |
||
15 | get document and all locs |
||
16 | |||
17 | 1 | Denis Kildishev | PUT |
18 | http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/addlocation |
||
19 | add location to doc with id before addloc |
||
20 | |||
21 | GET |
||
22 | http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/locations |
||
23 | list all locations |
||
24 | |||
25 | GET |
||
26 | http://localhost:9988/projects/someproject/documents/ed612ae4-ced3-408c-8d64-66d87981611f/contents |
||
27 | get contents of document and all related resourses in form of multidata |
||
28 | have fields |
||
29 | *fileName* — name of xhtml file |
||
30 | *resources* — list of related resources |
||
31 | for example, "imgs/testDoc_html_2f94255ac1355d0d.jpg", "testDoc.xhtml", "imgs/testDoc_html_6a3c8113b28c3ae7.jpg" |
||
32 | and several files. File with html content have name «html» |
||
33 | |||
34 | DELETE |
||
35 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3 |
||
36 | removes location |
||
37 | |||
38 | 2 | Denis Kildishev | GET |
39 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3 |
||
40 | get location |
||
41 | |||
42 | 1 | Denis Kildishev | POST |
43 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/addfragment |
||
44 | BODY |
||
45 | { |
||
46 | 2 | Denis Kildishev | „start“:“0“, |
47 | „end“:“20“ |
||
48 | 1 | Denis Kildishev | } |
49 | adds fragment to location |
||
50 | |||
51 | |||
52 | POST |
||
53 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/removefragment |
||
54 | BODY |
||
55 | { |
||
56 | 2 | Denis Kildishev | „start“:“0“, |
57 | „end“:“20“ |
||
58 | 1 | Denis Kildishev | } |
59 | removes fragment from location |
||
60 | |||
61 | |||
62 | |||
63 | POST |
||
64 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/linkto/b7088d84-9c96-4657-abab-7690585ddd8e |
||
65 | add link between requirement and location |
||
66 | |||
67 | DELETE |
||
68 | http://localhost:9988/projects/someproject/documents/location/5b9946fe-585c-47f6-93bb-5bb2e37a04d3/linkto/b7088d84-9c96-4657-abab-7690585ddd8e |
||
69 | remove link between requirement and location |