Docs Menu
Docs Home
/ /
Atlas Device SDKs
/

Call an Atlas Function

On this page

  • Before You Begin
  • Call a Function

You can call an Atlas Function from a client application using Atlas Device SDK. Functions are serverless JavaScript functions that let you define and execute server-side logic. These server-side Functions can run in the context of the authenticated user, and thus honor the rules, roles, and permissions that you have assigned to your data in Atlas.

For more information on configuring and writing Atlas Functions, refer to Atlas Functions in the App Services documentation.

  1. In an App Services App, define an Atlas Function.

  2. In your client project, initialize the App client.

  3. Then, authenticate a user. You access Functions through the user object.

The example on this page demonstrates calling an Atlas Function that takes two arguments, performs some work, and returns the result.

Important

Make sure to sanitize client data to protect against code injection when using Functions.

← 
 →