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

API documentation: curl examples for Asset delete and decommission miss 'reason' #603

Open
justme-justus opened this issue Sep 26, 2019 · 0 comments

Comments

@justme-justus
Copy link

justme-justus commented Sep 26, 2019

Following the curl examples on

https://tumblr.github.io/collins/api.html

I expect the API to delete my asset with

# curl --basic -u blake:admin:first -d nuke=true -X DELETE http://localhost:9000/api/asset/testswitch {"status":"error","data":{"message":"Reason must be specified."}}

Same counts for decommissioning

# curl --basic -u blake:admin:first -d status='Decommissioned' -X POST http://localhost:9000/api/asset/testswitch {"status":"error","data":{"message":"No reason for the status change was specified."}}

Adding -d reason="foobar" makes the API call work for both actions.

# curl --basic -u blake:admin:first -d status='Decommissioned' -d reason='foobar' -X POST http://localhost:9000/api/asset/testswitch {"status":"success:ok","data":{"SUCCESS":true}}

curl --basic -u blake:admin:first -d nuke=true -d reason='foobar' -X DELETE http://localhost:9000/api/asset/testswitch {"status":"success:ok","data":{"SUCCESS":true}}

Please fix documentation.

Thanks in advance and best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant