View Content
This section lets you get all the content registered on Conscent.ai.
Authorization
GET
{{API_URL}}/content/client
Client API Key and Secret must be passed in Authorization Headers using Basic Auth. With API Key as the Username and API Secret as the password.
Query Parameters
Name
Type
Description
pageNumber
Integer
Pagination Parameters - which page of the contents list you would like to retrieve (default = 1). Since each page will have 20 (default) individual contents ONLY.
pageSize
Integer
Pagination Parameters - the number of individual contents to retrieve on each page (default = 20).
curl -X GET '{API_URL}/api/v1/content/client' \
-H 'Authorization: Basic RDZXN1Y4US1NTkc0V1lDLVFYOUJQMkItOEU3QjZLRzpUNFNHSjlISDQ3TVpRWkdTWkVGVjZYUk5TS1E4RDZXN1Y4UU1ORzRXWUNRWDlCUDJCOEU3QjZLRw=='
var axios = require("axios");
var config = {
method: "get",
url: "{API_URL}/api/v1/content/client",
headers: {
Authorization:
"Basic RDZXN1Y4US1NTkc0V1lDLVFYOUJQMkItOEU3QjZLRzpUNFNHSjlISDQ3TVpRWkdTWkVGVjZYUk5TS1E4RDZXN1Y4UU1ORzRXWUNRWDlCUDJCOEU3QjZLRw==",
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "{API_URL}/api/v1/content/client",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic RDZXN1Y4US1NTkc0V1lDLVFYOUJQMkItOEU3QjZLRzpUNFNHSjlISDQ3TVpRWkdTWkVGVjZYUk5TS1E4RDZXN1Y4UU1ORzRXWUNRWDlCUDJCOEU3QjZLRw=="
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
{
"content": [
{
"title": "Tastiest ice creams",
"contentId": "Client Story Id 2",
"price": 12,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://www.anish.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"imageUrl": "https://www.google.com/logos/doodles/2022/get-vaccinated-wear-a-mask-save-lives-january-20-copy-6753651837109686-2xa.gif",
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Coolest superheroes",
"contentId": "Client Story Id 3",
"price": 10,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://www.google.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"imageUrl": "https://www.google.com/logos/doodles/2022/get-vaccinated-wear-a-mask-save-lives-january-20-copy-6753651837109686-2xa.gif",
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Best of netflix",
"contentId": "Client Story Id 4",
"price": 1,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://www.google.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"imageUrl": "https://www.google.com/logos/doodles/2022/get-vaccinated-wear-a-mask-save-lives-january-19-copy-6753651837109685-2xa.gif",
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Depths of the Ocean",
"contentId": "Client Story Id 9",
"price": 0.01,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://www.google.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Test story for API functionality",
"contentId": "testingID31",
"price": 0.1,
"currency": "INR",
"contentType": null,
"duration": 2,
"url": "https://www.anish.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [
"anish"
],
"sections": [],
"publicationDate": null
},
{
"title": "apple",
"contentId": "apple",
"price": 10,
"currency": "INR",
"contentType": null,
"duration": 5,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/apple",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"imageUrl": null,
"tags": [
"games",
"sports"
],
"sections": [],
"publicationDate": null
},
{
"title": "mango",
"contentId": "mango",
"price": 10,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/mango",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"imageUrl": null,
"tags": [
"b",
"apple",
"goa",
"gannn"
],
"sections": [],
"publicationDate": null
},
{
"title": "Client Story Id 5",
"contentId": "Client Story Id 5",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client%2520Story%2520Id%25205",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "banana\n",
"contentId": "banana\n",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/banana",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "banana ",
"contentId": "banana ",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/banana",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "content 1",
"contentId": "content1",
"price": 1,
"currency": "INR",
"contentType": null,
"duration": 2,
"url": "www.google.com",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "banana",
"contentId": "banana",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/banana",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Client%20Story%20Id%205",
"contentId": "Client%20Story%20Id%205",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client%252520Story%252520Id%2525205",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "garden",
"contentId": "garden",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/garden",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "eden",
"contentId": "eden",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/eden",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "wight",
"contentId": "wight",
"price": null,
"currency": "INR",
"contentType": null,
"duration": 1,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/wight",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Client Story Id 3",
"contentId": "Client%20Story%20Id%203",
"price": null,
"currency": null,
"contentType": null,
"duration": null,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client%20Story%20Id%203",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Client Story Id 4",
"contentId": "Client%20Story%20Id%204",
"price": null,
"currency": null,
"contentType": null,
"duration": null,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client%20Story%20Id%204",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "Client Story Id 2",
"contentId": "Client%20Story%20Id%202",
"price": null,
"currency": null,
"contentType": null,
"duration": null,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client%20Story%20Id%202",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
},
{
"title": "can u play?",
"contentId": "Story Id 1",
"price": null,
"currency": null,
"contentType": null,
"duration": null,
"url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Story%20Id%201",
"download": {},
"bundleContentIds": [],
"pixels": {
"facebook": {
"events": []
},
"google": {}
},
"excludeFromSubscription": false,
"categories": [],
"tags": [],
"sections": [],
"publicationDate": null
}
],
"pagination": {
"pageNumber": 1,
"pageSize": 20,
"totalRecords": 210,
"totalPages": 11
}
}
To retrieve the details of one content at a time - Pass the clientContentId after client.
{{BASE_URL}}/content/client/Client Story Id 2
Last updated