GET https://:account.api-us1.com/api/3/lists
- cURL
curl --request GET \
--url https:///:account.api-us1.com/api/3/lists
- Node
var request = require("request");
var options = { method: 'GET',
url: 'https:///:account.api-us1.com/api/3/lists' };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
- Ruby
require 'uri'
require 'net/http'
url = URI("https:///:account.api-us1.com/api/3/lists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
- JavaScript
var data = JSON.stringify(false);
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https:///:account.api-us1.com/api/3/lists");
xhr.send(data);
- Python
import requests
url = "https:///:account.api-us1.com/api/3/lists"
response = requests.request("GET", url)
print(response.text)
200 OK
{
"lists": [
{
"stringid": "email-subscription",
"userid": "1",
"name": "Email Subscription",
"cdate": "2018-08-06T16:30:41-05:00",
"p_use_tracking": "1",
"p_use_analytics_read": "0",
"p_use_analytics_link": "0",
"p_use_twitter": "0",
"p_use_facebook": "0",
"p_embed_image": "1",
"p_use_captcha": "1",
"send_last_broadcast": "0",
"private": "0",
"analytics_domains": null,
"analytics_source": "",
"analytics_ua": "",
"twitter_token": "",
"twitter_token_secret": "",
"facebook_session": null,
"carboncopy": null,
"subscription_notify": null,
"unsubscription_notify": null,
"require_name": "0",
"get_unsubscribe_reason": "0",
"to_name": "Subscriber",
"optinoptout": "1",
"sender_name": "",
"sender_addr1": "",
"sender_addr2": "",
"sender_city": "",
"sender_state": "",
"sender_zip": "",
"sender_country": "",
"sender_phone": "",
"sender_url": "http://www.ilankreimont.com",
"sender_reminder": "You signed up for my mailing list.",
"fulladdress": "",
"optinmessageid": "0",
"optoutconf": "0",
"deletestamp": null,
"udate": null,
"links": {
"contactGoalLists": "https://:account.api-us1.com/api/3/lists/1/contactGoalLists",
"user": "https://:account.api-us1.com/api/3/lists/1/user",
"addressLists": "https://:account.api-us1.com/api/3/lists/1/addressLists"
},
"id": "1",
"user": "1"
},
{
"stringid": "robert-list",
"userid": "1",
"name": "Robert List",
"cdate": "2018-09-07T08:56:49-05:00",
"p_use_tracking": "1",
"p_use_analytics_read": "0",
"p_use_analytics_link": "0",
"p_use_twitter": "0",
"p_use_facebook": "0",
"p_embed_image": "1",
"p_use_captcha": "1",
"send_last_broadcast": "0",
"private": "0",
"analytics_domains": null,
"analytics_source": "",
"analytics_ua": "",
"twitter_token": "",
"twitter_token_secret": "",
"facebook_session": null,
"carboncopy": null,
"subscription_notify": null,
"unsubscription_notify": null,
"require_name": "0",
"get_unsubscribe_reason": "0",
"to_name": "Subscriber",
"optinoptout": "1",
"sender_name": "",
"sender_addr1": "",
"sender_addr2": "",
"sender_city": "",
"sender_state": "",
"sender_zip": "",
"sender_country": "",
"sender_phone": "",
"sender_url": "http://www.zendesk.com",
"sender_reminder": "Test",
"fulladdress": "",
"optinmessageid": "0",
"optoutconf": "0",
"deletestamp": null,
"udate": null,
"links": {
"contactGoalLists": "https://:account.api-us1.com/api/3/lists/2/contactGoalLists",
"user": "https://:account.api-us1.com/api/3/lists/2/user",
"addressLists": "https://:account.api-us1.com/api/3/lists/2/addressLists"
},
"id": "2",
"user": "1"
},
{
"stringid": "mark-list",
"userid": "1",
"name": "Mark List",
"cdate": "2018-09-14T08:53:28-05:00",
"p_use_tracking": "1",
"p_use_analytics_read": "0",
"p_use_analytics_link": "0",
"p_use_twitter": "0",
"p_use_facebook": "0",
"p_embed_image": "1",
"p_use_captcha": "1",
"send_last_broadcast": "0",
"private": "0",
"analytics_domains": null,
"analytics_source": "",
"analytics_ua": "",
"twitter_token": "",
"twitter_token_secret": "",
"facebook_session": null,
"carboncopy": null,
"subscription_notify": null,
"unsubscription_notify": null,
"require_name": "0",
"get_unsubscribe_reason": "0",
"to_name": "Subscriber",
"optinoptout": "1",
"sender_name": "",
"sender_addr1": "",
"sender_addr2": "",
"sender_city": "",
"sender_state": "",
"sender_zip": "",
"sender_country": "",
"sender_phone": "",
"sender_url": "http://www.zendesk.com",
"sender_reminder": "testing.",
"fulladdress": "",
"optinmessageid": "0",
"optoutconf": "0",
"deletestamp": null,
"udate": null,
"links": {
"contactGoalLists": "https://:account.api-us1.com/api/3/lists/3/contactGoalLists",
"user": "https://:account.api-us1.com/api/3/lists/3/user",
"addressLists": "https://:account.api-us1.com/api/3/lists/3/addressLists"
},
"id": "3",
"user": "1"
},
{
"stringid": "",
"userid": "0",
"name": "",
"cdate": "2018-09-25T15:24:37-05:00",
"p_use_tracking": "1",
"p_use_analytics_read": "0",
"p_use_analytics_link": "0",
"p_use_twitter": "0",
"p_use_facebook": "0",
"p_embed_image": "1",
"p_use_captcha": "1",
"send_last_broadcast": "0",
"private": "0",
"analytics_domains": null,
"analytics_source": "",
"analytics_ua": "",
"twitter_token": "",
"twitter_token_secret": "",
"facebook_session": null,
"carboncopy": null,
"subscription_notify": null,
"unsubscription_notify": null,
"require_name": "0",
"get_unsubscribe_reason": "0",
"to_name": "Subscriber",
"optinoptout": "1",
"sender_name": "",
"sender_addr1": "",
"sender_addr2": "",
"sender_city": "",
"sender_state": "",
"sender_zip": "",
"sender_country": "",
"sender_phone": "",
"sender_url": null,
"sender_reminder": null,
"fulladdress": null,
"optinmessageid": "0",
"optoutconf": "0",
"deletestamp": null,
"udate": "2018-09-25T15:24:37-05:00",
"links": {
"contactGoalLists": "https://:account.api-us1.com/api/3/lists/4/contactGoalLists",
"user": "https://:account.api-us1.com/api/3/lists/4/user",
"addressLists": "https://:account.api-us1.com/api/3/lists/4/addressLists"
},
"id": "4",
"user": null
}
],
"meta": {
"total": "4"
}
}
403 Forbidden
Opmerkingen
0 opmerkingen
Artikel is gesloten voor opmerkingen.