Custom HTTP Headers
This topic lists the custom HTTP headers that you may use with the REST APIs for Knowledge Management in B2B Service.
kmauthtoken
Use the kmauthtoken
header in your request
to control the stripe and locale of the data in the response.
The kmauthtoken
header has the following parameters:
interfaceId
The interfaceId
parameter indicates
the desired KB stripes on the calling application. Here's how the
values of interfaceId
map to the KB stripes.
Value of interfaceId | KB Stripe |
---|---|
1 |
SERVICE |
2 |
HCM |
3 |
ORA_SVC_ISR (that is, Internal Help Desk) |
You can set a single value
or multiple values for interfaceId
. When you set multiple values, delimit the values by commas. Comma-delimited
values have an OR relationship.
For example,
kmauthtoken: {"interfaceId":"1"}
, indicates that only SERVICE resources be returned.kmauthtoken: {"interfaceId":"1,2"}
, indicates that both SERVICE and HCM resources be returned, filtered by the user's department and group access.kmauthtoken: {"interfaceId": NULL}
, indicates that resources in all KB stripes be returned, filtered by the user's department and group access. If you truly want all stripes, you can also removeinterfaceId
from yourkmauthtoken
header or pass all the values you are interested in. For example, "1,2,3".
localeId
The localeId
parameter indicates
the locale of the content you wish to receive in your response.
For example, a GET /content call with the following header returns any published Service content in Spanish (Spain) in your knowledge base to which the user has access.
kmauthtoken:{"interfaceId":"1","localeId":"es_ES"}
Note:
It is recommended that you uselocaleId
in conjunction
with localeOverride
.
To understand the options for specifying locale and the APIs that
respond to this header, see Locale.
localeOverride
The localeOverride
parameter indicates
if localeId
takes precedence
over the langpref
querystring
parameter.
Use "localeOverride":true
in your kmauthtoken
for kmauthoken.localeId
to take precedence
over the langpref
querystring
parameter.
Use "localeOverride":false
in you kmauthtoken
for kmauthtoken.localeId
to take
precedence only if langpref
isn't present in the request.
Note:
It is recommended that you setlocaleOverride
to true if you
use localeId
.