Properties
Properties are custom string key/value pairs that can be attached to a copy of any object. For example, the key/value pair "project"/"cancer" can be attached to an object..
The properties associated with an object are returned by the describe method, and modified by the setProperties method.
API method: /class-xxxx/setProperties
/class-xxxx/setPropertiesSpecification
Sets properties on an object in the specified project. To remove a property altogether, its value needs to be set to the JSON null (instead of a string). This call updates the properties of the object by merging any old (previously existing) ones with what is provided in the input, the newer ones taking precedence when the same key appears in the old.
Best practices: to fully reset properties (remove all existing key/value pairs and replace them with new ones), first issue a describe call to get the names of all properties, then issue a setProperties request to set the values of those properties to null.
Inputs
projectstring (required) ID of the project or container containing the object to be modified.propertiesmapping (required) Properties to modify.key — the name of the property to modify.
value string or null — a new string value for the property, or
nullto unset the property.
Outputs
idstring ID of the manipulated object.
Errors
InvalidInput
There exists at least one value in
propertieswhich is neither a string nor the JSONnullFor each property key-value pair, the size, encoded in UTF-8, of the property key may not exceed 100 bytes and the property value may not exceed 700 bytes
ResourceNotFound (the specified object does not exist, the specified project does not exist, or the specified project does not contain the specified object)
PermissionDenied (If the object is open, UPLOAD access is required, otherwise CONTRIBUTE access is required for the specified project)
Examples
{}
No action taken.
{"tissue": "liver"}
The property "tissue" is set to value "liver".
{"tissue": null}
The property "tissue" is removed, if it exists.
Last updated
Was this helpful?