Skip to navigation

Update an animal

Updates the specified animal by setting the values of the parameters passed. Omitted properties are left untouched.

Moving an animal between cages or treatment groups is constrained by the study it is on, and a terminated animal cannot be moved at all; see cage_id and study_group_id for the rules.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

animalIdstringRequiredformat: "^aml_[a-zA-Z0-9]{10,22}$"
The unique identifier of the animal.

Headers

X-Studies-Api-VersionstringOptional

Request

The animal attributes to change.
cage_idstringOptionalformat: "^cge_[a-zA-Z0-9]{10,22}$"
Unique identifier for a cage.
study_group_idstringOptionalformat: "^grp_[a-zA-Z0-9]{10,22}$"
Unique identifier for a study group.
sexenumOptional

The sex of an animal: m for male, f for female, and u for unknown. u is only accepted on write when the unknown-sex feature is enabled for your team, and is otherwise rejected.

Allowed values:
namestringOptional1-40 characters
The name of the animal.
strainstringOptional>=1 character
The strain of the animal, which also determines its species. Must be a strain configured for your team.
dobdate or nullOptional

The date of birth of the animal. May not be in the future. Send null to clear it, unless your team’s entity schema makes it mandatory.

metadatamap from strings to any or nullOptional

The metadata to be associated to the animal, merged into the existing metadata. Set an individual value to null to delete that key; keys your team’s entity schema marks mandatory cannot be deleted. A null map is accepted but changes nothing — there is no way to clear every key at once.

Response headers

X-RateLimit-LimitintegerOptional
The number of requests permitted in the current rate limit window.
X-RateLimit-RemainingintegerOptional

The number of requests still available in the current rate limit window. When several limits apply, this reflects the per-API-key limit, so a request can be rejected while this value is above zero.

X-RateLimit-ResetintegerOptional
The number of seconds until the current rate limit window resets.

Response

The updated animal.
idstringformat: "^aml_[a-zA-Z0-9]{10,22}$"
Unique identifier for an animal.
namestring<=40 characters
The name of the animal.
numberinteger
The position of the animal within its cage.
catalogstring or null<=255 characters
The catalog number of the animal.
speciesstring or null<=255 characters
The species of the animal, derived from its strain. Null when the animal has no strain assigned.
strainstring or null<=255 characters
The strain of the animal.
sexenum or null
The sex of the animal.
Allowed values:
dobdate or null
The date of birth of the animal.
donorstring or null
The donor identifier of the animal.
earstring or null
The ear marking identifying the animal.
tagstring or null
The tag identifying the animal.
tailstring or null
The tail marking identifying the animal.
studyobject or null
The study the animal is enrolled on. Null when it is not on a study.
study_groupobject or null
The treatment group the animal is assigned to. Null when it is not on a study, or is on one but not yet grouped.
cageobject or null
The cage the animal is housed in.
tracking_datedate or null
The date from which the animal's tracking days are counted.
disease_induction_datedate or null
The date the animal had a disease induced.
disease_survivorboolean or null
Whether the animal survived the induced disease.
terminated_atdate or null
The date the animal was terminated. Null while the animal is alive. A terminated animal cannot be moved between cages or study groups.
terminated_byobject or null
The user who recorded the termination.
terminated_reasonobject or null
Why the animal was terminated.
metadatamap from strings to any or null
The metadata associated to the animal.
created_atdatetime

UTC timestamp with microsecond precision, always suffixed with Z, in the form yyyy-MM-ddTHH:mm:ss.SSSSSSZ.

updated_atdatetime

UTC timestamp with microsecond precision, always suffixed with Z, in the form yyyy-MM-ddTHH:mm:ss.SSSSSSZ.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error