Request a particular page

    Bludit API provides the feature to request a particular page.

    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": "Page filtered by key: my-dog",
        "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

    You can request a particular page by the page key, the follow example show how to get the page with the key my-dog.

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

    Output:

    {
        "status": "0",
        "message": "Page filtered by key: my-dog",
        "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 library jQuery.

    $.ajax({
            url: "https://www.example.com/api/pages/my-dog",
            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