Communicating with the Python REST Service

The Python Rest Service and one or more of its enrichment steps will be called from your enrichment pipeline. The service exposes each step as an addressable endpoint which is simply a portion of the URL that indicates to the service which step to execute.

To call the service you simply create a REST step in your pipeline and then specify the endpoints that you wish to call. Some steps (endpoints) can take parameters which control how the step behaves – this will be discussed in more detail in the subsequent sections.

The example below shows that we are calling the service from on the localhost (same server) and invoking the phrases, spacyner and summary enrichment steps. The summary enrichment step is taking an algorithms parameter which has been set to text-rank. These parameters are just standard query string name value pairs.

If you click on ‘Show Advanced Options’ then you can configure step concurrency. It is suggested that you start with a value that matches the number of CPUs on the server, monitor server resource utilisation and then increase until you reach the point where the server is fully utilised but you are not getting timeout issues in your pipeline.

Last updated