Stencil Documentation
  • General
  • API
    • Authentication
      • Account
    • Pagination
    • Status Code and Throttling
    • Endpoints
      • Projects
      • Templates
      • Images
      • Collections
      • PDFs
      • Airtable
    • Charts
  • Using Stencil
    • Template Editor (New)
    • Template Editor (Legacy)
      • Limited Markdown Supports
      • Anchoring Element
      • Using Custom Font
      • Circular Text Positioning
    • White Label for Business
      • Setting Up Your First Client
      • DNS Setup with Cloudflare
  • Guides
    • Airtable Integration
      • Basic
    • Integromat Integration
      • Connection
      • Instant Trigger
    • Zapier Integration
      • Authentication
      • Trigger - New Image
      • Action - Create Image
    • Secure Signed Image
      • Basic
    • Query String Integration
      • Basic
      • Cache
    • Forms Integration
    • Case Studies
      • Generate Instagram Post from WooCommerce
      • Generate Open Graph Image for WordPress
      • Generate Personalized SendGrid Email Campaigns
      • Sending Charts to Twitter
      • Generate Instagram Post from Shopify
      • Automating Webflow Open Graph Image
      • Generate certificate of accomplishment
      • Automate Candidate's Certificate Generation
  • LINKS
    • Back to Stencil
    • Got bug?
    • Need feature?
    • Blog
Powered by GitBook
On this page
  • Querying for next set of result
  • Querying for previous set of result
  • Limiting result

Was this helpful?

  1. API

Pagination

Retrieving large result

All results returned are paginated by default.

{
    "meta": {
        "next": "xqErdcgltHGs",
        "previous": null,
        "total_count": 39
    },
    "results": [
        {
            "created_at": "2021-05-06T07:00:21Z",
            "description": "Test",
            "favorite": false,
            "id": "f2eb2dab-a861-4960-b5f4-d54c61552f7d",
            "name": "Test project",
            "self": "http://localhost:4000/api/v1/projects/f2eb2dab-a861-4960-b5f4-d54c61552f7d",
            "templates": "http://localhost:4000/api/v1/projects/f2eb2dab-a861-4960-b5f4-d54c61552f7d/templates",
            "updated_at": "2021-05-06T07:00:21Z"
        },
        ...
    ]
}

meta field contains the pagination metadata and result field contains the limited result set.

Querying for next set of result

Append after query string with the value from next metadata field.

https://api.usestencil.com/v1/projects?after=xqErdcgltHGs

Querying for previous set of result

Append before query string with the value from previous metadata field.

https://api.usestencil.com/v1/projects?before=xqErdcgltHGs

Limiting result

Append limit=<integer> to limit the results set

https://api.usestencil.com/v1/projects?limit=10

You can combine limit with either after and before

PreviousAccountNextStatus Code and Throttling

Last updated 3 years ago

Was this helpful?