Quick Start#

Download the library#

RPS API Library can be downloaded from GitHub, Nuget package and soon from npm.

  • On GitHub, the library can be downloaded by clicking on Clone and choosing the preferred method (https download link, .zip package, etc.).
  • On Nuget, command lines are provided to download the repository, using the Package Manager, .NET CLI or other clients.
  • On npm Use npm to install the RPS Engine Client library: npm i rps-engine-client-js.
  • On Maven use dependency to groupId ch.regdata.rps.engine.client and artifactId rps-engine-api-client in pom.xml.

Configure the transformation#

In order to use the RPS API Library you need to have a valid transformation configuration in RPS CoreConfiguration. You can find instructions on how to create your first target and configuration on the Transform Quick Start documentation, points 1) and 2).

But for the purpose of this quick-start guide we advise you either manually create a transformation configuration from this JSON configuration file, and by following this tutorial.

Or simply use the configuration template predefined for this quick-start guide. The configuration template is usable as so, simply click CREATE NEW FROM TARGET from the targets list page under TRANSFORM>TARGETS and selects REGDATA examples / API library example configuration. A new target called "REGDATA examples" will be created and will contain the "API library example" configuration, which provides examples of protection and unprotection of simple data instances (name, birth date...) using anonymization, encryption or tokenization.

Configure RPSEngine class#

In this section we see how to configure the RPSEngine class in the RPS API Library in order to use the transformation configuration you just created. You have to replace following parameters with the values you retrieved when you created the transformation configuration in RPS CoreConfiguration:

  • {API_KEY_OF_CONFIGURATION} = It is the API Key of the transformation configuration
  • {SECRET_KEY_OF_CONFIGURATION} = It is the Secret Key of the transformation configuration
  • {TRANSFORM_ENDPOINT} = It is the RPS transformation services endpoint
  • {AUTH_ENDPOINT} = It is the RPS OAuth2 authentication services endpoint

C# .NET Framework#

In a .NET Framework environment, the creation of RPS Engine classes must be done manually as it is shown in below code example:

C# .NET Core#

In a .NET Core environment, configuration is much easier as the creation of RPS Engine classes is automatic. You will still need to modify some fields in order to match your configuration. In the API Library you downloaded, in the file Examples>appsettings.json, change the following fields of the RPSEngine object:


Along with the file Examples>Program.cs that is already included in your repository, .NET Core will automatically create the classes needed by RPS Engine.

Javascript#

In Javascript the creation of RPSEngine classes must be done manually (tokenProvider created with engineAuthEndpoint, clientId, and clientSecret, engineClient created with config.baseURL and tokenProvider - instance of TokenProvider class) as it is shown in below code example:

Java#

In Java the creation of RPSEngine classes must be done manually as well, as shown in the example below:

Transform data#

You are now ready to transform data by using the RPS API Library. In order to do that you can follow the examples of usage.