Project

Profile

Help

Issue #1133

closed

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

Added by amacdona@redhat.com over 9 years ago. Updated over 5 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 - CURRENTRELEASEamacdona@redhat.com

Actions
Actions #1

Updated by amacdona@redhat.com over 9 years ago

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

Updated by jortel@redhat.com over 9 years ago

  • Triaged changed from No to Yes
  • Tags Easy Fix added
Actions #3

Updated by amacdona@redhat.com over 9 years ago

  • Platform Release set to 2.8.0
Actions #4

Updated by amacdona@redhat.com over 9 years ago

  • Status changed from ASSIGNED to POST

Added by amacdona@redhat.com about 9 years ago

Revision 2a0a69ce | View on GitHub

Convert the users collection to mongoengine

closes #788 closes #1133

Added by Austin Macdonald about 9 years ago

Revision 2a0a69ce | View on GitHub

Convert the users collection to mongoengine

closes #788 closes #1133

Actions #5

Updated by amacdona@redhat.com about 9 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #6

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by dkliban@redhat.com almost 9 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #8

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF