Start interaction

get

/km/api/v1/knowledgeInteraction/startInteraction

This method generates and retrieves a unique knowledge interaction ID for every user session. After a knowledge interaction ID is generated using the start interaction endpoint, you must set the interaction ID generated parameter value as true to enable user tracking. Then, specify both knowledge interaction ID and interaction ID generated parameters in the kmauthtoken header in all subsequent requests. For more information, see the Authenticate and Authorize topic in the Get Started section.

Note: If you are using the Knowledge Advanced REST API from Customer Portal, you must reuse the application's session ID as the knowledge interaction ID to avoid double-billing. Use the start interaction endpoint only if you are using the Knowledge Advanced REST API within your custom applications.

When a knowledge interaction ID expires while accessing other endpoints, you get the OK-SEC0012 error. Then, you must use the start interaction endpoint again to get a new knowledge interaction ID. You then can access the endpoint again with the new knowledge interaction ID. You must also ensure that every unique user session uses a new knowledge interaction ID even when the previous knowledge interaction ID has not expired.

Note: We strongly recommend that you use a new knowledge interaction ID per unique user to ensure that session management, user analytics, and billing are accurate.

Response Errors

The possible error response for this service is as follows:

  • OK-GEN0026

    The error occurs when your role does not have the permission to generate knowledge interaction ID.

The possible error response for other services which use knowledge interaction ID is as follows:

  • OK-SEC0012

    The error occurs when you specify an invalid or expired knowledge interaction ID while accessing other endpoints. You must get a new knowledge interaction ID again to access the endpoint.

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : KnowledgeInteractionInfo
Type: object
Title: KnowledgeInteractionInfo
Show Source
Back to Top

Examples

The following example shows how to generate and retrieve a knowledge interaction ID for a session by submitting a GET request on the REST resource using cURL.

cURL Command

curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/knowledgeInteraction/startInteraction"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"interfaceId\":\"1\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Example of Response Body

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

{
"knowledgeInteractionId" : "KNOWLEDGEINTERACTIONID_VALUE"
}
Back to Top