Skip to content

GET /api/v3/drive-templates/constants/elements/public

Summary

GET /drive-templates/elements/public

Description

Returns a paginated list of available template elements that can be used when building a template.

Tags: templates

Parameters

Header Parameters

Name Type Required Description Example
Authorization string ✓ Yes Bearer {AuthToken}
Content-Type string ✓ Yes application/json
Accept string ✓ Yes application/json
AppIdV3 string ✓ Yes LCUID-LAP-********-****-****-****-************

Request Body

Content Type: application/json

Schema

Type: object

Properties:

  • query (string)
  • element_class (string)
  • type (string)

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean): Indicates if the request was successful
  • drive_template_elements (object) Type: object

Properties:

  • current_page (integer): The current page number
  • data (array)
  • from (string)
  • last_page (integer)
  • links (array)

    • Array items: object Type: object

    Properties:

    • url (string)
    • label (string)
    • active (boolean)
  • per_page (integer)

  • to (string)
  • total (integer)
Example Response
{
    "success": true,
    "drive_template_elements": {
        "current_page": 1,
        "data": [],
        "from": null,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v3/drive-templates/constants/elements/public?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "per_page": 100,
        "to": null,
        "total": 0
    }
}

Example Implementations

Bash (cURL)

curl --request GET \
    --get "https://api.lucit.app/api/v3/drive-templates/constants/elements/public" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************" \
    --data "{
    \"query\": \"aliquid\",
    \"element_class\": \"aliquid\",
    \"type\": \"aliquid\"
}"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/drive-templates/constants/elements/public"
);

const headers = {
    "Authorization": "Bearer {AuthToken}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "AppIdV3": "LCUID-LAP-********-****-****-****-************",
};

let body = {
    "query": "aliquid",
    "element_class": "aliquid",
    "type": "aliquid"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.lucit.app/api/v3/drive-templates/constants/elements/public',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
        'json' => [
            'query' => 'aliquid',
            'element_class' => 'aliquid',
            'type' => 'aliquid',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/drive-templates/constants/elements/public'
payload = {
    "query": "aliquid",
    "element_class": "aliquid",
    "type": "aliquid"
}
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example Responses

200 Response

{
    "success": true,
    "drive_template_elements": {
        "current_page": 1,
        "data": [],
        "from": null,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v3/drive-templates/constants/elements/public?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "per_page": 100,
        "to": null,
        "total": 0
    }
}

← Back to drive-templates index | Back to main index