15
15
16
16
| Route | Description |
17
17
| :--------------------------: | :-----------------------: |
18
- | [ GET /logs/: type ] ( #get-logs ) | Returns logs of all types |
18
+ | [ GET /logs/: type ] ( #get-logstype ) | Returns logs of the specific types |
19
+ | [ GET /logs] ( #get-logs ) | Returns all the logs |
19
20
20
21
---
21
-
22
- ## ** GET /logs/: type **
23
-
24
22
** Note :**
25
23
26
- - This API can only be accessed by super user
24
+ - These API can only be accessed by super user
25
+
26
+ ## ** GET /logs/: type **
27
27
28
28
Returns all logs according to the provided queries and path/named-route param.
29
29
@@ -40,7 +40,7 @@ Returns all logs according to the provided queries and path/named-route param.
40
40
- ** Query**
41
41
42
42
- Optional: ` userId=[string] ` for type = ` archive-details `
43
-
43
+
44
44
- ** Headers**
45
45
None
46
46
- ** Cookie**
@@ -85,3 +85,55 @@ Returns all logs according to the provided queries and path/named-route param.
85
85
"message" : " Something went wrong. Please contact admin"
86
86
}
87
87
```
88
+ ## **GET /logs**
89
+
90
+ Returns all the logs present in the collection.
91
+
92
+ **Query**
93
+
94
+ `dev=[boolean]`
95
+
96
+ Optional: `type=`
97
+ - `CLOUDFLARE_CACHE_PURGED`
98
+ - `PROFILE_DIFF_APPROVED`
99
+ - `PROFILE_DIFF_REJECTED`
100
+ - `extensionRequests`
101
+ - `task`
102
+ - `task-requests`
103
+ - `REQUEST_CREATED`
104
+ - `REQUEST_APPROVED`
105
+ - `REQUEST_REJECTED`
106
+
107
+ - Optional: `format=feed` (returns all the logs in flattend or formatted way)
108
+ - Optional: `page=[integer]` (page can either be 0 or a positive integer. Default value is 0)
109
+ - Optional: `size=[integer]` (size is the number of logs requested per page. Default value is 5)
110
+ - Optional: `next=[string]` (next is the id of the document to get next set of documents of results from that document)
111
+ - Optional: `prev=[string]` (prev is the id of the document to get prev set of documents of results before that document)
112
+
113
+ - **Body**
114
+ None
115
+ - **Headers**
116
+ None
117
+
118
+ - **Cookie**
119
+ rds-session: <JWT SUPERUSER>
120
+
121
+ - **Success Response:**
122
+
123
+ - **Code:** 200
124
+ - **Content:**
125
+ ```json
126
+ {
127
+ "message" : " All Logs fetched successfully" ,
128
+ "data" : [" <LOG_OBJECT>" , " <LOG_OBJECT>...." ],
129
+ "next" : " /logs?dev=true&size=5&next=<document-id>" ,
130
+ "prev" : null
131
+ }
132
+ ```
133
+ - **Error Response:**
134
+ - **Code:** 401
135
+ - **Content:** `{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }`
136
+ - **Code:** 204
137
+ - **Content:** `{ 'statusCode': 204, 'error': 'Not Found', 'message': 'Logs not found' }`
138
+ - **Code:** 500
139
+ - **Content:** `{ 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' }`
0 commit comments