Get list attributes by project
1 min
GET
https://api.optimizely.com/v2/list_attributes
Query Parameters
- project_idinteger<int64>requiredDescriptionFormatint64
Responses
200
- ListAttribute[]
- account_idinteger<int64>DescriptionFormatint64
- archivedbooleanDescriptionDefaultfalse
- aws_access_keystringDescription
- aws_secret_keystringDescription
- createdstring<date-time>DescriptionFormatdate-time
- descriptionstringDescription
- idinteger<int64>DescriptionFormatint64
- key_fieldstringrequiredDescription
- last_modifiedstring<date-time>DescriptionFormatdate-time
- list_contentstringDescription
- list_typestring<cookies | query_parameters | zip_codes | js_variables>DescriptionAllowedcookiesquery_parameterszip_codesjs_variables
- namestringrequiredExampleDescriptionPattern^[-_0-9A-Za-z]+$
- project_idinteger<int64>requiredDescriptionFormatint64
- s3_pathstringDescription
401
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
403
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
404
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
default
- Error
- codestring
- messagestring
- messagesobject
- uuidstring<uuid>Formatuuid
curl
curl --request GET \
--url 'https://api.optimizely.com/v2/list_attributes?project_id=integer%3Cint64%3E' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.optimizely.com/v2/list_attributes?project_id=integer<int64>", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.optimizely.com/v2/list_attributes?project_id=integer<int64>")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.optimizely.com/v2/list_attributes?project_id=integer<int64>"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Return all List Attributes in the specified Project
[
{
"account_id": "",
"archived": false,
"aws_access_key": "",
"aws_secret_key": "",
"created": "",
"description": "",
"id": "",
"key_field": "",
"last_modified": "",
"list_content": "",
"list_type": "",
"name": "SubscriberStatus",
"project_id": "",
"s3_path": ""
}
]401
// Invalid credentials
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}403
// You do not have permission to access to the List Attributes in the specified Project
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}404
// List Attributes not found
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}default
// Unexpected error
{
"code": "",
"message": "",
"messages": {},
"uuid": ""
}