Calling the Data Pipelines service
You can use the dmp module to send HTTP requests to a FICO Data Pipelines service within the solution. To do this, you first initialize a dmpresource value by calling dmpinitdatapipelines. Then you can read the Data Pipelines service instance ID from the id attribute of the dmpresource, and use the dmphttp functions to send HTTP requests in a similar way to using plain mmhttp (see section Making HTTP Requests for details). For example, to retrieve the list all the Data Pipelines jobs:
declarations datapipelines: dmpresource end-declarations dmpinitdatapipelines(myservice) if myservice.status<>DMP_OK then writeln('Failed to find Data Pipelines service due to error:', myservice.lasterror) exit(1) end-if httpStatusCode := dmphttpget(datapipelines,'/rest/service/dmp-system/'+ datapipelines.id+'/api/v1/jobs','request.json') if httpStatusCode<>200 then writeln('Error returned by Data Pipelines: ',httpStatusCode) exit(1) end-if
When calling Data Pipelines, the query path is relative to the root of the Data Pipelines service provider.
The dmpresource.status value will be DMP_NOT_FOUND if a Data Pipelines service instance does not exist within the solution containing the component.