...
Sunbird can expose an API to do user/org hard delete. Api structure will be as follow:
Code Block | ||||
---|---|---|---|---|
| ||||
Method : DELETE URL: v1/data/delete Request body : { "request": { "objectIds" : [], "objectType" : "" } } Response body: { "id": "api.data.delete", "ver": "v1", "ts": "2019-02-06 05:21:18:948+0000", "responseCode": "OK", "result": { "response": { } } } |
Solution 2:
Sunbird will expose different end point to delete object based on object type. Api structure will be as follow:
Code Block | ||||
---|---|---|---|---|
| ||||
Method : DELETE
URL: v1/user/delete
Request body :
{
"request": {
"userIds" : []
}
}
Response body:
{
"id": "api.user.delete",
"ver": "v1",
"ts": "2019-02-06 05:21:18:948+0000",
"responseCode": "OK",
"result": {
"response": {
}
}
}
-- Similar it will have for org delete as well
URL: v1/org/delete
Request body :
{
"request": {
"orgIds" : []
}
}
|
Since this api will do all operations in background, it will do initial request validation and all other validation will be handle in background.
Pros | Cons |
---|---|
Api will have more control on consumer | |
Easy to generate Audit logs | |
Easy for consumer to invoke | |
Solution
...
3 :
Write an ETL job to preform same operations. ETL job will do following operations:
User | Organisation |
---|---|
|
|
Pros | Cons |
---|---|
Standalone job to perform this operation. | Difficult to control caller , Ex: caller is not identified by sunbird |
Can't reuse it for later use case: Example: Org admin want's to delete some user or delete some of the org |
Solution
...
4 :
Provide sequence of CQL queries and curl command to do all above operations.
...