Reports

Execution

GET /api/.../reports/execution?reportName={name}&reportPath={path}&reportParameters={parameters}&reportFormat={format}&save=false

The execution endpoint allows Polaris to set report parameters and generate reports in multiple formats (ie: PDF).

Note: The branch profile's "Report Server Setup" must specify an override account for Report Server authentication.

Request Information

Parameters
Name Type Required Description
reportName string Yes Name of the report.
  • eg: Expired Patrons
reportPath string Yes Path of the report.
  • eg: /Public Services/Patron Services/
reportParameters string Yes Report parameters. Pipe delimited.
  • eg: GIS_MS_OrganizationList=3|GIS_MS_OrganizationList=5|dtExpiredBeginDate=1/1/2017
reportFormat string Yes Valid formats are:
  • CSV
  • EXCEL
  • HTML3.2
  • HTML4.0
  • IMAGE
  • MHTML
  • NULL
  • PDF
  • Word
  • XML
PDF is the default format.
save boolean No Temporarily save report on server.
Folder: App_Data\Reports\{tenant}\Users\{userid}
Valid values:
  • true or false

Example Request

application/json, text/json
https://server.polarislibrary.com/Polaris.ApplicationServices/api/v1/eng/20/polaris/3/1218/reports/execution?reportName=Expired%20Patrons&reportPath=%2FPublic%20Services%2FPatron%20Services%2F&reportParameters=GIS_MS_OrganizationList%3D3%7CGIS_MS_OrganizationList%3D5%7CdtExpiredBeginDate%3D1%2F1%2F2017&reportFormat=PDF

Response Information

Example
content-encoding:gzip
content-length:1065410
content-type:application/pdf
RAW PDF DATA

HTTP Response Codes

Code Description
200 OK. Success

Management

GET /api/.../reports/management?action={action}&reportName={name}&reportPath={path}

The management endpoint allows the caller to query the report server to retrieve lists of reports and report parameters.

The 'listrecent' action retrieves recently executed reports based on the logged on user.

The 'getrecent' action retrieves a recently executed report based on the logged on user and report file ID. The file name used should be one returned from the 'listrecent' action and will look like 'Combined Notice Half Page Mail_pdf'.

Note: The branch profile's "Report Server Setup" must specify an override account for Report Server authentication.

Request Information

Parameters
Name Type Required Description
action string Yes Valid actions are:
  • list
  • listrecent
  • getrecent
  • getReportParameters
reportName string No Name of the report.
  • eg: ORSSelectionList
Required when using the 'getrecent' or 'getReportParameters' actions.
reportPath string No Path of the report.
  • eg: /Patron/Public Services/Patron Services/
Required with using the 'list' and 'getReportParameters' actions.

Example Request - 'list'

application/json, text/json
https://young-lt2.polarislibrary.com/Polaris.ApplicationServices/api/v1/eng/20/polaris/3/1233/reports/management?action=list&reportPath=%2FPolaris%2FSystem%2FInternal%2F

Response Information - 'list'

