Skip Navigation
Expand
Rest API query for OKCS products
Answer ID 9961   |   Last Review Date 02/25/2019

How do I retrieve a list of OKCS products using Rest API?

Environment

Oracle Knowledge Cloud Service August 2017

Oracle Knowledge Cloud Service 17D

Resolution

In order to retrieve the list of OKCS products available for a specific site using Rest API, the steps are as follows:

1. Fetch integrationUsertoken :

POST https://<IM_REST_API_HOST>//km/api/latest/auth/integration/authorize

Payload:
{
     "login":"Rest API username",
     "password":"password"     
     }

Headers:


kmauthtoken {"siteName":"test","localeId":"localeID"}
Host          <IM_REST_API_HOST>
Accept          application/json

2. Perform query:

GET  https://<IM_REST_API_HOST>/km/api/latest/categories?q=externalType eq 'PRODUCT'

Headers

kmauthtoken{"siteName":"test","interfaceId":"1","integrationUserToken":"the one retrieved under 1. above "}
Host        <IM_REST_API_HOST>
Accept      application/json