GET /asset-lineages
1 min
GET
https://api.cmp.optimizely.com/v3/asset-lineages
Query Parameters
- asset_idstringExampleDescription
- used_instringExampleDescriptionAllowedexternal
- created_at__fromstring<date-time>ExampleDescriptionFormatdate-time
- created_at__tostring<date-time>ExampleDescriptionFormatdate-time
- offsetintegerExampleDescriptionDefault0Minimum0
- page_sizeintegerExampleDescriptionDefault10Minimum1Maximum100
Responses
200
- object
- dataAssetLineageResponse[]requiredDescription
- idstringrequiredExampleDescription
- namestringrequiredExampleDescription
- asset_idstringrequiredExampleDescription
- version_idstringrequiredExampleDescription
- used_instring<external>requiredExampleDescriptionAllowedexternal
- uristringrequiredExampleDescription
- icon_urlstringrequiredExampleDescription
- rendition_idstringrequiredExampleDescription
- created_atstring<date-time>requiredExampleDescriptionFormatdate-time
- linksobjectrequiredDescription
- selfstringrequiredExampleDescription
- assetstringrequiredExampleDescription
- paginationobjectrequired
- Pagination
- nextstringrequiredExampleDescription
- previousstringrequiredDescription
- object
- nextstringExample
400
- ErrorExample
{ "message": "Unsupported arguments: a,b,c" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
401
- ErrorExample
{ "message": "Unauthorized" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
403
- ErrorExample
{ "message": "You do not have the permission to perform this operation" }Description- messagestringrequiredExampleDescription
- errorsmap<string, string>Description
curl
curl --request GET \
--url 'https://api.cmp.optimizely.com/v3/asset-lineages?offset=5&page_size=10' \
--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.cmp.optimizely.com/v3/asset-lineages?offset=5&page_size=10", 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.cmp.optimizely.com/v3/asset-lineages?offset=5&page_size=10")
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.cmp.optimizely.com/v3/asset-lineages?offset=5&page_size=10"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// List of fetched asset lineage
{
"data": [
{
"id": "5d7f910551b00a722e0418830cee6631",
"name": "Sample Name",
"asset_id": "5d7f910551b00a722e0418830cee6632",
"version_id": "5d7f910551b00a722e0418830cee6633",
"used_in": "external",
"uri": "https://somewebsite.com",
"icon_url": "https://somewebsite.com/abc.png",
"rendition_id": "1d7491a891b00a721e0419630a7f8a4b",
"created_at": "2019-10-06T13:15:30Z",
"links": {
"self": "https://api.cmp.optimizely.com/v3/assets/5d7f910551bw0a722e0418830cee6632/lineages/5d7f910551bw0a722e0418830cee6631",
"asset": "https://api.cmp.optimizely.com/v3/articles/5d7f910551bw0a722e0418830cee6632"
}
}
],
"pagination": {}
}400
// Client error
{
"message": "Not found",
"errors": ""
}401
// Authorization error
{
"message": "Not found",
"errors": ""
}403
// Permission error
{
"message": "Not found",
"errors": ""
}