Skip to navigation

Bulk upsert Molecules

Deprecated

All entities and their schemas must be within the same registry.

This operation performs the following actions:

  1. Any existing objects are looked up in Benchling by the provided entity registry ID.
  2. Then, all objects are either created or updated accordingly, temporarily skipping any schema field links between objects.
  3. Schema field links can be populated using entity registry IDs or API IDs. In the value field of the Field resource, the object {"entityRegistryId": ENTITY_REGISTRY_ID} may be provided instead of the API ID if desired (see example value). You may link to objects being created in the same operation.
  4. Entities are registered, using the provided name and entity registry ID.

If any action fails, the whole operation is canceled and no objects are created or updated.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

returningstringOptional

Comma-separated list of fields to return. Modifies the output shape. To return all keys at a given level, enumerate them or use the wildcard, ’*’. For more information, click here.

Request

This endpoint expects an object.
namestringRequired
Name of the Molecule.
registryIdstringRequired
schemaIdstringRequired
ID of the Molecule's schema.
entityRegistryIdstringRequired
Registry ID of the entity in Benchling.
chemicalStructureobjectRequired
Chemical structure of the Molecule.
archiveRecordobjectOptional
Currently, we only support setting a null value for archiveRecord, which unarchives the item
fieldsmap from strings to objectsOptional
Fields to set on the Molecule. Must correspond with the schema's field definitions. Every field should have its name as a key, mapping to an object with information about the value of the field.
aliaseslist of stringsOptional
Aliases to add to the Molecule.
authorIdslist of stringsOptional
IDs of users to set as the Molecule's authors.
customFieldsmap from strings to objectsOptional
Custom fields to add to the Molecule. Every field should have its name as a key, mapping to an object with information about the value of the field.
folderIdstringOptional
ID of the folder containing the Molecule.

Response

This endpoint launches a long-running task and returns the Task ID of the launched task. When successful, the task returns the resources of the objects that were upserted.

taskIdstringOptional

Errors

400
Bad Request Error