IBM Support

PI24779: REST API SHOULD RETURN 204 WHEN THERE IS NO CONTENT BEING RETURNED

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as Permanent restriction.

Error description

Local fix

  • Custom code is needed to detect whether a REST API call will
    return data or not, the status cannot reliably used to predict
    if this is the case.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users directly accessing the CLI REST APIs.                  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The documented REST API should return 204 when there is no   *
    * content being returned. This is not always the case.         *
    *                                                              *
    * For example:                                                 *
    *                                                              *
    * Importing a User from LDAP as described in the Knowledge     *
    * Center:                                                      *
    * http://www-01.ibm.com/support/knowledgecenter/SS4GSP_6.1.0/c *
    * om.i                                                         *
    * bm.udeploy.api.doc/topics/rest_cli_user_import_put.html?lang *
    * =en                                                          *
    * returns no data, but the status code is 200 instead of the   *
    * expected 204 "No Content":                                   *
    *                                                              *
    * For comparison, adding a user to a group does not return any *
    * data, and the status is 204 (as expected).                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Users should not check for code 204 to determine of the      *
    * response body contains no content. Instead, check the length *
    * of the response body.                                        *
    ****************************************************************
    

Problem conclusion

  • Returning 200 for a response without content is a minor
    deviation from the HTTP specification with no significant ill
    effect. Existing users may have implemented checks for code 200,
    as that has always been the status used previously, so returning
    204 would be a regression for those users. The possibility of
    regression for no significant benefit makes changing the
    behavior a net loss.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI24779

  • Reported component name

    UC DEPLOY

  • Reported component ID

    5725M5400

  • Reported release

    600

  • Status

    CLOSED PRS

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-08-28

  • Closed date

    2015-02-23

  • Last modified date

    2015-02-23

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4GSP","label":"IBM UrbanCode Deploy"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
30 April 2020