Fix for Penetration test _ Session and cookie management
[vid.git] / docs / offeredapis.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. _offeredapis:
3
4
5 Offered APIs
6 =================
7
8 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
9 | Entity              | Method   | Path Info                                             | Description                                                                              |
10 +=====================+==========+=======================================================+==========================================================================================+
11 | Health Check        | GET      | /healthCheck                                          | The Health Status of the application checks the DB connection.                           |
12 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
13 |                     |          |                                                       | | Used by IDNS for redundancy                                                            |
14 |                     |          |                                                       | |                                                                                        |
15 |                     |          |                                                       | | return response entity:                                                                |
16 |                     |          |                                                       | | - statusCode Either 200 or 500                                                         |
17 |                     |          |                                                       | | - detailedMsg of the result, in case of failure particular error message               |
18 |                     |          |                                                       | |                                                                                        |
19 |                     |          |                                                       | | Expected:                                                                              |
20 |                     |          |                                                       |                                                                                          |
21 |                     |          |                                                       | .. code-block:: javascript                                                               |
22 |                     |          |                                                       |                                                                                          |
23 |                     |          |                                                       |     {                                                                                    |
24 |                     |          |                                                       |       "statusCode": 200,                                                                 |
25 |                     |          |                                                       |       "detailedMsg": "health check succeeded",                                           |
26 |                     |          |                                                       |       "date": current date                                                               |
27 |                     |          |                                                       |     }                                                                                    |
28 |                     |          |                                                       |                                                                                          |
29 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
30 | Health Check        | GET      | rest/healthCheck/{User-Agent}/{X-ECOMP-RequestID}     | The Health Status of the application checks the DB connection                            |
31 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
32 |                     |          |                                                       | | return response entity:                                                                |
33 |                     |          |                                                       | | - statusCode Either 200 or 500                                                         |
34 |                     |          |                                                       | | - detailedMsg of the result, in case of failure particular error message               |
35 |                     |          |                                                       | | - date string indicating the current date & time                                       |
36 |                     |          |                                                       | |                                                                                        |
37 |                     |          |                                                       | | Expected:                                                                              |
38 |                     |          |                                                       |                                                                                          |
39 |                     |          |                                                       | .. code-block:: javascript                                                               |
40 |                     |          |                                                       |                                                                                          |
41 |                     |          |                                                       |    {                                                                                     |
42 |                     |          |                                                       |      "statusCode": 200,                                                                  |
43 |                     |          |                                                       |      "detailedMsg": "health check succeeded",                                            |
44 |                     |          |                                                       |      "date": current date                                                                |
45 |                     |          |                                                       |    }                                                                                     |
46 |                     |          |                                                       |                                                                                          |
47 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
48 | Commit Version      | GET      | /commitInfo                                           | Displays info about the last commit of the running build                                 |
49 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
50 |                     |          |                                                       | | return response entity:                                                                |
51 |                     |          |                                                       | | - commitId full id of the commit                                                       |
52 |                     |          |                                                       | | - commitMessageShort short message from the commit                                     |
53 |                     |          |                                                       | | - commitTime time of the commit                                                        |
54 |                     |          |                                                       | |                                                                                        |
55 |                     |          |                                                       | | Expected:                                                                              |
56 |                     |          |                                                       |                                                                                          |
57 |                     |          |                                                       | .. code-block:: javascript                                                               |
58 |                     |          |                                                       |                                                                                          |
59 |                     |          |                                                       |    {                                                                                     |
60 |                     |          |                                                       |      "commitId": id of the last commit                                                   |
61 |                     |          |                                                       |      "commitMessageShort": short message of the last commit                              |
62 |                     |          |                                                       |      "commitTime": time of the last commit                                               |
63 |                     |          |                                                       |    }                                                                                     |
64 |                     |          |                                                       |                                                                                          |
65 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
66
67
68 .. _vid-maintenance-apis:
69
70 Maintenance APIs
71 ------------------
72
73 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
74 | Maintenance:        | POST     | /maintenance/category_parameter/{categoryName}        | Populate VID Project/Owning entity/Line of Business/Platform drop downs                  |
75 | Category Parameters |          |                                                       |                                                                                          |
76 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+
77 |                     |          |                                                       | ``{categoryName}`` is one of lineOfBusiness, platform, project, owningEntity.            |
78 |                     |          |                                                       |                                                                                          |
79 |                     |          |                                                       | POST body:                                                                               |
80 |                     |          |                                                       |                                                                                          |
81 |                     |          |                                                       | .. code-block:: javascript                                                               |
82 |                     |          |                                                       |                                                                                          |
83 |                     |          |                                                       |    {                                                                                     |
84 |                     |          |                                                       |      "options": [ <list of strings> ]                                                    |
85 |                     |          |                                                       |    }                                                                                     |
86 |                     |          |                                                       |                                                                                          |
87 +---------------------+----------+-------------------------------------------------------+------------------------------------------------------------------------------------------+