Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for resful api, add tokens #9

Open
xmacan opened this issue Jun 7, 2024 · 1 comment
Open

Add test for resful api, add tokens #9

xmacan opened this issue Jun 7, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@xmacan
Copy link
Member

xmacan commented Jun 7, 2024

No description provided.

@xmacan
Copy link
Member Author

xmacan commented Aug 7, 2024

I expected that adding a test rest api to the servcheck would be easy. But each of my devices works differently. I think I'm giving up. I'd have to frequently store names and passwords in a database, make some sort of wizard on top of curl to allow different ways of logging in:

curl --request POST
--url https://<Director_IP_address>:4443/c/router
--header "content-type: application/json"
--cookie-jar cookies.txt
--data "{
"action": "AuthenticationManagement",
"method": "login",
"data": ["admin", null, false],
"type": "rpc",
"tid": 1}"

curl --noproxy "192.0.2.5" -k -X POST
-c /tmp/auth_cookie -H 'Content-Type: multipart/form-data'
"https://192.0.2.5/rest/v1/login"
-F 'username=test' -F 'password=test'

...

@xmacan xmacan added enhancement New feature or request help wanted Extra attention is needed labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant