Request a list of pages

    Bludit API provides the feature to request a particular list of pages.

    All request to the API need the API Token, you can find the token in the settings of the plugin.

    Request

    Response

    {
        "status": "0",
        "message": "List of pages, amount of items: 15",
        "data": [
            {
                "key": "my-dog",
                "title": "My dog",
                "content": "...",
                "contentRaw": "...",
                "description": "...",
                "date": "2018-08-08 00:09:38",
                "dateUTC": "2018-08-07 22:09:38",
                "permalink": "https://www.example.com/my-dog",
                "coverImage": false,
                "coverImageFilename": false
            },
            {
                ....
            }
        ]
    }

    CURL command example

    The follow request returns a list of published pages, limited by the API, you can change the limit in the API settings.

    $ curl  -X GET \
        -G "https://www.example.com/api/pages" \
        -d "token=80a09ba055b73f68e3c9e7c9ea12b432"

    Output:

    {
            "status": "0",
            "message": "List of pages, number of items: 15",
            "data": [
            {
                "key": "my-dog",
                "title": "My dog",
                "content": "...",
                "contentRaw": "...",
                "description": "...",
                "date": "2018-08-08 00:09:38",
                "dateUTC": "2018-08-07 22:09:38",
                "permalink": "https://www.example.com/my-dog",
                "coverImage": false,
                "coverImageFilename": false
                    },
                    {
                            ....
                    }
            ]
    }

    Javascript: AJAX with jQuery

    Example of AJAX request with the Javascript library jQuery.

    $.ajax({
        url: "https://www.example.com/api/pages",
        method: "GET",
        data: "token=80a09ba055b73f68e3c9e7c9ea12b432",
        dataType: 'json',
        success: function(json) {
            console.log(json);
        }
    });
    Download
    Download the source code of the example in jQuery.
    Collaborate with us and edit this page