SmaCH
SmaCH API

Monitorings: recording sessions, the equipment they engage


List the monitorings of an artwork

GET
https://api.smach.science
/artworks/{reference}/monitorings

The history of one artwork, newest first. Follow the Link header to page through it.

List the monitorings of an artwork › path Parameters

reference
​string · minLength: 1 · required

List the monitorings of an artwork › query Parameters

page
​integer · int32 · min: 0

0-indexed page number

Default: 0
size
​integer · int32 · min: 1 · max: 200

Page size

Default: 50
search
​string

Free-text search. The fields it matches are documented per endpoint.

sort
​string

Sort field, prefixed with '-' for descending (e.g. -createdAt), composed with commas. The sortable fields are documented per endpoint.

List the monitorings of an artwork › Headers

X-Organization
​string

The organization alias the request applies to, not its display name.

Optional for an account belonging to a single organization, which is resolved from the token. Required beyond that, since no default is defensible. A super-admin may name any organization, or none, which reads across all of them.

List the monitorings of an artwork › Responses

A page of results

Monitoring - one recording session of an artwork, with the equipment it engages
type
​string · enum · required

Stationary for a museum or a store, transport for a movement

Enum values:
stationary
transport
​Configuration · required

The configuration this session was set up with, copied from the artwork

​Datalogger[] · minItems: 1 · required

The dataloggers engaged, at least one

id
​string · uuid · readOnly

Identifier, public: what a URL names and what events reference

artwork
​string · readOnly

Reference of the monitored artwork

status
​string · enum · readOnly

Where the session stands. Moved by the lifecycle, never by a request

Enum values:
pending
in_progress
ended
Default: pending

Where each gateway sits in the vehicle. Transport only

created
​string · date-time
updated
​string · date-time

Set up a monitoring on an artwork

POST
https://api.smach.science
/artworks/{reference}/monitorings

Opens a pending session and moves the artwork to standby. Every logger, sensor and gateway named must be held by the inventory and free of any other active monitoring. The status is the lifecycle's: a request neither sets it nor leaves it.

Set up a monitoring on an artwork › path Parameters

reference
​string · minLength: 1 · required

Set up a monitoring on an artwork › Headers

X-Organization
​string

The organization alias the request applies to, not its display name.

Optional for an account belonging to a single organization, which is resolved from the token. Required beyond that, since no default is defensible. A super-admin may name any organization, or none, which reads across all of them.

Set up a monitoring on an artwork › Request Body

Monitoring - one recording session of an artwork, with the equipment it engages
type
​string · enum · required

Stationary for a museum or a store, transport for a movement

Enum values:
stationary
transport
​Configuration · required

The configuration this session was set up with, copied from the artwork

​Datalogger[] · minItems: 1 · required

The dataloggers engaged, at least one

id
​string · uuid · readOnly

Identifier, public: what a URL names and what events reference

artwork
​string · readOnly

Reference of the monitored artwork

status
​string · enum · readOnly

Where the session stands. Moved by the lifecycle, never by a request

Enum values:
pending
in_progress
ended
Default: pending

Where each gateway sits in the vehicle. Transport only

created
​string · date-time
updated
​string · date-time

Set up a monitoring on an artwork › Responses

Set up, waiting for the start

Monitoring - one recording session of an artwork, with the equipment it engages
type
​string · enum · required

Stationary for a museum or a store, transport for a movement

Enum values:
stationary
transport
​Configuration · required

The configuration this session was set up with, copied from the artwork

​Datalogger[] · minItems: 1 · required

The dataloggers engaged, at least one

id
​string · uuid · readOnly

Identifier, public: what a URL names and what events reference

artwork
​string · readOnly

Reference of the monitored artwork

status
​string · enum · readOnly

Where the session stands. Moved by the lifecycle, never by a request

Enum values:
pending
in_progress
ended
Default: pending

Where each gateway sits in the vehicle. Transport only

created
​string · date-time
updated
​string · date-time

List monitorings

GET
https://api.smach.science
/monitorings

Follow the Link header to page through the collection rather than building page URLs. The search parameter matches the reference of the monitored artwork, anywhere in the field. Sortable on created, updated, status, type, artwork; newest first by default.

List monitorings › query Parameters

page
​integer · int32 · min: 0

0-indexed page number

Default: 0
size
​integer · int32 · min: 1 · max: 200

Page size

Default: 50
search
​string

Free-text search. The fields it matches are documented per endpoint.

sort
​string

Sort field, prefixed with '-' for descending (e.g. -createdAt), composed with commas. The sortable fields are documented per endpoint.

status
​string[]

Keep only monitorings in one of these statuses

Enum values:
pending
in_progress
ended
type
​string[]

Keep only monitorings of one of these types

Enum values:
stationary
transport
artwork
​string

Keep only monitorings of this artwork, by reference

List monitorings › Headers

X-Organization
​string

The organization alias the request applies to, not its display name.

Optional for an account belonging to a single organization, which is resolved from the token. Required beyond that, since no default is defensible. A super-admin may name any organization, or none, which reads across all of them.

List monitorings › Responses

200

A page of results

Monitoring - one recording session of an artwork, with the equipment it engages
type
​string · enum · required

Stationary for a museum or a store, transport for a movement

Enum values:
stationary
transport
​Configuration · required

The configuration this session was set up with, copied from the artwork

​Datalogger[] · minItems: 1 · required

The dataloggers engaged, at least one

id
​string · uuid · readOnly

Identifier, public: what a URL names and what events reference

artwork
​string · readOnly

Reference of the monitored artwork

status
​string · enum · readOnly

Where the session stands. Moved by the lifecycle, never by a request

Enum values:
pending
in_progress
ended
Default: pending

Where each gateway sits in the vehicle. Transport only

created
​string · date-time
updated
​string · date-time

Get a monitoring by id

GET
https://api.smach.science
/monitorings/{id}

Get a monitoring by id › path Parameters

id
​string · uuid · required

Get a monitoring by id › Headers

X-Organization
​string

The organization alias the request applies to, not its display name.

Optional for an account belonging to a single organization, which is resolved from the token. Required beyond that, since no default is defensible. A super-admin may name any organization, or none, which reads across all of them.

Get a monitoring by id › Responses

Unknown id

Monitoring - one recording session of an artwork, with the equipment it engages
type
​string · enum · required

Stationary for a museum or a store, transport for a movement

Enum values:
stationary
transport
​Configuration · required

The configuration this session was set up with, copied from the artwork

​Datalogger[] · minItems: 1 · required

The dataloggers engaged, at least one

id
​string · uuid · readOnly

Identifier, public: what a URL names and what events reference

artwork
​string · readOnly

Reference of the monitored artwork

status
​string · enum · readOnly

Where the session stands. Moved by the lifecycle, never by a request

Enum values:
pending
in_progress
ended
Default: pending

Where each gateway sits in the vehicle. Transport only

created
​string · date-time
updated
​string · date-time

Count monitorings matching the filters

GET
https://api.smach.science
/monitorings/count

Answers a business question; paging is driven by the list endpoint's Link header. The filters have the same meaning as on the list endpoint.

Count monitorings matching the filters › query Parameters

search
​string
status
​string[]
Enum values:
pending
in_progress
ended
type
​string[]
Enum values:
stationary
transport
artwork
​string

Count monitorings matching the filters › Headers

X-Organization
​string

The organization alias the request applies to, not its display name.

Optional for an account belonging to a single organization, which is resolved from the token. Required beyond that, since no default is defensible. A super-admin may name any organization, or none, which reads across all of them.

Count monitorings matching the filters › Responses

200

OK

Number of resources matching the filters
count
​integer · int64