Create an article status
/km/api/v1/articleStatus
This method creates an ArticleStatus object in the Oracle Knowledge repository.
The ArticleStatus objects support multiple languages. When creating an ArticleStatus object, you must specify the list of LocalizedAttribute objects in order to create 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
The request creates an ArticleStatus object.
Response Errors
The possible error responses for this method are as follows:
- OK-SEC0001
This error occurs when the user is not allowed to create an ArticleStatus object.
- 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.
- 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.
Request
- application/json
- application/xml
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
201 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 create an ArticleStatus object.:
curl -X "POST" "http://<IM_REST_API_HOST>/km/api/latest/articleStatus"
Example of Response Header
The following shows an example of the response header.
curl -X POST "https://<IM_REST_API_HOST>/km/api/latest/articleStatus" -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:
{ "referenceKey":"TEMP_ARTICLE_STATUS", "name":"TEMP Article Status", "active":true, "localizedAttributes": [ { "localeId":"en_US", "name":"TEMP Article Status" }, { "localeId":"en_GB", "name":"TEMP Article Status" }, { "localeId":"ar_EG", "name":"TEMP Article Status" }, { "localeId":"ar_AE", "name":"TEMP Article Status"}, { "localeId":"fr_FR", "name":"TEMP Article Status" }, { "localeId":"ko_KR", "name":"TEMP Article Status" }, { "localeId":"es_ES", "name":"TEMP Article Status" } ] }
Response Body Example
The following shows an example of the response body in JSON format.
{ "recordId": "A986C635359649238E49D59B7AC0EC5D", "referenceKey": "TEMP_ARTICLE_STATUS", "name": "TEMP Article Status", "links": [ { "rel": "canonical", "href": "<IM_REST_API_HOST>/km/api/latest/articleStatus/A986C635359649238E49D59B7AC0EC5D", "mediaType": "application/json, application/xml", "method": "GET" }, { "rel": "collection", "href": "<IM_REST_API_HOST>/km/api/latest/articleStatus", "mediaType": "application/json, application/xml", "method": "GET", "profile": "<IM_REST_API_HOST>/km/api/latest/metadata-catalog/articleStatus" } ], "dateAdded": "2020-08-10T14:09:55+0000", "dateModified": "2020-08-10T14:09:55+0000", "active": true, "localizedAttributes": [ { "localeId": "en_US", "name": "TEMP Article Status" }, { "localeId": "ar_EG", "name": "TEMP Article Status" }, { "localeId": "ar_AE", "name": "TEMP Article Status" }, { "localeId": "fr_FR", "name": "TEMP Article Status" }, { "localeId": "ko_KR", "name": "TEMP Article Status" }, { "localeId": "es_ES", "name": "TEMP Article Status" } ] }