Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Reading Content Types

Reading Content Types

Using the Administration API in combination with master key authentication you can read individual or multiple content type objects from your code.

Read All Content Types

You can use either the App ID or the Project ID to get all content types of an application. Here is request using the App ID. To use the Project ID, simply substitute it for the App ID in the code.

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types',
    type: "GET",
    headers: {
        "Authorization" : "Masterkey your-master-key"
    },
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
})
Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types
Headers:
    Authorization  Masterkey your-master-key
Response:
    Status: 200 OK
    Content-Type: application/json

Read a Content Type by ID

To get single content type info use the id in the URL as follows:

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types/type-id',
    type: "GET",
    headers:
    {
        "Authorization" : "Masterkey your-master-key"
    },
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
})
Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types/type-id
Headers:
    Authorization  Masterkey your-master-key
Response:
    Status: 200 OK
    Content-Type: application/json

Read a Content Type by Name

You can also get the content type info by name.

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types/type-name',
    type: "GET",
    headers:
    {
        "Authorization" : "Masterkey your-master-key"
    },
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
})
Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types/type-name
Headers:
    Authorization  Masterkey your-master-key
Response:
    Status: 200 OK
    Content-Type: application/json

Read Content Types by Filter

By adding the X-Everlive-Filter header in the request you can supply make a filter for the content types.

//Ajax request using jQuery
var filter = {
    "TypeName": type-name
};
$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types',
    type: "GET",
    headers:
    {
        "Authorization" : "Masterkey your-master-key",
        "X-Everlive-Filter": JSON.stringify(filter)
    },
    success: function(data){
        alert(JSON.stringify(data));
    },
    error: function(error){
        alert(JSON.stringify(error));
    }
})
Request:
    GET https://api.everlive.com/v1/Metadata/Applications/your-app-id/Types
Headers:
    Authorization  Masterkey your-master-key
    X-Everlive-Filter { "TypeName": type-name }
Response:
    Status: 200 OK
    Content-Type: application/json

See Also


Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.