Adobe Workfront · updated

Workfront API: choosing fields, paging through results and the query limits

By default a search returns a small set of common fields and at most 100 results. The fields parameter adds the fields you name, and $$LIMIT with $$FIRST pages through larger sets, up to 2,000 results per request. Always sort when paging, or pages can repeat or skip records.

In plain words

Ask only for what you need, and ask in pages. Large, unsorted requests are slow and can return the same record twice.

The fields parameter

You writeYou get
fields=plannedStartDate,priorityThose fields added to the default ones
fields=ownerThe related owner, with its name and ID only
fields=owner:title,owner:phoneNumberNamed fields of the related object
fields=tasksA nested collection, each with name and ID
fields=assignments:*Every available field of the related collection
fields=DE:CustomTextA custom field, by its name with the DE: prefix

Query limits from Adobe's page

LimitValueMeaning
Default number of results100Used when no $$LIMIT is given
Maximum number of results2,000The largest $$LIMIT; a larger one returns an IllegalArgumentException
Maximum field depth4Levels away from the object being queried
Maximum number of objects50,000Primary and secondary objects combined
Maximum number of fields1,000,000When the result has fewer than 50,000 objects
Maximum batch creates or updates100Objects per bulk request

Paging

$$LIMIT sets how many results to return and $$FIRST how many to skip, so $$FIRST=200&$$LIMIT=50 returns results 201 to 250. Adobe says to add a sort, such as ID_Sort=asc, so results come back in the same order on every page. Its troubleshooting note explains that without a defined order the database may return rows in a different order on each call, which causes duplicates and missing records.

Paging with a stable order

GET /attask/api/<supported-version>/project/search?$$FIRST=0&$$LIMIT=200&ID_Sort=asc
GET /attask/api/<supported-version>/project/search?$$FIRST=200&$$LIMIT=200&ID_Sort=asc

How to page through a large set

  1. Call the count address first to learn how many records match.
  2. Choose a page size up to 2,000 and add ID_Sort=asc.
  3. Request pages by raising $$FIRST by the page size each time.
  4. Stop when a page returns fewer records than the page size.
  5. Keep nested collections out of big pages where you can: they count towards the 50,000-object limit.

Related tools and pages on this site

Questions

Why do I only get 100 results?

That is the default when no $$LIMIT is specified. Add $$LIMIT, up to 2,000, and page with $$FIRST.

Does $$FIRST=200 start at result 200 or 201?

At the 201st. Adobe suggests thinking of $$FIRST as the number of results to skip; $$FIRST=0 returns the first result.

Why do I see duplicates across pages?

The order is not defined unless you sort. Adobe's fix is to add a sort by ID: ID_Sort=asc.

Sources

Facts about Adobe's products on this page are from the linked Adobe pages, read on the date shown beside each. Explanations, steps and examples are ours unless marked as Adobe's. If Adobe's page and this one differ, Adobe's page is right.

Surge Migrate is not affiliated with Adobe and claims no Adobe partner status. Adobe product names are trademarks of Adobe.

Surge Migrate

Moving the website itself

This page answers one Adobe Workfront question. Surge Migrate moves a website from any CMS to any CMS. Converted automatically. Checked before you install.

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page becomes an Edge Delivery document, an AEM Core Component page and import files for 7 other systems. 10 pages free; 500 or 2,000 pages in one paid run.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →