Calling DMP Manager
You can also use of the dmp module to send HTTP requests to DMP Manager.Initialize a dmpresource value with the details of DMP Manager by calling dmpinitmanager, then use the dmphttp functions to send HTTP requests in a similar way to using plain mmhttp. For example, you can send a request to create a commit of the current solution as follows:
public declarations dmpmanager: dmpresource REQUEST_BODY = '{"label":"EXAMPLE","comment":"this is an example"}' end-declarations dmpinitmanager(dmpmanager) if dmpmanager.status<>DMP_OK then writeln('Failed to find DMP Manager due to error:', dmpmanager.lasterror) exit(1) end-if httpStatusCode := dmphttppost(dmpmanager,'/rest/dmp/runtime/solutions/'+dmpgetsolid+'/revisions', 'text:REQUEST_BODY','result.json') if httpStatusCode<>200 then writeln('Error returned by DMP Manager: ',httpStatusCode) exit(1) end-if
Note that the set of paths you can call on DMP Manager is restricted as follows:
- You may only make requests to paths pertaining to the solution containing the component executing the model.
- You may make HTTP POST and HTTP GET requests to the '/rest/dmp/runtime/SOLUTIONID/revisions' endpoint.
- You may make HTTP GET requests to the '/rest/dmp/runtime/SOLUTIONID/functions' endpoint.
- You may make HTTP POST and HTTP GET requests to the '/rest/dmp/runtime/SOLUTIONID/services' endpoint.
- You may make HTTP DELETE requests to the '/rest/dmp/runtime/SOLUTIONID/services/SERVICEID' endpoints.
- You may not make any HTTP requests to any other paths.
When calling DMP Manager using the dmphttp functions, it is not necessary to start the path with '/com.fico.dmp.manager'.
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.