Jump to content

Hornbill Data Export - Can we have more than one report defined in the config file


Recommended Posts

Hi @Izu,

This is already possible with the existing tool. The Reports property in the config JSON is an array, so you can add as many reports as you like. For example:

{
    "APIKey": "yourapikey",
    "InstanceID": "yourinstanceid",
    "Database":{
        "Driver": "mysql",
        "Server": "127.0.0.1",
        "Database": "hornbillbackup",
        "Authentication": "",
        "UserName": "root",
        "Password": "",
        "Port": 5002,
        "Encrypt": false
    },
    "Reports":[
        {
            "ReportID":1,
            "ReportName":"Your first report name",
            "DeleteReportInstance": true,
            "DeleteReportLocalFile": true,
            "Table":{
                "TableName":"h_itsm_requests",
                "PrimaryKey":"h_pk_reference",
                "Mapping":{
                    "RequestID":"h_pk_reference",
                    "DateLogged":"h_datelogged",
                    "LastUpdate":"h_datelastmodified",
                    "Summary":"h_summary"
                }
            }
        },
	{
            "ReportID":2,
            "ReportName":"Your second report name",
            "DeleteReportInstance": true,
            "DeleteReportLocalFile": true,
            "Table":{
                "TableName":"h_itsm_requests",
                "PrimaryKey":"h_pk_reference",
                "Mapping":{
                    "RequestID":"h_pk_reference",
                    "DateLogged":"h_datelogged",
                    "LastUpdate":"h_datelastmodified",
                    "Summary":"h_summary"
                }
            }
        },
	{
            "ReportID":99,
            "ReportName":"Your ninety-ninth report name",
            "DeleteReportInstance": true,
            "DeleteReportLocalFile": true,
            "Table":{
                "TableName":"h_itsm_requests",
                "PrimaryKey":"h_pk_reference",
                "Mapping":{
                    "RequestID":"h_pk_reference",
                    "DateLogged":"h_datelogged",
                    "LastUpdate":"h_datelastmodified",
                    "Summary":"h_summary"
                }
            }
        }
    ]
}

Cheers,

Steve

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...