Project

Profile

Help

Issue #1133

_href missing from response body for PUT /v2/users/<user_id>/ endpoint

Added by amacdona@redhat.com about 6 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

Description

We include an `_href` field in almost every other endpoint in our API, including the other users endpoints.

$ http --json -a admin:admin --verify=no PUT 'https://localhost/pulp/api/v2/users/test/' delta:='{"name": "newname"}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 110
Content-Type: application/json; charset=utf-8
Date: Sun, 12 Jul 2015 15:53:17 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.3.2 Python/2.7.8
{
    "_id": {
        "$oid": "55a28b48e138230a42d70f2a"
    }, 
    "_ns": "users", 
    "login": "test", 
    "name": "newname", 
    "roles": []
}

Expected:


$ http --json -a admin:admin --verify=no PUT 'https://localhost/pulp/api/v2/users/test/' delta:='{"name": "newname"}'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 147
Content-Type: application/json; charset=utf-8
Date: Sun, 12 Jul 2015 15:53:34 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.3.2 Python/2.7.8

{
    "_href": "/pulp/api/v2/users/test/", 
    "_id": {
        "$oid": "55a28b48e138230a42d70f2a"
    }, 
    "_ns": "users", 
    "login": "test", 
    "name": "newname", 
    "roles": []
}

This will be corrected by creating a users serializer in the users collection Mongoengine conversion story: https://pulp.plan.io/issues/788


Related issues

Related to Pulp - Refactor #788: Convert the 'users' collection to a mongoengine modelCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 2a0a69ce View on GitHub
Added by amacdona@redhat.com almost 6 years ago

Convert the users collection to mongoengine

closes #788 closes #1133

Revision 2a0a69ce View on GitHub
Added by Austin Macdonald almost 6 years ago

Convert the users collection to mongoengine

closes #788 closes #1133

History

#1 Updated by amacdona@redhat.com about 6 years ago

  • Related to Refactor #788: Convert the 'users' collection to a mongoengine model added

#2 Updated by jortel@redhat.com about 6 years ago

  • Triaged changed from No to Yes
  • Tags Easy Fix added

#3 Updated by amacdona@redhat.com almost 6 years ago

  • Platform Release set to 2.8.0

#4 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from MODIFIED to 5

#7 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF