Update an article status
/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
- application/json
- application/xml
-
id: string
The unique identifier of the object to be updated.
object
ArticleStatus
-
active(optional):
boolean
This parameter can be used to filter ArticleStatus objects if they are active or inactive in the system.
-
dateAdded(optional):
string(date-time)
The date when the ArticleStatus object was created or added.
-
dateModified(optional):
string(date-time)
The date when the ArticleStatus object was last modified.
-
links(optional):
array links
-
localizedAttributes(optional):
array localizedAttributes
List of LocalizedAttributes of this ArticleStatus in various Locales
-
name(optional):
string
The localized name of the ArticleStatus object. The name field can only be used for sorting.
-
recordId(optional):
string
The unique identifier of the ArticleStatus object.
-
referenceKey(optional):
string
The reference key for the ArticleStatus object.
ArticleStatus objects support multiple languages. This field can be used to identify the associated objects for all languages.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object LocalizedAttributes
Title:
LocalizedAttributes
object
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
object
LocalizedAttributes
-
description(optional):
string
Localized description in the above Locale
-
localeId(optional):
string
RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
-
name(optional):
string
Localized Name in the above Locale
Response
- application/json
- application/xml
200 Response
object
ArticleStatus
-
active(optional):
boolean
This parameter can be used to filter ArticleStatus objects if they are active or inactive in the system.
-
dateAdded(optional):
string(date-time)
The date when the ArticleStatus object was created or added.
-
dateModified(optional):
string(date-time)
The date when the ArticleStatus object was last modified.
-
links(optional):
array links
-
localizedAttributes(optional):
array localizedAttributes
List of LocalizedAttributes of this ArticleStatus in various Locales
-
name(optional):
string
The localized name of the ArticleStatus object. The name field can only be used for sorting.
-
recordId(optional):
string
The unique identifier of the ArticleStatus object.
-
referenceKey(optional):
string
The reference key for the ArticleStatus object.
ArticleStatus objects support multiple languages. This field can be used to identify the associated objects for all languages.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
array
-
Array of:
object LocalizedAttributes
Title:
LocalizedAttributes
object
-
href:
string
URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
-
mediaType(optional):
string
Media type, as defined by RFC 2046, describing the link target.
-
method(optional):
string
HTTP method for requesting the target of the link.
-
profile(optional):
string
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
-
rel:
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
-
templated(optional):
boolean
Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
object
LocalizedAttributes
-
description(optional):
string
Localized description in the above Locale
-
localeId(optional):
string
RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
-
name(optional):
string
Localized Name in the above Locale
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" } ] }