d4rkstar commented on issue #180: URL: https://github.com/apache/openserverless/issues/180#issuecomment-3476253253
Hello, the documentation is mainly in the project's [README.md](https://github.com/apache/openserverless-admin-api/blob/main/README.md). The `openserverless-admin-api`: **A. exposes a swagger on <host>/system/apidocs (ex. for miniops: https://miniops.me/system/apidocs/)** <img width="1426" height="569" alt="Image" src="https://github.com/user-attachments/assets/b97dca7f-1e64-4aa7-9f92-19029c6926b6" /> **B. has two ENDPOINTS in the Authentication API:** 1. `POST /system/api/v1/auth` - Perform the user Authentication relying on wsku metadata stored into internal CouchDB. The payload is: ``` { "login": "string", "password": "string" } ``` Possible responses: | Status | Example Value | |-------|----------------| | 200 | this will return the user data | | 401 | ```{"message": {}, "status": "string"}``` | Example request for miniops.me: ```bash export PASSWORD=$(<~/.ops/devel.password) curl -X POST "http://miniops.me/system/api/v1/auth" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"login\": \"devel\", \"password\": \"$PASSWORD\"}" ``` 2. `PATCH /system/api/v1/auth/{login}` - Update the user password patching the corresponding wsku/<login> entry. This api requires authentication. Example for miniops: ```bash export OLD_PASSWORD=$(cat ~/.ops/devel.password) export NEW_PASSWORD=$(ops -random --str 8) export TOKEN=`cat ~/.wskprops | grep "AUTH" | cut -d'=' -f2 | xargs -I {}` curl -X PATCH "http://miniops.me/system/api/v1/auth/devel" -H "accept: application/json" -H "Authorization: $TOKEN" -H "Content-Type: application/json" -d "{ \"new_password\": \"$NEW_PASSWORD\", \"password\": \"$OLD_PASSWORD\"}" {"message":"Password updated","status":"ok"} ``` This should be enough. If it's ok for you, close the issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
