Activate subscription

post

/km/api/v1/users/{id}/subscriptions/{subscriptionId}/activate

This method updates the subscription status to active for a specified subscription Id and a specified user Id.

Response Errors

The possible error responses for this method are as follows:

  • OK-SEC0001

    The error occurs when a user does not have the MODIFY_USER or MODIFY_WEB_USER privileges but attempts to modify subscription associated with another user.

  • OKDOM-USER0014

    The error occurs in either of the following cases:

    • The userId or subscriptionId value specified with the request does not exist in the repository.
    • The specified userId does not own a subscription.

Request

Path Parameters
Back to Top

Response

204 Response

No Content.
Back to Top

Examples

The following example shows how to update the Subscription status to active a specified Subscription ID and a specified user ID by submitting a post request on the REST resource using cURL.

cURL Command

curl -X "POST" "http://<IM_REST_API_HOST>/km/api/latest/users/{id}/subscriptions/{subscriptionId}/activate"

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 Response Body

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

This request does not return any response body.
Back to Top