Follow

Get Social Posts by Template ID

Table of Contents
  1. 1. Overview
  2. 2. Arguments
      1. 2.1.1. Example
    1. 2.2. Results
      1. 2.2.1. SUCCESS
      2. 2.2.2. FAILURE
  3. 3. Related

Overview

The Get Social Posts by Template ID command returns the Posts defined in a Template for each Social Provider .  

Arguments

The Get Social Posts by Template ID command requires the following arguments: Command, Realm, Password, and Template ID.

api_web?r=myrealm&p=mypass&c=getsocialpostsfortemplatebyid&template_id=42

The command is ‘getsocialpostsfortemplatebyid’, the realm is ‘myrealm’ and the password is ‘mypass’, and the template is id '42'.

The Get Social Posts by Template ID command supports the following arguments:

 

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd= getsocialpostsfortemplatebyid

c= getsocialpostsfortemplatebyid

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Template Yes Identifier for the Template with Posts. template_id=[template_id]
Output Format   To specify the format of the list output, use one of two arguments.  If no argument is included, the default output is space-delimited plain text string, which may not include all data columns.

csv=1 or

output_format=[csv,csv_tab, csv_pipe,xml]

Header   To define the data with a label, use the Header argument.  This can only be used in conjunction with the output format, and does not affect XML.

headers=[0,1]

DEFAULT==0

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=getsocialpostsfortemplatebyid&template_id=42&output_format=csv&headers=1

Successful results return:

"template_social_post_id","template_id","provider","post" "95","42","facebook","API Post to Facebook" "96","42","linkedin","API Post to LinkedIn" "97","42","twitter","API Post to Twitter"

Results

The Get Social Posts by Template ID command outputs either the results of the search or a FAILURE message. 

SUCCESS

The Get Social Posts by Template ID command does not explicitly return a Success code.  Instead, it outputs the template id and name in plain text format.  Use the Output Format argument to return the results in an alternate format.

FAILURE

A Get Social Posts by Template ID command will fail for several reasons, such as if no Social Providers exist in the realm.  The result format is:

FAILURE: [Reason]  

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk