You are viewing the RapidMiner Hub documentation for version 9.10 - Check here for latest version
REST API
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 using basic authentication
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 userpassword
is the password of the user
Create a JWT using an offline token
If you want to obtain the JWT in a fully programmatic way, you'll need to use an offline token, which can be requested as described here. Follow the steps there to get, first an offline, then an access token.
That access token can be used on this RapidMiner AI Hub REST endpoint to create a JWT:
[GET] $RMServerHost/api/rest/saml/tokenservice
where $RMServerHost
is the IP Address or host name of your RapidMiner AI Hub instance.
Use the response value to authorize your requests. The default expiration value 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 -X GET $RMServerHost/api/rest/saml/tokenservice -H "Authorization: Bearer $idToken"
where
$RMServerHost
is the address of your RapidMiner AI Hub instanceusername
is the name of the userpassword
is the password of the user$idToken
is the access token you obtained previously.
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