What happened?
This article addresses an upcoming change related to the use of naming strategies when creating and registering entities via the Benchling API. After February 17th, 2025, the Benchling API now enforces strict validation of the namingStrategy parameter based on the schema configuration for the entity. Prior to this fix, it was possible to create and register entities with naming strategies that were marked as disallowed, leading to inconsistencies in entity registration.
Example API call needing update
The following API request would fail
{
"registryId": "src_NIBTh5y2",
"fields": {},
"schemaId": "ts_abc123",
"namingStrategy": "SET_FROM_NAME_PARTS", // this won't work anymore because the naming strategy isn't enabled on the schema. To fix, add a naming template and enable the naming strategy option
"name": "throwaway name"
}
With this specific schema configuration:
This API request will fail because it is trying to use a “name according to the naming template”, but that option (the last option in the list) is not selected above
How do I know if I’m Impacted?
Not all customer tenants were affected by this issue. If you would like to know if you and specific objects in Benchling were affected, please reach out to Benchling support by emailing support@benchling.com with the subject: ‘Inventory namingStrategy change’.
What are the options to resolve this issue?
To resolve issues related to this change, you should:
-
Review Integration Settings:
- Ensure that all integrations creating and registering entities via the API use valid namingStrategy values that align with the schema configuration.
- Specifically, verify that the naming strategy you are using is enabled in the schema’s settings.
- For example, if you are using REPLACE_NAMES_FROM_PARTS, ensure a name template is correctly configured.
-
Update Schema Configuration:
- If your schema configuration does not currently support the namingStrategy used by your integration, update the schema settings.
- This might include enabling specific naming strategies or configuring appropriate naming templates.
-
Handle Validation Errors:
- Update your integration to gracefully handle validation errors.
- With the enforcement of namingStrategy validation, any API requests that use invalid naming strategies will result in an error.
- Ensure your integration can manage these errors without disrupting operations.
What are the next steps?
-
Confirm Configuration:
-
Review your schema and integration settings to ensure they comply with the new validation rules. Specifically:
- Ensure that any naming strategies used are enabled in the schema.
- Confirm that your schema has a configured naming template where needed.
-
Review your schema and integration settings to ensure they comply with the new validation rules. Specifically:
-
Update Affected Integrations:
- If your integration relies on the previous behavior, update it to handle the newly enforced validation. This may involve using a valid namingStrategy or directly passing a value for entityRegistryId if necessary.
-
Test and Validate:
- Before the validation is fully enforced, test your integrations to ensure they work with the new rules. This will help identify and address any issues early.
After February 17th, 2025, any API requests that do not meet the new validation requirements will fail.
By following these steps, you can ensure smooth integration and compliance with the updated API behavior.
We apologize for any inconvenience this may have caused. Should you have any questions, feel free to contact us for assistance by emailing support@benchling.com and including in the subject: ‘Inventory namingStrategy change’.