Skip to navigation

Update TestDefinition

Beta

Update an existing Test Definition.

Updatable fields

FieldDescription
nameNew display name. Names are trimmed and must be unique within the organization.
organizationIdNew owning organization. Use GET /benchling/organization/items to find organization IDs.
resultSchemaIdNew result schema. Use GET /benchling/result-schema/items to find result schema IDs.
descriptionNew description. Empty strings are allowed.
archived, archiveReason, archiveUserIdArchive or unarchive the test definition.

Constraints

  • The caller must have read access to the result schema.
  • Moving the Test Definition to a different organization requires admin access to the target organization. Re-specifying the current organization only requires read access to it.
  • resultSchemaId cannot be changed after any Test Orders exist for the Test Definition.
  • Archiving fails if the Test Definition has pending, in-progress, or blocked Test Orders.
  • Archiving also fails while the Test Definition is associated with an unarchived assay.
  • archiveSubtreeId and legacyArchiveRecordId are legacy archival fields and should normally be omitted.

Authentication

AuthorizationBearer

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

Path parameters

test_definition_idstringRequired
ID of the TestDefinition.

Headers

EARLY-ACCESSstringOptional

Set to true to access beta operations via /api/v3.

Request

This endpoint expects an object.
archiveReasonstringOptional
archivedbooleanOptional
descriptionstringOptional

Updated human-readable description. Empty strings are allowed; values must be at most 255 characters.

namestringOptional

Updated display name. When provided, it is trimmed and must be non-empty and unique within the organization.

organizationIdstringOptional
Updated owning organization. Moving to a different organization requires admin access to that organization.
resultSchemaIdstringOptional
Updated result schema. Cannot be changed after test orders have been created for this test definition.

Response

OK
__typenamestringOptional
archiveReasonstring or nullOptional
archivedbooleanOptional
createdAtstringOptional
Timestamp of when the test definition was created.
creatorobjectOptional
The user that created the test definition.
descriptionstringOptional
The description of the test definition. Empty strings are allowed.
idstringOptional
The ID of the test definition.
modifiedAtstringOptional
Timestamp of when the test definition was last modified.
namestringOptional
The name of the test definition.
organizationobjectOptional
The organization that owns the test definition, used for auth.
resultSchemaobjectOptional
The result schema of the test definition, defines the measurement data shape.

Errors

400
Test Definition Update Request Bad Request Error
403
Test Definition Update Request Forbidden Error
404
Test Definition Update Request Not Found Error
409
Test Definition Update Request Conflict Error
429
Test Definition Update Request Too Many Requests Error
500
Test Definition Update Request Internal Server Error