Models

The engine works on the idea of content models. This document describe how to request the custom models assigned to you and get information about related inputs.


Endpoint

GET /content/article/{content-model-id}/

Request Headers:

Authentication: Token <user-generated-token>

Request Payload:

{}

Response:

{
    "success": true/false,
    "inputs":[
        {
            "label": "Input label for data",
            "key": "Input key for data to format data for article request payload",
            "type": "array/string",
            "autocomplete": "on/off",
            "searchApi": "a link to autocomplete api if available",
            "apiKey": "auth token for autocomplete api",
            "regex": "Regular expression to match against input for client side validation",
            "placeholder": "Placeholder text for empty input box"
        },
    ],
    "code": "some numeric code",
    "message": "some message explaining code and status"
}

Curl:

curl -X GET 'https://api.brahmastra.tech/content/article/<model_id>/'  -H'Authorization: Token <user-generated-token>'