API Introduction

Contents

    The Bludit API (Application Programming Interface) is a plugin to provide an easy integration with Bludit. With this plugin, you can retrieve or update data from the database with just an HTTP request.

    Installation

    Bludit comes with the plugin API pre-installed, you only need to activate it.

    Go to Admin panel > Plugins > API > Activate.

    URL

    The URL of the API is:

    {protocol}://{domain}/api/{endpoint}

    Example:

    https://www.example.com/api/pages

    Endpoints and Methods

    endpoint method description
    /pages GET Returns a list of pages
    /pages/{key} GET Returns a page, filtered by the page key
    /pages POST Create a new page
    /pages/{key} PUT Edit a page
    /pages/{key} DELETE Delete a page
    /tags GET Returns a list of tags and pages keys related to the tag
    /tags/{key} GET Returns a tag information, filtered by the tag key

    HTTP Response

    The response format is JSON, here is a list of keys from the JSON object.

    key type description
    message string Returns a little message about the execution.
    data array The content of the response for the endpoint.

    HTTP status code

    HTTP code description
    200 Response successfull.
    400 Bad request, missing inputs.
    401 The API token or authentication token is missing or is wrong.