From f98a1fa3035fb4834441ead1cce6710739312e14 Mon Sep 17 00:00:00 2001 From: "Carpenter, Adam (CORP)" Date: Fri, 10 Dec 2021 11:35:06 -0500 Subject: docs: add readme for deprov --- .../src/routes/extensions/simple_deprov/README.md | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 angelsharkd/src/routes/extensions/simple_deprov/README.md diff --git a/angelsharkd/src/routes/extensions/simple_deprov/README.md b/angelsharkd/src/routes/extensions/simple_deprov/README.md new file mode 100644 index 0000000..4900075 --- /dev/null +++ b/angelsharkd/src/routes/extensions/simple_deprov/README.md @@ -0,0 +1,61 @@ +# Daemon Extension `simple_deprov` + +This extension implements excruciatingly simple extension de-provisioning. For +example, if an agent was provisioned with a `station-user` and an +`agent-loginid`, you can submit those extensions, their type, and the ACM they +were provision on. They relevant commands to remove those objects will be +executed in parallel, and any errors encountered will be returned. + +## Getting Started + +To enable this feature, compile `angelsharkd` with the `simple_deprov` flag: + +```sh +cargo build --bin angelsharkd --features simple_deprov ... +``` + +## `POST /extensions/deprov` Remove Objects + +The request type is TODO: + +```json +POST /extensions/deprov +[ + { + "station-user": { + "acm": "01", + "ext": "17571230000" + } + }, + { + "agent-loginid": { + "acm": "01", + "ext": "17571240000" + } + } +] +``` + +If all of the deprov commands were successful, the response is an empty array. + +```json +200 OK +[] +``` + +If there were errors running the relevant deprov commands (such as when an +extension does not exist), they are included in the resulting array. + +```json +200 OK +[ + "ACM lab: 1 00000000 309e Extension exists but assigned to a different object", + "ACM lab: 1 00000000 2ed5 Extension assigned as remote extension on the uniform-dialplan form", + "ACM lab: 1 00000000 2ed5 Extension assigned as remote extension on the uniform-dialplan form" +] +``` + +## Logging + +The `deprov` endpoint always returns successfully. Any errors encountered during +the command execution are logged as `ERROR`. -- cgit v1.2.3