Example
content-encoding: gzip
content-type: application/json; charset=utf-8
{
  "ServerInfoHeader": {
    "ReportServerVersionNumber": "2015.130.4001.00",
    "ReportServerEdition": "Developer",
    "ReportServerVersion": "Microsoft SQL Server Reporting Services Version 13.0.4001.0",
    "ReportServerDateTime": "2020-02-21T08:34:17",
    "AnyAttr": null
  },
  "CatalogItems": [
    {
      "ID": "02a832c8-1a92-4095-ad3c-5a0e4596a3e5",
      "Name": "Authority Create Links Job",
      "Path": "/Polaris/System/Internal/Authority Create Links Job",
      "VirtualPath": null,
      "Type": 2,
      "Size": 49423,
      "SizeSpecified": true,
      "Description": null,
      "HiddenSpecified": false,
      "CreationDate": "2020-01-10T00:58:13.627-05:00",
      "CreationDateSpecified": true,
      "ModifiedDate": "2020-01-10T00:58:13.627-05:00",
      "ModifiedDateSpecified": true,
      "CreatedBy": "DOMAIN\\Polaris.User",
      "ModifiedBy": "DOMAIN\\Polaris.User",
      "MimeType": null,
      "ExecutionDateSpecified": false
    },
    {
      "ID": "a543d05b-dd47-4716-a5a4-1ede5ed6df58",
      "Name": "Item Record Set",
      "Path": "/Polaris/System/Internal/Item Record Set",
      "VirtualPath": null,
      "Type": 2,
      "Size": 56751,
      "SizeSpecified": true,
      "Description": null,
      "HiddenSpecified": false,
      "CreationDate": "2020-01-10T00:58:33.173-05:00",
      "CreationDateSpecified": true,
      "ModifiedDate": "2020-01-10T00:58:33.173-05:00",
      "ModifiedDateSpecified": true,
      "CreatedBy": "DOMAIN\\Polaris.User",
      "ModifiedBy": "DOMAIN\\Polaris.User",
      "MimeType": null,
      "ExecutionDateSpecified": false
    },
    {
      "ID": "52eb6311-01cc-4777-be2c-3538dd400951",
      "Name": "Items Out By Patron",
      "Path": "/Polaris/System/Internal/Items Out By Patron",
      "VirtualPath": null,
      "Type": 2,
      "Size": 28266,
      "SizeSpecified": true,
      "Description": null,
      "HiddenSpecified": false,
      "CreationDate": "2020-01-10T00:58:34.33-05:00",
      "CreationDateSpecified": true,
      "ModifiedDate": "2020-01-10T00:58:34.33-05:00",
      "ModifiedDateSpecified": true,
      "CreatedBy": "DOMAIN\\Polaris.User",
      "ModifiedBy": "DOMAIN\\Polaris.User",
      "MimeType": null,
      "ExecutionDateSpecified": false
    }
  ]
}

Example Request - 'listrecent'

application/json, text/json
https://young-lt2.polarislibrary.com/Polaris.ApplicationServices/api/v1/eng/20/polaris/3/1242/reports/management?action=listrecent

Response Information - 'listrecent'

Example
content-encoding: gzip
content-type: application/json; charset=utf-8
[
  {
    "Filename": "Combined Notice Half Page Mail_pdf",
    "CreationDate": "2020-07-12T17:56:46.6980483-04:00"
  },
  {
    "Filename": "Combined Notice Z Fold Mailer_pdf",
    "CreationDate": "2020-07-12T18:01:01.6775417-04:00"
  }
]

Example Request - 'getreportparameters'

application/json, text/json
https://server.polarislibrary.com/Polaris.ApplicationServices/api/v1/eng/20/polaris/3/1233/reports/management?action=getReportParameters&reportName=ORSSelectionList&reportPath=%2FPolaris%2FSystem%2FInternal%2F

Response Information - 'getreportparameters'

Example
content-encoding: gzip
content-type: application/json; charset=utf-8
{
  "ServerInfoHeader": {
    "ReportServerVersionNumber": "2015.130.4001.00",
    "ReportServerEdition": "Developer",
    "ReportServerVersion": "Microsoft SQL Server Reporting Services Version 13.0.4001.0",
    "ReportServerDateTime": "2020-02-21T08:38:13",
    "AnyAttr": null
  },
  "Parameters": [
    {
      "Name": "GIS_NP_PatronID",
      "Type": 2,
      "TypeSpecified": true,
      "Nullable": false,
      "NullableSpecified": true,
      "AllowBlank": false,
      "AllowBlankSpecified": true,
      "MultiValue": false,
      "MultiValueSpecified": true,
      "QueryParameter": true,
      "QueryParameterSpecified": true,
      "Prompt": "PatronID:",
      "PromptUser": true,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": false,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": null,
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": [
        "5"
      ],
      "State": 0,
      "StateSpecified": true,
      "ErrorMessage": null
    },
    {
      "Name": "GIS_NP_LogonBranchID",
      "Type": 2,
      "TypeSpecified": true,
      "Nullable": false,
      "NullableSpecified": true,
      "AllowBlank": true,
      "AllowBlankSpecified": true,
      "MultiValue": false,
      "MultiValueSpecified": true,
      "QueryParameter": true,
      "QueryParameterSpecified": true,
      "Prompt": "LogonBranchID",
      "PromptUser": true,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": false,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": null,
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": [
        "9"
      ],
      "State": 0,
      "StateSpecified": true,
      "ErrorMessage": null
    },
    {
      "Name": "GIS_MS_OrganizationID",
      "Type": 2,
      "TypeSpecified": true,
      "Nullable": false,
      "NullableSpecified": true,
      "AllowBlank": false,
      "AllowBlankSpecified": true,
      "MultiValue": true,
      "MultiValueSpecified": true,
      "QueryParameter": false,
      "QueryParameterSpecified": true,
      "Prompt": "Item Assigned Branches:",
      "PromptUser": true,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": true,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": [
        {
          "Label": "3MBranch (3MBr)",
          "Value": "435"
        },
        {
          "Label": "Branch A Area Public Library (BA)",
          "Value": "395"
        },
        {
          "Label": "Branch B Free Library (BB)",
          "Value": "3"
        },
        {
          "Label": "Branch C Free Library (BC)",
          "Value": "5"
        }
      ],
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": null,
      "State": 1,
      "StateSpecified": true,
      "ErrorMessage": null
    },
    {
      "Name": "GIS_MS_OrganizationIDString",
      "Type": 4,
      "TypeSpecified": true,
      "Nullable": true,
      "NullableSpecified": true,
      "AllowBlank": true,
      "AllowBlankSpecified": true,
      "MultiValue": false,
      "MultiValueSpecified": true,
      "QueryParameter": true,
      "QueryParameterSpecified": true,
      "Prompt": "GIS_MS_OrganizationIDString",
      "PromptUser": true,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": false,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": null,
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": [
        null
      ],
      "State": 0,
      "StateSpecified": true,
      "ErrorMessage": null
    },
    {
      "Name": "GIS_SORTING",
      "Type": 4,
      "TypeSpecified": true,
      "Nullable": false,
      "NullableSpecified": true,
      "AllowBlank": false,
      "AllowBlankSpecified": true,
      "MultiValue": false,
      "MultiValueSpecified": true,
      "QueryParameter": true,
      "QueryParameterSpecified": true,
      "Prompt": "Sort Options:",
      "PromptUser": true,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": false,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": null,
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": [
        "[Call Number],Collection,Title"
      ],
      "State": 0,
      "StateSpecified": true,
      "ErrorMessage": null
    },
    {
      "Name": "GIS_SORTINGNUM",
      "Type": 2,
      "TypeSpecified": true,
      "Nullable": false,
      "NullableSpecified": true,
      "AllowBlank": true,
      "AllowBlankSpecified": true,
      "MultiValue": false,
      "MultiValueSpecified": true,
      "QueryParameter": false,
      "QueryParameterSpecified": true,
      "Prompt": "GIS_SORTINGNUM:",
      "PromptUser": false,
      "PromptUserSpecified": true,
      "Dependencies": null,
      "ValidValuesQueryBased": false,
      "ValidValuesQueryBasedSpecified": true,
      "ValidValues": null,
      "DefaultValuesQueryBased": false,
      "DefaultValuesQueryBasedSpecified": true,
      "DefaultValues": [
        "2"
      ],
      "State": 0,
      "StateSpecified": true,
      "ErrorMessage": null
    }
  ]
}

HTTP Response Codes

Code Description
200 OK. Success
400 Bad request