Choose your language:
    List all fieldsets
    Returns
    Returns an array of fieldset objects.

    Examples

    Example code:
    const { SiteClient } = require('datocms-client');
    async function run() {
    const client = new SiteClient('YOUR-API-TOKEN');
    const modelIdOrApiKey = 'blog_post';
    const fieldsets = await client.fieldsets.all(modelIdOrApiKey);
    fieldsets.forEach((fieldset) => {
    console.log(fieldset);
    });
    }
    run();
    Returned output:
    > node example.js
    {
    "id": "124",
    "title": "SEO-related fields",
    "hint": "Please fill in these fields!",
    "collapsible": true,
    "startCollapsed": false,
    "position": 1,
    "itemType": "44"
    }