Skip to content

API, /hardware Status label type is required #10134

Answered by Lokiarmos
Lokiarmos asked this question in Q&A
Discussion options

You must be logged in to vote

So i figured it out, it is the order which the data is stored in the JSON object,
i used curl on the Snipe server and tested it, entry at a time and finally got it work with this value
{
"archived": false,
"depreciate": false,
"requestable": false,
"last_audit_date": "null",
"asset_tag": "10981-PS",
"status_id": 1,
"model_id": 302
}

the interesting thing was that if i put model_id before status_id it would throw an issue, and if model_id was before asset_tag it would throw an error for model_id. the interesting thing is appear that all 3 need to be in order as they are in the API Documents but you can have archived, depreciate and other fields in front of it but asset_tag, status_id and m…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Lokiarmos
Comment options

Comment options

You must be logged in to vote
1 reply
@boring10
Comment options

Answer selected by Lokiarmos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants