JSMA entity

JSMA entity

Overview

The JSMA entity provides access to the underlying IBS entity of a file that has been stored. It allows you to retrieve the entity information, update and delete the entity.

Index

Methods

The JSMA entity provides the following methods:

string entity.uuid

Returns the IBS UUID of the entity.

Example

... var entity = file.getIbsEntity(); entity.uuid # => 'c61ee560-56b3-4722-9070-dc2ed51b116a' ...

object entity.info

Retrieves the entity information from the IBS API and returns it as an object.

Example

... var entity = file.getIbsEntity(); var info = entity.info; Object.keys(info) # => [ "expirydate", "creationdate", "pinned", "countparents", "description", "type", "modificationdate", "uuid", "hrid", "datasource", "mimetype", "state", "countchildren" ] ...

void entity.update(options)

Updates the entity via the IBS API.

Example

... var entity = file.getIbsEntity(); info = entity.update({ description: 'a new description' }); ...

Parameter options:object (required)

See possible fields in the IBS entity API documentation.

void entity.delete()

Deletes the entity in the IBS.

Example

... var entity = file.getIbsEntity(); info = entity.delete(); ...