Categories

Versions

You are viewing the RapidMiner Server documentation for version 9.6 - Check here for latest version

REST API

The new version of RapidMiner Server 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 Server REST endpoint to create a JWT:

[GET] $RMServerHost/api/rest/tokenservice

where $RMServerHost is the IP Address or host name of your RapidMiner Server instance. The request needs to be authorized via Basic Auth, use your RapidMiner Server 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 Server instance
  • username is the name of the user which should be used
  • password is the password of the user

RapidMiner Server API

The REST API documentation of RapidMiner Server 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 with Bearer (e.g. Authorization: Bearer <tokenContent>),
  • the RapidMiner Server url and
  • the route you like to make a request to.
curl -H "Content-Type: application/json" -H "Authorization: Bearer $idToken" $RMServerHost/executions/queues