You are viewing the RapidMiner Hub documentation for version 9.9 - Check here for latest version
REST API
The new version of RapidMiner AI Hub offers a REST API to manage it programmatically. In order to use the API, you are required to be authenticated and authorized via JSON Web Token (JWT).
Create a JWT
Use the following RapidMiner AI Hub REST endpoint to create a JWT:
[GET] $RMServerHost/api/rest/tokenservice
where $RMServerHost
is the IP Address or host name of your RapidMiner AI Hub instance.
The request needs to be authorized via Basic Auth
, use your RapidMiner AI Hub credentials to do so.
If the request was successfully executed, you will get the following response body:
{
"idToken": "<tokenContent>",
"expirationDate": "<epochSeconds>"
}
Use the value of idToken
to authorize your requests. The expirationDate
indicates how long the JWT is valid,
the default is 5 minutes. Once the token expires, you will need to create a new one by repeating the steps
described above or you'll receive a 401 (unauthorized) response.
curl -u username:password $RMServerHost/api/rest/tokenservice
where
$RMServerHost
is the address of your RapidMiner AI Hub instanceusername
is the name of the user which should be usedpassword
is the password of the user
RapidMiner AI Hub API
The REST API documentation of RapidMiner AI Hub is available as OpenApi 3.0
specification and is published on
SwaggerHub.
For all further requests to the API you need to have
- the HTTP method of your request (GET, POST, PUT, PATCH or DELETE),
- the content-type header attribute,
- the authorization header attribute which includes the
idToken
from the token service and is prefixed withBearer
(e.g.Authorization: Bearer <tokenContent>
), - the RapidMiner AI Hub url and
- the route you like to make a request to.
curl -H "Content-Type: application/json" -H "Authorization: Bearer $idToken" $RMServerHost/executions/queues