Retrieve changes for a project.
1 min
GET
https://api.optimizely.com/v2/changes
Query Parameters
- project_idinteger<int64>requiredDescriptionFormatint64
- idinteger[]Description
- start_timestring<date-time>DescriptionFormatdate-time
- end_timestring<date-time>DescriptionFormatdate-time
- userstring[]Description
- entity_typestring[]Description
- sourcestringDescription
- entitystring[]Description
- per_pageintegerDescriptionDefault25Maximum100
- pageintegerDescriptionDefault1
Responses
200
- ChangeHistoryChange[]
- change_typestring<archive | create | update | delete | publish>DescriptionAllowedarchivecreateupdatedeletepublish
- changesChangeDetail[]Description
- afterDescription
- beforeDescription
- descriptionstringDescription
- propertystringDescription
- createdstring<date-time>DescriptionFormatdate-time
- entityEntity
- api_urlstring<url>DescriptionFormaturl
- idinteger<int64>DescriptionFormatint64
- namestringDescription
- sub_typestringDescription
- typestringDescription
- ui_urlstring<url>DescriptionFormaturl
- idinteger<int64>DescriptionFormatint64
- project_idinteger<int64>requiredDescriptionFormatint64
- revisionsChangeRevision
- currentRevision
- idintegerDescription
- previousRevision
- idintegerDescription
- sourcestring<ui | api>DescriptionAlloweduiapi
- summarystringDescription
- userUser
- display_namestringDescription
- emailstringrequiredDescription
- first_namestringDescription
- idstringrequiredDescription
- last_namestringDescription
- profile_image_urlstringDescription
curl
curl --request GET \
--url 'https://api.optimizely.com/v2/changes?project_id=integer%3Cint64%3E&per_page=25&page=1' \
--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/changes?project_id=integer<int64>&per_page=25&page=1", 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/changes?project_id=integer<int64>&per_page=25&page=1")
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/changes?project_id=integer<int64>&per_page=25&page=1"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Returns changes.
[
{
"change_type": "",
"changes": [
{
"after": "",
"before": "",
"description": "",
"property": ""
}
],
"created": "",
"entity": {
"api_url": "",
"id": "",
"name": "",
"sub_type": "",
"type": "",
"ui_url": ""
},
"id": "",
"project_id": "",
"revisions": {
"current": {
"id": 0
},
"previous": {
"id": 0
}
},
"source": "",
"summary": "",
"user": {
"display_name": "",
"email": "",
"first_name": "",
"id": "",
"last_name": "",
"profile_image_url": ""
}
}
]