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

Trying to create new kv pair on existing system via the API yields "Cannot create a new item, only existing items may be updated." #4

Open
zeeman opened this issue Nov 9, 2013 · 0 comments

Comments

@zeeman
Copy link
Owner

zeeman commented Nov 9, 2013

This is for my currently private branch eav-api-writable.

zane@zane-OptiPlex-990 (~/cyder)$ curl -v -X PUT -H "Content-Type: application/json" -H "Authorization: Token 18d0e36dad2b2ae5818954eef8d2a091452d23ec" --data '{"name": "test-system", "systemav_set":[{"attribute":"Operating System", "value": "windoze"}]}' http://127.0.0.1:8000/api/v1/core/system/12541/
* About to connect() to 127.0.0.1 port 8000 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)
> PUT /api/v1/core/system/12541/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:8000
> Accept: */*
> Content-Type: application/json
> Authorization: Token 18d0e36dad2b2ae5818954eef8d2a091452d23ec
> Content-Length: 94
>
* upload completely sent off: 94 out of 94 bytes
* HTTP 1.0, assume close after body
< HTTP/1.0 400 BAD REQUEST
< Date: Sat, 09 Nov 2013 00:33:01 GMT
< Server: WSGIServer/0.1 Python/2.7.4
< Vary: Accept, Cookie
< Content-Type: application/json
< Allow: GET, PUT, DELETE, HEAD, OPTIONS, PATCH
< Set-Cookie:  cyder=90e0bb240817d1006100e991563df5c8; expires=Sat, 23-Nov-2013 00:33:01 GMT; httponly; Max-Age=1209600; Path=/
<
* Closing connection 0
{"systemav_set": [{"non_field_errors": ["Cannot create a new item, only existing items may be updated."]}]}
zeeman pushed a commit that referenced this issue Sep 24, 2014
Assorted DNS tests (for real this time)
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