Update an article status

put

/km/api/v1/articleStatus/{id}

This method updates the ArticleStatus object with the specified unique identifier parameter.

The ArticleStatus objects support multiple languages. When updating an ArticleStatus object, you must specify the list of LocalizedAttribute objects in order to create or update the localizations for the ArticleStatus objects in the desired Locales.


Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/articleStatus/{id}

    The request updates the ArticleStatus object with the specified unique identifier parameter.

Response Errors

The possible error responses for this method are as follows:

  • OK-SEC0001

    This error occurs when the user is not allowed to update an ArticeStatus object.

  • OKDOM-GEN0001

    This error occurs when an ArticleStatus object with the specified unique identifier parameter cannot be found.

  • OK-GEN0005

    This error occurs when the name value is not specified with the request.

  • OKDOM-GEN0004

    This error occurs when the specified name value in the request already exists.

  • OKDOM-GEN0003

    This error occurs when the specified reference key value in the request already exists.

  • OK-GEN0024

    This error occurs when the reference key value specified with the request is invalid.

  • OK-GEN0016

    This error occurs when the LocalizedAttributes name or locale value is not specified with the request. In addition, this error also occurs when the LocalizedAttributes locale value specified with the request is invalid.

  • $ERROR.ArticleStatus.STATUS_CANNOT_BE_DEACTIVATED$

    This error is occurs when an ArticleStatus is currently assigned to an article and the active flag is specified as false with the request.

Request

Supported Media Types
Path Parameters
  • The unique identifier of the object to be updated.
Body ()
The object to be updated.
Root Schema : ArticleStatus
Type: object
Title: ArticleStatus
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this ArticleStatus in various Locales
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ArticleStatus
Type: object
Title: ArticleStatus
Show Source
Nested Schema : localizedAttributes
Type: array
List of LocalizedAttributes of this ArticleStatus in various Locales
Show Source
Nested Schema : LocalizedAttributes
Type: object
Title: LocalizedAttributes
Show Source
Back to Top

Examples

The following example shows to how to update an ArticleStatus object:

curl -X PUT "https://<IM_REST_API_HOST>/km/api/latest/articleStatus/{id}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json" -d "@<FilePath/RequestBody.json>"

Example of Request Body

The following example shows the contents of the request body in JSON format:

{
  "recordId": "A7B7C73852354172834E259C7591F0FB",
  "referenceKey": "USER1",
  "name": "user1",
  "dateAdded": "2019-03-22T10:58:46+0000",
  "dateModified": "2019-03-22T10:58:46+0000",
  "active": true,
  "localizedAttributes": [
    {
      "localeId": "en_US",
      "name": "user1"
    },
    {
      "localeId": "ko_KR",
      "name": "user1"
    }
  ]
}

Response Body Example

The following shows an example of the response body in JSON format.

{
  "recordId": "A7B7C73852354172834E259C7591F0FB",
  "referenceKey": "USER1",
  "name": "user1",
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/articleStatus/A7B7C73852354172834E259C7591F0FB",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    },
    {
      "rel": "collection",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/articleStatus",
      "mediaType": "application/json, application/xml",
      "method": "GET",
      "profile": "https://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/articleStatus"
    }
  ],
  "dateAdded": "2019-03-22T10:58:46+0000",
  "dateModified": "2019-03-22T10:58:46+0000",
  "active": true,
  "localizedAttributes": [
    {
      "localeId": "en_US",
      "name": "user1"
    },
    {
      "localeId": "ko_KR",
      "name": "user1"
    }
  ]
}
Back to Top