How to receive all fields of multiple termbase entries without exceeding URL length limit

Hi,

I would like to read several termbase entries through the LC rest API, and I would like to query all fields of them. 

According to the docu, optional fields are not returned by default, so I have to specify all required fields in the fields parameter. This alone is already very long, ~ 3300 characters:

fields=humanReadableId,languages.language.languageCode,languages.language.englishName,languages.terms.text,languages.terms.systemStatus,languages.terms.termbaseFieldValues.termbaseFieldId,languages.terms.termbaseFieldValues.name,languages.terms.termbaseFieldValues.value,languages.terms.termbaseFieldValues.fieldValueLinks.type,languages.terms.termbaseFieldValues.fieldValueLinks.value,languages.terms.termbaseFieldValues.createdAt,languages.terms.termbaseFieldValues.lastModifiedAt,languages.terms.termbaseFieldValues.createdBy.email,languages.terms.termbaseFieldValues.createdBy.firstName,languages.terms.termbaseFieldValues.createdBy.lastName,languages.terms.termbaseFieldValues.createdBy.anonymized,languages.terms.termbaseFieldValues.createdBy.anonymizedUserName,languages.terms.termbaseFieldValues.lastModifiedBy.email,languages.terms.termbaseFieldValues.lastModifiedBy.firstName,languages.terms.termbaseFieldValues.lastModifiedBy.lastName,languages.terms.termbaseFieldValues.lastModifiedBy.anonymized,languages.terms.termbaseFieldValues.lastModifiedBy.anonymizedUserName,languages.terms.createdAt,languages.terms.lastModifiedAt,languages.terms.createdBy.email,languages.terms.createdBy.firstName,languages.terms.createdBy.lastName,languages.terms.createdBy.anonymized,languages.terms.createdBy.anonymizedUserName,languages.terms.lastModifiedBy.email,languages.terms.lastModifiedBy.firstName,languages.terms.lastModifiedBy.lastName,languages.terms.lastModifiedBy.anonymized,languages.terms.lastModifiedBy.anonymizedUserName,languages.termbaseFieldValues.termbaseFieldId,languages.termbaseFieldValues.name,languages.termbaseFieldValues.value,languages.termbaseFieldValues.fieldValueLinks.type,languages.termbaseFieldValues.fieldValueLinks.value,languages.termbaseFieldValues.createdAt,languages.termbaseFieldValues.lastModifiedAt,languages.termbaseFieldValues.createdBy.email,languages.termbaseFieldValues.createdBy.firstName,languages.termbaseFieldValues.createdBy.lastName,languages.termbaseFieldValues.createdBy.anonymized,languages.termbaseFieldValues.createdBy.anonymizedUserName,languages.termbaseFieldValues.lastModifiedBy.email,languages.termbaseFieldValues.lastModifiedBy.firstName,languages.termbaseFieldValues.lastModifiedBy.lastName,languages.termbaseFieldValues.lastModifiedBy.anonymized,languages.termbaseFieldValues.lastModifiedBy.anonymizedUserName,termbaseFieldValues.termbaseFieldId,termbaseFieldValues.name,termbaseFieldValues.value,termbaseFieldValues.fieldValueLinks.type,termbaseFieldValues.fieldValueLinks.value,termbaseFieldValues.createdAt,termbaseFieldValues.lastModifiedAt,termbaseFieldValues.createdBy.email,termbaseFieldValues.createdBy.firstName,termbaseFieldValues.createdBy.lastName,termbaseFieldValues.createdBy.anonymized,termbaseFieldValues.createdBy.anonymizedUserName,termbaseFieldValues.lastModifiedBy.email,termbaseFieldValues.lastModifiedBy.firstName,termbaseFieldValues.lastModifiedBy.lastName,termbaseFieldValues.lastModifiedBy.anonymized,termbaseFieldValues.lastModifiedBy.anonymizedUserName,createdAt,lastModifiedAt,createdBy.email,createdBy.firstName,createdBy.lastName,createdBy.anonymized,createdBy.anonymizedUserName,lastModifiedBy.email,lastModifiedBy.firstName,lastModifiedBy.lastName,lastModifiedBy.anonymized,lastModifiedBy.anonymizedUserName

The problem is that if I would like to specify e.g. 20 entry IDs like 

humanReadableIds=LC6570452991d6c955906daf37&humanReadableIds=LC65707c7082468403c1f9e318&humanReadableIds=LC65707cf5edee745afa957d55&humanReadableIds=LC65707e3082468403c1f9e509&humanReadableIds=LC65707f0382468403c1f9e6de&humanReadableIds=LC657081c1edee745afa98b06d&humanReadableIds=LC6570821682468403c1fd023d&humanReadableIds=LC65708372edee745afa9a787e&humanReadableIds=LC657084e582468403c1fff69a&humanReadableIds=LC657086ec82468403c1015b43&humanReadableIds=LC657087e2edee745afa9cd67a&humanReadableIds=LC657094a0edee745afaadb66b&humanReadableIds=LC65719422edee745afaf41032&humanReadableIds=LC6571958aedee745afaf420dd&humanReadableIds=LC6571962982468403c14c177c&humanReadableIds=LC65719678edee745afaf42829&humanReadableIds=LC6571972cedee745afaf43a28&humanReadableIds=LC6571998bedee745afaf9d717&humanReadableIds=LC65719b8082468403c15526e6&humanReadableIds=LC65719e2dedee745afaf9ed34

then I already get an error like 414 (Request-URI Too Long)  ~ the complete GET query is 4275 characters long.

Is there a trick maybe reduce the length? It seems to be kind of waste to use 3300 characters just to express that I would get everything, and having to increase the API calls just because too few space remains for the IDs.

E.g. wildcards would be perfect to use, but AFAIK they are not supported.

thanks,

Tamas

  • Thank you for bringing this to our attention. Our development team will review it in the context of our ongoing projects and priorities. Your understanding and patience as we assess this matter is appreciated. We have recorded the issue in our tracking system under the reference number SDLCOM-6725
  • hi  , The 414 (Request-URI Too Long) is coming from the practical URL length limit enforced by the web server/proxy in front of the API, so very long fields=... + many humanReadableIds=... parameters will hit that limit.

    To address the “I just want everything” scenario: we’re currently testing support for a wildcard on the fields parameter (e.g. fields=*) to avoid having to send a very long explicit list. It’s not something we’re ready to officially document/promote yet while we complete validation, but it should help with exactly the use case you described and significantly reduce the URL size.

    Until this is fully supported/documented, the reliable workaround is to batch the IDs into smaller groups to keep the request URL under the limit.

    I’ll keep you posted as soon as we can confirm the wildcard is fully supported and ready to be documented.  Currently tracking yr feedback here SDLCOM-6725 so that I remember to circle back to you when this is supported

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group