Create an article status

post

/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

Supported Media Types
Body ()
The object to be created.
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

201 Response

Created.
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 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"
        }
    ]
}

Back to Top