Link

post

/km/api/v1/incidents/link

This method links an Incident object to one or more Content objects. This method returns details about the Incident object.

The request payload as a DocumentIncidentLink object must be provided with the POST method.

A new or existing Incident object can be specified in the DocumentIncidentLink object of the payload. If the Incident object is new, specify only the incidentId parameter value to identify the object. If the incident already exists, you can specify the incidentId parameter value alone, or the incidentId and recordId parameters together to identify the Incident object. You must always provide the description about the Incident object and it can contain updates if the specified Incident object is an existing Incident object.

A list of one or more Content objects (in the KEY mode) must be provided on the DocumentIncidentLink object to perform the link request. Each Content object provided must be an existing object. You can use parameter such as recordId, versionId, answerId, or documentId to identify the Content object. The attribute used to identify the first Content object determines how the other objects are identified.

For example:

  • If you identify the first Content object in the list by its versionId parameter value, then all the Content objects are identified by their versionId parameter values only.
  • If you identify the first Content in the list by its answerId parameter value, then all the Content objects are identified by their answerId parameter values only.
  • If you identify the first Content in the list by its recordId parameter value, then all the Content objects are identified by their recordId parameter values only.
  • If you identify the first Content in the list by its documentId parameter value, then all the Content objects are identified by their documentId parameter values only.

In any of these cases, each Content object specified is validated against the Content object found by the specified identifier. For example, if a versionId parameter is provided, then the Content object found by the specified versionId parameter is validated to ensure that the parameters such as recordId, answerId, and documentId provided with the payload match with those in the Oracle Knowledge Repository.

Request

Supported Media Types
Body ()
The incident details and one or more documents to link it to.
Nested Schema : Incident
Match All
Show Source
Nested Schema : ContentKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : ContentKey-allOf[1]
Type: object
Show Source
Nested Schema : allTranslations
Type: array

This field will return list of all translated content that the user can view

This field will only be populated if allTranslations query parameter is passed in with value true.

Show Source
Nested Schema : LocaleKey
Match All
Show Source
Nested Schema : LocaleKey-allOf[1]
Type: object
Show Source
Nested Schema : IncidentKey
Match All
Show Source
Nested Schema : IncidentKey-allOf[1]
Type: object
Show Source
Nested Schema : Incident-allOf[1]
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Incident
Match All
Show Source
Nested Schema : IncidentKey
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : IncidentKey-allOf[1]
Type: object
Show Source
Nested Schema : Incident-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to create a link from an Incident Object to one or more content objects by submitting a post request on the REST resource using cURL.

cURL Command

Command: curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/incidents/link"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9",\"userToken\":\"UoyWTKRG4RpyJCH4Wqjzht2iYUrsDdk5ir+3IpwEkxcwajJkGR9OGSQBTANQVGW0iVT9MFeDzqL+RYdgfzGSK+h5QzDFIDM+rDLgdKeEE19ljWFm3zMCF+kgYp/dJ/Yq5V7Re+aDXqHg6YkHfvprFA==\"}" \
-H "Accept: application/json"

Example of Request Body

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

{
  "incident" : {
    "description" : "There is a problem identifying the meaning of key words for Oracle Knowledge",
    "incidentId" : "140005-14895892"
  },
  "documents" : [ {
    "recordId" : "10834GALKGJ0187394813N401347981324",
    "versionId" : "1324IUH12934701324NL340987134KJN1341",
    "documentId" : "RE123",
    "title" : "Reference Document for Oracle Knowledge",
    "version" : "4.0",
    "answerId" : 0
  }, {
    "recordId" : "AF21423423454FDSFKGJASDFAF48135465",
    "versionId" : "D4SAF654FA9D8F9837498425314462874653",
    "documentId" : "RE125",
    "title" : "Glossary of terms for Oracle Knowledge",
    "version" : "7.0",
    "answerId" : 0
  } ]
}

Example of Response Body

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

{
  "dateAdded" : "2013-11-05T13:48:51EST",
  "dateModified" : "2013-11-05T13:48:51EST",
  "description" : "There is a problem identifying the meaning of key words for Oracle Knowledge",
  "recordId" : "2LKAJDFO8234OIJ3O24P18439837409819",
  "incidentId" : "140005-14895892",
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
    "mediaType" : "application/json, application/xml",
    "templated" : true,
    "method" : "GET",
    "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
  } ]
}
Back to Top