OAS Data API

Authentication

The Open Automation Software platform uses Security Groups and Users to manage authentication and authorization. You can create a user with a username and password to act like an API key and then assign a custom security group to this user to limit access to the API to a restricted set of operations.

To learn more about security groups and users see the Getting Started – Security guide in the Knowledge Base.

Overview

The OAS platform includes two security groups by default: Default and Admin.

The Default security group is a fall-back security group for unauthenticated API calls. If you do not use the LogIn method to provide a username and password before calling an API method, then the OAS engine will use the permissions of the Default security group to make the request.

Warning

If you give the Default security group any permissions or leave the Enable All Features checkbox enabled then anyone will be able to make API calls and read and write Tag values.

The Admin security group is assigned to the user that is created when using the AdminCreate utility to set the initial OAS platform admin account password. This security group has all permissions enabled by default.

You can create additional security groups using the Configure OAS application and then create users and assign the security groups to users.

To use a particular user account, the OAS Data API provides a LogIn and LogOff method for authentication. These credentials will be used for all API calls.

LogIn

Use the LogIn method to set the username and password that is used when making API requests.

Example:

oasData.LogIn("api_username", "api_key");

LogOff

Use the LogOff method to clear the user credentials.

public void LogOff()

Example:

oasData.LogOff();