Choose your language:
    List all automatically created upload tags

    The results are sorted by name and paginated by default.

    Query parameters
    filter  object  Optional

    Attributes to filter tags

    page  object  Optional

    Attributes to manage results pagination

    Returns
    Returns an array of upload_smart_tag objects.

    Examples

    Example code:
    const { SiteClient } = require('datocms-client');
    async function run() {
    const client = new SiteClient('YOUR-API-TOKEN');
    const uploadSmartTags = await client.uploadSmartTags.all({
    filter: {
    query: 'foobar'
    },
    page: {
    offset: 200,
    limit: 20
    }
    });
    uploadSmartTags.forEach((uploadSmartTag) => {
    console.log(uploadSmartTag);
    });
    // or, if you want to fetch all the pages with just one call:
    const uploadSmartTags = await client.uploadSmartTags.all(
    {
    filter: {
    query: 'foobar'
    }
    },
    {
    allPages: true
    }
    );
    uploadSmartTags.forEach((uploadSmartTag) => {
    console.log(uploadSmartTag);
    });
    }
    run();
    Returned output:
    > node example.js
    {
    "id": "42",
    "name": "building"
    }