Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

http://<server><port>/<company>/<entity>/<identifier>

 

SegmentDefinitionExample
<server>Server name or IP address

203.44.22.12 or greentree.site.com

<port>

Port that Greentree will listen on (default is 9000)

9000

<company>

Greentree company

01                     

<entity>

The type of object in Greentree you are referencing.  This is usually the name of the Jade Class.

SOPackingSlip

<identifier>

The primary key to identify the object you are referencing.  Optional.

The reference of a Packing Slip – eg 243333.01

...

Posting the below payload to http://server:port/01/CRMSVRequest/1021?action=report will run the report named "CRM SV Inventory Requirements" with a from/to parameters of 1021 and create an Attachment by the name of "My Report" which will replace an existing attachment called "My Report" should one exist, and it will also return the generated PDF as a response to my call.

HTML
<?xml version="1.0" encoding="UTF-8"?> <AHFormDefn> <Name>CRM SV Inventory Requirements</Name> <Parameters collection='true' count='2'> <AHParameter> <Name>From Service Request Number</Name> <Value>1021</Value> </AHParameter> <AHParameter> <Name>To Service Request Number</Name> <Value>1021</Value> </AHParameter> </Parameters> <Attachment> <Name>My Report</Name> <Summary>A nice summary</Summary> <Type>Any</Type> <ReplaceIfExists>true</ReplaceIfExists> <RespondWithAttachment>true</RespondWithAttachment> </Attachment> </AHFormDefn>

 

Beware that some reports may take significant time to execute, and your call to the API may timeout prior to the completion of the report execution.  The report execution itself has a default timeout of 60 seconds as it waits for the report to complete, you can override this by passing a query parameter of "timeout=n" where n is a value in seconds.

...