This page explains on a general level how some 3rd party system can be integrated to automatically retrieve XML data from Miradore server using Miradore web service.
See Miradore API specification document for details.
Miradore 3.5.0 or later installed.
User credentials to the Miradore instance, where the data is desired to be retrieved from. The user account must belong to user group Web service readers for get operation and Web service writers for create, update and delete operations.
Good knowledge of XML markup language and scripting.
Install a REST client extension to your browser. Some useful extensions are mentioned in the web service API specification.
Connect to the web service with the REST client extension and run for example GET query to http(s)://<server_name>/<instance_name>/connectors/rest.svc/<item>/<id>
Where <server_name> is the name of your Miradore Management Suite server and <instance_name> is the name of your Miradore Management Suite instance.
If the web service is running correctly, the following error is displayed:
<Response MDVersion="3.5.0" StatusCode="403">
<Error>
<StatusCode>403</StatusCode>
<Description>Forbidden</Description>
<Details>Authentication failed: Authorization header is missing</Details>
</Error>
</Response>
It is recommended to test the web service using a REST client (e.g. Firefox plug-in) or similar application, that makes it possible to add the authorization headers to the request. Running the above-mentioned request with correct credentials should return the list of assets. Additionally, the REST client should be used to test all your requests before using them in production. For more information, please read the chapter 6 Testing the web service manually from the API specification document.
Decide which data you want to export from Miradore.
Check from Supported items table whether it is possible to export the data from Miradore using Miradore web service.
Determine attribute mapping between Miradore and 3rd party system. Attribute names may differ between databases, and therefore it is important to check them before data is transferred between the databases.
Design queries to retrieve the desired information.
Test the queries and validate that all retrieved information is present. One way to test the queries is to use a REST client.
Implement a script which performs the integration. Below, you can find an informal high-level description or pseudocode about the steps that could be included in the script.
Send HTTP GET for item X to Miradore web service. It is possible to get only modified data by using Item.ModifyDate as a filter. For example Asset.ModifyDate > ”LastRunTime”
Check the response status code.
Parse items and attributes from the XML response.
Insert only modified or new items and attributes to the target system to prevent duplicates in the target system's database.
The script can be run periodically at predefined intervals (e.g. once per day) in order to keep data up to date.
See also
Functional description of Miradore web service
Troubleshooting Miradore web service
Related to