OBJECT

Mutation

Root Mutation object of the numina-graph schema! Contains mutations to create, update, and delete database objects, such as organizations, users, and devices.

link GraphQL Schema definition

  • type Mutation {
  • # Create an Organization object in the Numina database. (admin-only)
  • #
  • # Arguments
  • # alias: Internal shorthand name (e.g. dbp),must be unique
  • # name: Organization's name
  • # orgLat: Latitude
  • # orgLon: Longitude
  • # timezone: Organization timezone in tz format (e.g.
  • # America/New_York)
  • createOrganization(
  • alias: String!,
  • name: String!,
  • orgLat: Float!,
  • orgLon: Float!,
  • timezone: String!
  • ): CreateOrganization
  • # Delete an Organization object from the Numina database (admin-only)
  • #
  • # Arguments
  • # orgId: rawId of the Organization object to be deleted
  • deleteOrganization(orgId: String!): DeleteOrganization
  • # Update data pertaining to an Organization object in the Numina database
  • # (admin-only)
  • #
  • # Arguments
  • # alias: Internal shorthand name (e.g. dbp),must be unique
  • # name: Organization's name
  • # orgId: rawId of the Organization object
  • # orgLat: Latitude
  • # orgLon: Longitude
  • # timezone: Organization timezone in tz format (e.g.
  • # America/New_York)
  • # zoomLevel: Map zoom level
  • updateOrganization(
  • alias: String,
  • name: String,
  • orgId: String!,
  • orgLat: Float,
  • orgLon: Float,
  • timezone: String,
  • zoomLevel: Int
  • ): UpdateOrganization
  • # Create a BehaviorZone object for a Device in the Numina database
  • #
  • # Arguments
  • # color: Line/fill color used when drawing behavior zone
  • # (default='red')
  • # demarcation: Coordinates (list of [x,y]) defining the shape of
  • # the behavior zone polygon on a 640x480 grid
  • # serialno: serialno of the device this behavior zone will belong
  • # to
  • # text: Descriptive text for the behavior zone
  • createBehaviorZone(
  • color: String,
  • demarcation: [[Int]]!,
  • serialno: String!,
  • text: String
  • ): CreateBehaviorZone
  • # Update data pertaining to a BehaviorZone object in the Numina database
  • #
  • # Arguments
  • # color: Line/fill color used when drawing behavior zone
  • # (default='red')
  • # demarcation: Coordinates (list of [x,y]) defining the shape of
  • # the behavior zone polygon on a 640x480 grid
  • # text: Descriptive text for the behavior zone
  • # zoneId: rawId of the BehaviorZone object being updated
  • updateBehaviorZone(
  • color: String,
  • demarcation: [[Int]],
  • text: String,
  • zoneId: Int!
  • ): UpdateBehaviorZone
  • # Delete a BehaviorZone object from the Numina database.
  • #
  • # Arguments
  • # zoneId: rawId of the BehaviorZone object to be deleted
  • deleteBehaviorZone(zoneId: Int!): DeleteBehaviorZone
  • # Delete a device object (admin only)
  • #
  • # Arguments
  • # deviceId: rawId of device being deleted
  • deleteDevice(deviceId: String!): DeleteDevice
  • # Update all non-location data pertaining to a device object (admin required)
  • #
  • # Arguments
  • # device: device fields to be updated
  • # deviceId: rawId of device being updated
  • updateDevice(device: UpdateDeviceInput!, deviceId: String!): UpdateDevice
  • # Add a Device, and its dependencies, to the Numina database when a sensor is
  • # installed. (admin-only)
  • #
  • #
  • # Arguments
  • # device: Device administrative data
  • # location: Device location data
  • # orgId: rawId value of the Organization object this device
  • # belongs to
  • installSensor(
  • device: InstallSensorDeviceInput!,
  • location: SensorLocationInput,
  • orgId: String!
  • ): InstallSensorMutation
  • # Update location data associated with a Device object in the Numina database
  • #
  • # Arguments
  • # deviceId: rawId of the Device object being updated
  • # location: Device location data
  • updateDeviceLocation(
  • deviceId: String!,
  • location: SensorLocationInput!
  • ): UpdateDeviceLocation
  • # Updates the sample image of a device for a given date (admin-only)
  • #
  • # Arguments
  • # date: date including and after which sample image should be
  • # used
  • # imageUrl: s3 URI of sample image file
  • # serialno: serialno of the device
  • updateSampleImage(
  • date: String!,
  • imageUrl: String!,
  • serialno: String!
  • ): UpdateDeviceSampleImage
  • # Delete a device sample image (admin-only)
  • #
  • # Arguments
  • # date: date associated with the sample image
  • # serialno: serialno of the device
  • deleteSampleImage(date: String!, serialno: String!): DeleteDeviceSampleImage
  • # Upload an image file to S3 (admin-only)
  • #
  • # Arguments
  • # imageDate: Date including and after which this sample will be
  • # used
  • # imageFile: Image file to be uploaded
  • # serialno: serialno of the Device this image will apply to
  • uploadSampleImage(
  • imageDate: String!,
  • imageFile: Upload!,
  • serialno: String!
  • ): UploadSampleImage
  • # Create a User object in the Numina database (admin only). Upon successful
  • # creation, this mutation sends a welcome email to the user's email address,
  • # and adds the user's email to Mailchimp. (admin-only)
  • #
  • #
  • # Arguments
  • # admin: True if user should be an admin
  • # authLevel: Legacy field, do not use
  • # companyTag: Mailchimp tag for the user's company, if different
  • # from their Organization object's namevalue
  • # email: User's email address
  • # name: User's name
  • # orgId: The rawId of the organization the user belongs to
  • # position: User's position at their company(e.g. President)
  • # redirect: Location of where the user is redirected after they
  • # initially set their passwords
  • createUser(
  • admin: Boolean,
  • authLevel: String,
  • companyTag: String,
  • email: String!,
  • name: String!,
  • orgId: String!,
  • position: String,
  • redirect: RedirectEnum
  • ): CreateUserMutation
  • # Update data pertaining to the requesting User's User object in the Numina
  • # database.
  • #
  • # Arguments
  • # email: User's email address
  • # name: User's name
  • # position: User's position at their company
  • updateUser(email: String, name: String, position: String): UpdateUserMutation
  • # A mutation for admins to update data pertaining to a User object in the Numina
  • # database. Includes changing user organization and admin status. (admin-only)
  • #
  • # Arguments
  • # admin: admin status of the user
  • # authLevel: Legacy field, do not use
  • # email: User's email address
  • # name: User's name
  • # orgId: rawId of the Organization object the user belongs to
  • # position: User's position at their company
  • # userId: rawId of the User object being updated
  • adminUpdateUser(
  • admin: Boolean,
  • authLevel: String,
  • email: String,
  • name: String,
  • orgId: String,
  • position: String,
  • userId: Int!
  • ): AdminUpdateUserMutation
  • # Delete a User object from the Numina database. (admin-only)
  • #
  • # Arguments
  • # userId: rawId value of the User object to be deleted
  • deleteUser(userId: Int): DeleteUserMutation
  • # Log in to the Numina API or dashboard, by retrieving a JSON Web Token upon
  • # authentication.
  • #
  • #
  • # Arguments
  • # email: User's email address
  • # password: User's password
  • logIn(email: String!, password: String!): LogInMutation
  • # Admin-only mutation to log into internal services. (admin-only)
  • #
  • # Arguments
  • # email: User's email address
  • # password: User's password
  • adminLogIn(email: String!, password: String!): AdminLogInMutation
  • # Allows users to change their own password, provided they know their current
  • # password.
  • #
  • # Arguments
  • # confirmPassword: Confirm new password
  • # currentPassword: Issuing user's password
  • # newPassword: New password for issuing user
  • changePassword(
  • confirmPassword: String!,
  • currentPassword: String!,
  • newPassword: String!
  • ): ChangePasswordMutation
  • # Start the password reset workflow by creating a reset token and emailing a
  • # tokenized URL to the requested email address.
  • #
  • #
  • # Arguments
  • # email: Email address belonging to userrequesting password reset
  • startReset(email: String!): StartResetWorkflow
  • # Reset a user's password if they pass in a valid reset token
  • #
  • # Arguments
  • # confirmPassword: Confirm new password
  • # newPassword: New password for user
  • # token: Reset token, authenticates request
  • resetPassword(
  • confirmPassword: String!,
  • newPassword: String!,
  • token: String!
  • ): ResetPasswordMutation
  • }

link Require by

This element is not required by anyone