Lead Marvels Dashboard

Developer Documentation

Toggle sidebar

Resources API

Your published resources, with their tags, hero image and publish date.

Get https://lmdashboard.com/api/company/{company_slug}/resources

Request

Security Token Required
Path Parameters
Company Slug required
String
Query String
Date Between filter[between]
start date , end date
Search Text filter[search_text]
String
Sort sort
published_at, -published_at, title , -title
Select asc or desc by adding a dash before the sort type
Limit limit
Integer — returns at most this many resources in total.
Applied after sort and any filters, so ?sort=-published_at&limit=10 gives the ten most recent. total reports the capped count and there is no next page. A limit larger than the number of matches has no effect.
Page Size per_page
Integer, 1–250. Defaults to 250.
Values above 250 are capped and unusable values fall back to the default — the per_page field in the response always reports the size used. Combine with limit to page through a capped set, e.g. ?limit=10&per_page=4 gives three pages.
Page page
Integer — defaults to 1. Follow next_page_url, which carries your other parameters.
Optional Extras include
A comma-separated list of extras to add to each resource. Nothing is added unless you ask, so leaving this off gives you the response you already get.
assets — the downloadable file, the video and the thumbnail, as absolute links.
member_only — boolean, whether the resource sits behind membership.
Combine them: ?include=assets,member_only. Names are case-sensitive, and an unrecognised one returns a 400 listing the ones that work.

Response

Data

Array of Company Resources
id
Integer
title
string
slug
string
sub_title
string
published_at
date/time
search_text
string
hero-image
string
company
Array
name
string
slug
string
tags
Nested Array
id
integer
name
string
type
string
slug
string
member_only
Boolean — only present when include=member_only is requested. True when the resource is restricted to members.
assets
Nested Array — only present when include=assets is requested. A resource may have several entries, or none.
kind
file, video or thumbnail
url
string — an absolute link. For a video this is the Vimeo or YouTube page.
extension
string — files and thumbnails only, e.g. pdf, png
name
string — the original filename where we have one. Files only, and not always present.
bytes
integer — file size. Present for files uploaded through the current tooling only.
gated
boolean — files and videos only. True when the asset is presented behind a form on its resource page.

Links

first
https://lmdashboard.com/api/company/{company}/resources/?page=1
last
https://lmdashboard.com/api/company/{company}/resources/?page=10
previous
null
next
https://lmdashboard.com/api/company/{company}/resources/?page=2

Meta

current_page
Integer — 1 unless you asked for another page.
from
Integer — the position of the first row on this page.
to
Integer — the position of the last row on this page.
per_page
Integer, at most 250 — the page size actually used.
total
Integer — how many of your resources matched.
With no filters this is your whole published library, so it is the number to page through. Passing limit caps it: ask for ten and this reads 10.
last_page
Integer — total divided by per_page, rounded up.
path
string
links
array
url
string|null
label
string
active
boolean

Sample Array of Company Resources

    "data" => [
        "id" => 1,
        "title" => "The resource title",
        "sub_title" => "The resource sub title",
        "published_at" => "2020-04-01T16:00:00.000000Z",
        "slug" => "the-resource-title",
        "search_text" => "features that you should consider given your business needs",
        "hero_image" => "https://store.lmknowledgehub.com/storage/companyid/sample-image.jpg",
        "member_only" => true,
        "assets" => [
          [
            "kind" => "file",
            "url" => "https://store.lmknowledgehub.com/storage/pages/files/sample.pdf",
            "extension" => "pdf",
            "name" => "2012 Yearbook - Trends and Issues in Business Education.pdf",
            "bytes" => 56592016,
            "gated" => false,
          ],
          [
            "kind" => "video",
            "url" => "https://vimeo.com/717620097",
            "gated" => false,
          ],
        ],
        "company" =>
          [
            "name" => "eBook",
            "slug" => "ebook",
          ],
        "tags" => [
          [
            "name" => "eBook",
            "id" => 8,
            "type" => "content_type",
            "slug" => "ebook",
          ],
          [
            "name" => "Document Management",
            "id" => 85,
            "type" => "topic",
            "slug" => "document-management",
          ],
        ],
     ],
    "links" => [
        "first" => "https://lmdashboard.com/api/company/company-slug/resources?sort=-published_at&page=1",
        "last" => "https://lmdashboard.com/api/company/company-slug/resources?sort=-published_at&page=3",
        "prev" => null,
        "next" => "https://lmdashboard.com/api/company/company-slug/resources?sort=-published_at&page=2",
    ],
    "meta" => [
        "current_page" => 1,
        "from" => 1,
        "last_page" => 3,
        "links" => [
        [
            "url" => null,
            "label" => "« Previous",
            "active" => false,
        ],
        [
            "url" => "https://lmdashboard.com/api/company/company-slug/resources?page=1",
            "label" => "1",
            "active" => true,
        ],
        [
            "url" => "https://lmdashboard.com/api/company/company-slug/resources?page=2",
            "label" => "2",
            "active" => false,
        ],
        [
            "url" => "https://lmdashboard.com/api/company/company-slug/resources?page=3",
            "label" => "3",
            "active" => false,
        ],
        [
            "url" => "https://lmdashboard.com/api/company/company-slug/resources?page=2",
            "label" => "Next »",
            "active" => false,
        ],
    ],
    "path" => "https://lmdashboard.com/api/company/company-slug/resources",
    "per_page" => 250,
    "to" => 250,
    "total" => 612,
    ]