From Bright Pattern Documentation
Jump to: navigation, search
(Redirected page to Api)
m (Reverted edits by Elizabeth (talk) to last revision by Tracy)
 
Line 1: Line 1:
#REDIRECT [[Api]]
+
<translate>= Get Campaigns=
 +
This method returns the list of enabled campaigns and the calling lists currently associated with such campaigns. It does not return any disabled campaigns.
 +
 
 +
== Request ==
 +
=== URL ===
 +
http[s]://<host>/configapi/v2/campaign/getAll/
 +
 
 +
=== Method ===
 +
GET
 +
 
 +
=== Body Content Type ===
 +
JSON object, or an empty array if there are no enabled campaigns
 +
 
 +
=== Body ===
 +
Empty
 +
 
 +
 
 +
== Result ==
 +
[
 +
{
 +
    "name": "CAMPAIGN1",
 +
    "lists": ["LIST1", "LIST2"],
 +
  "state": “RUNNING”
 +
},
 +
    …
 +
]  
 +
 
 +
=== Notes ===
 +
An empty array can be returned if there are no enabled campaigns.
 +
 
 +
=== Response Codes ===
 +
{|border="1" style="border-collapse:collapse" cellpadding="5"
 +
| '''Code'''
 +
| '''Description'''
 +
|-
 +
| 200
 +
| Success
 +
|-
 +
| 400
 +
| Bad request (missing required fields or format not understood)
 +
|-
 +
| 401
 +
| Authentication failed
 +
|-
 +
| 403
 +
| User authenticated but does not have sufficient privileges
 +
|}
 +
 
 +
 
 +
 
 +
 
 +
</translate>

Latest revision as of 16:34, 29 July 2020

• 5.19 • 5.2 • 5.3 • 5.8

Get Campaigns

This method returns the list of enabled campaigns and the calling lists currently associated with such campaigns. It does not return any disabled campaigns.

Request

URL

http[s]://<host>/configapi/v2/campaign/getAll/

Method

GET

Body Content Type

JSON object, or an empty array if there are no enabled campaigns

Body

Empty


Result

[
{
   "name": "CAMPAIGN1",
   "lists": ["LIST1", "LIST2"],
  "state": “RUNNING”
},
   …
] 

Notes

An empty array can be returned if there are no enabled campaigns.

Response Codes

Code Description
200 Success
400 Bad request (missing required fields or format not understood)
401 Authentication failed
403 User authenticated but does not have sufficient privileges


< Previous | Next >