Miradore web service integration guide

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.

Prerequisites
 

Phase 1: Test Miradore web service in your environment
 

  1. Install a REST client extension to your browser. Some useful extensions are mentioned in the web service API specification.

  2. 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.

  1. 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.

Phase 2: Plan the integration
 

  1. Decide which data you want to export from Miradore.

  2. Check from Supported items table whether it is possible to export the data from Miradore using Miradore web service.

  3. 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.

Phase 3: Implement the integration
 

  1. Design queries to retrieve the desired information.

  2. Test the queries and validate that all retrieved information is present. One way to test the queries is to use a REST client.

  3. 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.

    1. 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”

    2. Check the response status code.

    3. Parse items and attributes from the XML response.

    4. 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

Miradore web service