enableBatchPublicUrl

Enables report sharing a batch and returns the sharable report url.

enableBatchPublicUrl

Enables report sharing a batch and returns the sharable report url.

Top ↑

Syntax

array enableBatchPublicUrl( string api_key, int batch_id );

Parameters

api_key (string)

The key required to access the API. See Getting Started for more information.

batch_id (int)

The ID of the Batch.

Return Value

Returns a unique publicly viewable url used to view the generated report of a batch send.

Examples

$batch_id = 1234567;

$api                 = new Api($url, 'YOURAPIKEY');
$report_enable_share = $api->invokeMethod('enableBatchPublicUrl', $batch_id);
{
    "id": 1,
    "method": "enableBatchPublicUrl",
    "params": [
        "YOURAPIKEY",
        1234567
    ]
}
  {
      "id":1,
      "result":{
          "report_url":"http:\/\/www.vision6.com.au\/report\/email?id=1234567&a=N&key=NNNNNN"
      },
      "error":null
  }

Remarks

The following table shows the values that are returned.

Field Type Description
report_url string The publicly accessible batch report url

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
308 Unable to load Batch The system could not load batch_id.

See Also