Get the JSON:API entry for a resource type.

const url = await drupal.getEntryForResourceType(type, locale?): Promise<string>
  • type: string
    • Required
    • The resource type. Example: node--article.
  • locale: string
    • Optional
    • The locale to fetch the index. Example: es or fr.


By default, when retrieving resources in getResource or getResourceCollection, the DrupalClient make a request to Drupal to fetch the JSON:API resource entry..

Example: if you provide node--article, DrupalClient will make a request to

If you would like to infer the entry from the resource type, use the useDefaultResourceTypeEntry option.

const drupal = new DrupalClient(process.env.NEXT_PUBLIC_DRUPAL_BASE_URL, {
useDefaultResourceTypeEntry: true,


const url = await drupal.getEntryForResourceType(`node--article`)