This api call creates a new session in the database. The existing session is modified and only the provided values are updated in the existing session. All other values are left unchanged. This call accepts the same request body content-types as the Session create (POST) action. Attachments are handled in the same way.

Any attachments uploaded via this api call will replace existing attachments, which will be deleted once the new attachment is saved to the database.

This api call returns a 404 Not Found if the session does not exist in the database.

A successful call will return a JSON response with the session data in the result.

Params

Param name Description
project_id
required

The project ID number

Validations:

  • Must be a Integer

id
optional

The UUID for the session. A random UUID will be created if none is supplied.

Validations:

  • Must be a String

session[unit_id]
optional

The UnitID for the device that created the session.

Validations:

  • Must be a String

session[saved]
optional

The unix timestamp for when the session was saved. Defaults to the current time if not supplied

Validations:

  • Must be a Integer

session[data][<point_name>]
optional

The value for the point given by point_name. This can be a scalar value (string) or a hash with a rawData key for any small amount of embedded binary data. For attachments, this field will be an file uploaded in a mutipart form post.

Validations:

  • Must be a String

sessions
required

An array of sessions to update

Validations:

  • Must be an array of any type