Unlink
/km/api/v1/incidents/unlink
The request payload as a DocumentIncidentLink object must be provided with the POST method.
An existing Incident object must be provided on the DocumentIncidentLink object in the payload. You must supply parameters such as incidentId and recordId together to identify the incident.
An existing incident must be provided on the DocumentIncidentLink BO. Both the incidentId and recordId parameters together must be supplied to identify the incident on the 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 parameters 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 versionIds 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 answerIds parameter values only.
- If you identify the first Content in the list by its recordId parameter value, then all the Content objects will be identified by their recordIds 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 documentIds parameter values only.
In either 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 is validated to ensure that parameters such as recordId, answerId, and documentId that are provided with the payload match with those in the Oracle Knowledge Repository.
Request
- application/json
- application/xml
object
DocumentIncidentLink
-
documents(optional):
array documents
To Many Relationship to View
-
incident(optional):
Incident
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
ContentKey-allOf[1]
object
Singular Resource
object
-
allTranslations(optional):
array allTranslations
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.
-
answerId(optional):
integer
The unique identifier that enables mapping between an answer and the content.
-
dateModified(optional):
string(date-time)
The date when the content was last modified in the Oracle Knowledge Repository.
-
documentId(optional):
string
The unique identifier of a document that indicates the content type in which the content is saved.
-
locale(optional):
LocaleKey
-
recordId(optional):
string
The unique identifier of the document. This ID is same in all versions in all locales of the document.
-
title(optional):
string
The tittle of the document.
-
version(optional):
string
Version of the Content object
-
versionId(optional):
string
The unique identifier of the specific version of a document in a specific locale. You cannot use this field in queries made using q query parameter.
array
-
Array of:
object instanceLink
Metadata describing link description objects that MAY appear in the JSON instance representation.
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.
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.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
LocaleKey-allOf[1]
object
-
recordId(optional):
string
The unique identifier of the Locale object.
-
object
Singular Resource
Title:
Singular Resource
Oracle base singular resource schema definition. -
object
IncidentKey-allOf[1]
object
-
incidentId(optional):
string
The identifier of the Incident. This is also referred to as the case number.
-
recordId(optional):
string
The record Id of the Incident object.
object
-
dateAdded(optional):
string(date-time)
The date when the Incident object was created.
-
dateModified(optional):
string(date-time)
The date when the Incident object was last modified.
-
description(optional):
string
The description of the Incident.
Response
204 Response
Examples
The following example shows how to remove a link from an Incident Object from 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/unlink"
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 } ] }