Renew login tokens for host factory authentication
GET method to renew user login tokens for session authentication.
Method | URL | Description |
---|---|---|
GET | https://host_name:port/platform/rest/hostfactory/auth/renew | Renews login tokens for session authentication. Tokens are valid for 8 hours and must be renewed before they expire. The token can be renewed through the /auth/renew API, or regenerated by calling the /auth/login API again. |
Request
GET https://host_name:port/platform/rest/hostfactory/auth/renew?parameter
Category | Name | Description |
---|---|---|
Header | Cookie | The platform.rest.hf.token and platform.rest.hf.certificate cookies that are obtained from the previous call to the /login method. |
Parameter | hfcsrftoken | The hfcsrftoken that is obtained by the previous call to the /login method. |
If you use curl, the command might look like the following example when the cookies are saved to /tmp/cookie:
curl --header 'Accept: application/json' -b /tmp/cookie --cacert /opt/ibm/spectrumcomputing/wlp/usr/shared/resources/security/cacert.pem --tlsv1.2 -X GET https://myprimaryhost.example.com:9443/platform/rest/hostfactory/auth/renew?hfcsrftoken=915ee7644f431e630dac68b9ab3e40bc
This example uses the default self-signed CA certificate for the --cacert option (which is Installation_top\wlp\usr\shared\resources\security\cacert.pem for Windows and $EGO_TOP/wlp/usr/shared/resources/security/cacert.pem for Linux®). For your production cluster, use a properly chained certificate that is signed by a trusted CA. Alternatively, instead of the --cacert option, use the -k option to specify an insecure connection.
Response
Status code | Description | ||
---|---|---|---|
Category | Name | Description | |
200 | OK - Successfully renewed tokens. | ||
Header | Set-Cookie |
The platform.rest.hf.token and platform.rest.hf.certificate cookies that are successfully renewed. | |
Content | hfcsrftoken |
The hfcsrftoken that is successfully renewed. | |
400 | Bad Request – The platform.rest.hf.token is not found in the request. | ||
401 | Unauthorized - Cannot renew platform.rest.hf.token. | ||
403 | Forbidden – The hfcsrftoken is not found in the request. |