The Get List Definition command allows you to return the properties of a List Definition specified by ID or name. This command returns the list definition id and name of each list definition in the realm. The commands require the following arguments: Command, Realm, Password, and either List Definition name or ID.
api_web?r=myrealm&p=mypass&c=getlistdefinitionbyid&list_definition_id=42
The command is ‘getlistdefinitionbyid’, the realm is ‘myrealm’ and the password is ‘mypass’ and definition with id 42 is returned.
Example
Using all commands and arguments, non-verbose (please note the command is wrapped for display purposes only):
api_web?r=myrealm&p=mypass&c=getlistdefinitionbyid&list_definition_id=10&verbose=0&output_format=csv&headers=1
Successful results return:
"List Definition ID","List Definition Name","Description","Folder ID","Lists Defined"
"10","mylistdefinition","","2","mylist_1,mylist_2,mylist_3"
If a Description is not defined for a list, it will appear blank or empty in the results.
Results
The Get List Definition commands output either the results of the search or a FAILURE message.
Success
The Get List Definition commands do not explicitly return a Success code. Instead, they output the list definition id and name in plain text format. Use the output_format argument to return the following data in an alternate format.
Non-verbose results include:
"List Definition ID","List Definition Name","Description","Folder ID","Lists Defined"
Verbose results include:
"List Definition ID","List Definition Name","Description","Folder ID","Lists Defined","Template","AccountProfileId","From Address","Reply To Address","Bounce Address","AdminEmail","ConfirmSubs","ConfirmMessageFrom","ConfirmMessageTemplateId","ConfirmMessageFormat","SendCourtesySubsEmail","CourtesyJoinFrom","SubscribeEmailTemplateId","CourtesyJoinFormat","SendCourtesyUnsubsEmail","CourtesyLeaveFrom","UnsubscribeEmailTemplateId","CourtesyLeaveFormat","DefaultAutomation","DefaultAutomationCampaignId","ConfirmationSubGoto","ConfirmationUnsubGoto","Track Clicks","Track Opens","BaseUrlId","Vmta","FtafCustomFormUrl","FtafCustomEnvelopeUrl","FtafLandingPage","FtafErrorLandingPage","FtafAnonymous","FtafUseListFromAddress","DedupeOnSend","WorkflowApproval","WorkflowApprovalList","ListUnsubscribeHeaderEnabled","UnsubHeaderHttpValue","UnsubHeaderEmailValue","UseStickyCampaign","SetDataMacroId"
Failure
A Get List Definition commands will fail for several reasons. The result format is:
FAILURE: [Reason]
Arguments
The Get List Definition commands supports the following arguments:
Name |
Req? |
Description |
Argument |
Command |
Yes |
Defines the command to use. |
cmd=[getlistdefinitionbyid, getlistdefinitionbyname] c=[getlistdefinitionbyid, getlistdefinitionbyname] |
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] |
List Identification | Yes | Name or ID of the list definition to display. If there are spaces in the name, you can replace the space with + or %20 to avoid possible issues with spaces in a URL. |
list_definition_name=[list_definition_name] or list_definition_id=[list_definition_id] |
Verbose |
|
Return the full set of properties. |
verbose=[0,1] DEFAULT==0 |
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 |
*Feature released in v13.0.0.