DM Web Services Documentation

RunReport

Runs a single report by its report definition GUID, passing any runtime parameters the definition requires (date ranges, identifiers, etc.). Returns the generated report file reference(s).

Normal outcomes return HTTP 200 with a success flag. An unexpected server error returns HTTP 500.

REST and SOAP: This function is available over both transports, sharing the same RunReportRequest / RunReportResponse objects. The reports SOAP service is at /soap/public/v1/reports.

Function Overview

  • Purpose: Generate a report from a stored report definition and return its file reference(s).
  • REST Endpoint: POST /api/public/v1/reports/run
  • SOAP Operation: RunReport(RunReportRequest)
  • Authentication: Required — Bearer token in HTTP Authorization header

REST Interface

Headers

Authorization: Bearer <token>
Content-Type: application/json

Request Body

{
  "reportGuid": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
  "parameters": [
    { "name": "StartDate", "dataType": 4, "length": 0, "data": "2026-06-01" },
    { "name": "EndDate", "dataType": 4, "length": 0, "data": "2026-06-30" },
    { "name": "BranchGuid", "dataType": 12, "length": 0, "data": "1b2c3d4e-5f60-7180-92a3-b4c5d6e7f809" }
  ],
  "originalFileName": "JuneShipments",
  "useOriginalFileName": true,
  "correlationId": "req-2026-0629-001"
}

Request Fields

FieldTypeRequiredDescription
reportGuidstring (GUID)YesIdentifier of the stored report definition to run.
parametersarrayNoRuntime parameter values the definition cannot supply itself (see Parameter object below).
originalFileNamestringNoBase file name to use for the output when useOriginalFileName is true.
useOriginalFileNamebooleanNoWhen true, names the output using originalFileName instead of a generated name.
correlationIdstringNoCaller-supplied tracking id; echoed back on the response.

Parameter object

FieldTypeDescription
namestringParameter name as defined by the report.
dataTypeintSQL data type code (see codes below).
lengthintDeclared length; use 0 when not applicable.
datastringParameter value as a string; converted per dataType.

dataType codes: 2 = Bit, 4 = DateTime, 6 = Float, 8 = Int, 9 = Money, 12 = NVarChar / GUID, 13 = Real, 15 = Decimal, 16 = SmallInt.

Parameter validation: Each report defines the parameters it accepts. Parameter names are matched to the report's declared parameters (a leading @ and letter case are ignored), and each supplied value is checked against the parameter's declared type (date, number, boolean, GUID, or text). A parameter the report does not declare, or a value that is not valid for its declared type, is rejected with a message in the report's errorText and no report is generated. Parameters the report does not require may be omitted. The dataType and length fields are optional — the server resolves each parameter's type from the report definition.

Response — Success (HTTP 200)

{
  "success": true,
  "errorText": null,
  "correlationId": "req-2026-0629-001",
  "reports": [
    {
      "reportGuid": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
      "success": true,
      "errorText": null,
      "fileName": "JuneShipments.xlsx",
      "referencePath": "/reports/generated/2026/06/JuneShipments.xlsx",
      "copyPath": null,
      "correlationId": "req-2026-0629-001"
    }
  ]
}

Response — Error (HTTP 200, top-level failure)

{
  "success": false,
  "errorText": "Report definition not found for the supplied ReportGuid.",
  "correlationId": "req-2026-0629-001",
  "reports": []
}

Response — Unexpected Error (HTTP 500)

{
  "status": "Error",
  "message": "An unexpected error occurred while running the report."
}

Response Fields

FieldDescription
successStatus of the call itself (true when the request was processed).
errorTextTop-level error message; null when there is no top-level error.
correlationIdEcho of the request correlationId.
reportsPer-report results (one entry for a single report).
reports[].reportGuidThe report definition that produced this entry.
reports[].successTrue when this report has no errorText.
reports[].errorTextPer-report error message, if any.
reports[].fileNameGenerated output file name.
reports[].referencePathPath to the generated report.
reports[].copyPathSecondary copy path, if the definition specifies one.
reports[].correlationIdPer-report correlation id.

SOAP Interface

WSDL

Live WSDL -- /soap/public/v1/reports?singlewsdl

The live WSDL is the authoritative schema. The envelopes below are illustrative; element names match the shared request and result objects.

Authentication note: Pass your Bearer token as an HTTP header, not inside the SOAP envelope.
Authorization: Bearer <token>

SOAP Operation

RunReport(RunReportRequest) returns RunReportResponse — the same objects used by the REST endpoint.

SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
    <RunReport xmlns="http://dmwebservices.com/reports/public/v1">
      <request>
        <ReportGuid>3f2504e0-4f89-41d3-9a0c-0305e82c3301</ReportGuid>
        <Parameters>
          <ParameterObject>
            <Name>StartDate</Name>
            <DataType>4</DataType>
            <Length>0</Length>
            <Data>2026-06-01</Data>
          </ParameterObject>
          <ParameterObject>
            <Name>EndDate</Name>
            <DataType>4</DataType>
            <Length>0</Length>
            <Data>2026-06-30</Data>
          </ParameterObject>
        </Parameters>
        <OriginalFileName>JuneShipments</OriginalFileName>
        <UseOriginalFileName>true</UseOriginalFileName>
        <CorrelationId>req-2026-0629-001</CorrelationId>
      </request>
    </RunReport>
  </soapenv:Body>
</soapenv:Envelope>

SOAP Response -- Success

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <RunReportResponse xmlns="http://dmwebservices.com/reports/public/v1">
      <result>
        <Success>true</Success>
        <ErrorText i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
        <CorrelationId>req-2026-0629-001</CorrelationId>
        <Reports>
          <ReportDetail>
            <ReportGuid>3f2504e0-4f89-41d3-9a0c-0305e82c3301</ReportGuid>
            <Success>true</Success>
            <ErrorText i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
            <FileName>JuneShipments.xlsx</FileName>
            <ReferencePath>/reports/generated/2026/06/JuneShipments.xlsx</ReferencePath>
            <CopyPath i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
            <CorrelationId>req-2026-0629-001</CorrelationId>
          </ReportDetail>
        </Reports>
      </result>
    </RunReportResponse>
  </s:Body>
</s:Envelope>

Integration Samples


Related Resources