@ -20,25 +20,25 @@ Use URI to locate the resource, and use GET to indicate query.
+ When the URI is a type of resource, it means to query a type of resource. For example, the following example indicates paging query `alter-groups`.
+ When the URI is a type of resource, it means to query a type of resource. For example, the following example indicates paging query `alter-groups`.
```
```
Method: GET
Method: GET
/api/dolphinscheduler/alert-groups
/dolphinscheduler/alert-groups
```
```
+ When the URI is a single resource, it means to query this resource. For example, the following example means to query the specified `alter-group`.
+ When the URI is a single resource, it means to query this resource. For example, the following example means to query the specified `alter-group`.
```
```
Method: GET
Method: GET
/api/dolphinscheduler/alter-groups/{id}
/dolphinscheduler/alter-groups/{id}
```
```
+ In addition, we can also express query sub-resources based on URI, as follows:
+ In addition, we can also express query sub-resources based on URI, as follows:
```
```
Method: GET
Method: GET
/api/dolphinscheduler/projects/{projectId}/tasks
/dolphinscheduler/projects/{projectId}/tasks
```
```
**The above examples all represent paging query. If we need to query all data, we need to add `/list` after the URI to distinguish. Do not mix the same API for both paged query and query.**
**The above examples all represent paging query. If we need to query all data, we need to add `/list` after the URI to distinguish. Do not mix the same API for both paged query and query.**
```
```
Method: GET
Method: GET
/api/dolphinscheduler/alert-groups/list
/dolphinscheduler/alert-groups/list
```
```
### ② Create - POST
### ② Create - POST
@ -48,13 +48,13 @@ Use URI to locate the resource, use POST to indicate create, and then return the
@ -62,7 +62,7 @@ Use URI to locate the resource, use PUT to indicate modify.
+ modify an `alert-group`
+ modify an `alert-group`
```
```
Method: PUT
Method: PUT
/api/dolphinscheduler/alter-groups/{alterGroupId}
/dolphinscheduler/alter-groups/{alterGroupId}
```
```
### ④ Delete -DELETE
### ④ Delete -DELETE
@ -71,20 +71,28 @@ Use URI to locate the resource, use DELETE to indicate delete.
+ delete an `alert-group`
+ delete an `alert-group`
```
```
Method: DELETE
Method: DELETE
/api/dolphinscheduler/alter-groups/{alterGroupId}
/dolphinscheduler/alter-groups/{alterGroupId}
```
```
+ batch deletion: batch delete the id array,we should use POST. **(Do not use the DELETE method, because the body of the DELETE request has no semantic meaning, and it is possible that some gateways, proxies, and firewalls will directly strip off the request body after receiving the DELETE request.)**
+ batch deletion: batch delete the id array,we should use POST. **(Do not use the DELETE method, because the body of the DELETE request has no semantic meaning, and it is possible that some gateways, proxies, and firewalls will directly strip off the request body after receiving the DELETE request.)**
```
```
Method: POST
Method: POST
/api/dolphinscheduler/alter-groups/batch-delete
/dolphinscheduler/alter-groups/batch-delete
```
```
### ⑤ Others
### ⑤ Partial Modifications -PATCH
Use URI to locate the resource, use PATCH to partial modifications.
```
Method: PATCH
/dolphinscheduler/alter-groups/{alterGroupId}
```
### ⑥ Others
In addition to creating, deleting, modifying and quering, we also locate the corresponding resource through url, and then append operations to it after the path, such as:
In addition to creating, deleting, modifying and quering, we also locate the corresponding resource through url, and then append operations to it after the path, such as: