Help with creating a login_password item via rest api #777
Unanswered
elan-bsaltzman
asked this question in
Q&A
Replies: 3 comments
-
Please try this:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, that worked great! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Should be added to the api docs I guess? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
can you provide an example of a curl command to post - create a login_password type key? I don't understand how to create this, I'm probably missing something here. Thanks for your help.
ubuntuuser@ansible-semaphore-oapi3-21-04-demo2:~$ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxx' -d '{"name": "PAT3","type": "login_password" ,"project_id": 1 }' http://localhost:3000/api/project/1/keys -v
Note: Unnecessary use of -X or --request, POST is already inferred.
< HTTP/1.1 400 Bad Request
< Content-Type: application/json
< Date: Fri, 29 Oct 2021 14:26:30 GMT
< Content-Length: 38
<
{"error":"password can not be empty"}
Beta Was this translation helpful? Give feedback.
All reactions