Go back to Developer Overview Home
Choosing the Right API for the Right Data
groov Manage REST API
The groov Manage API is used to access device details, file information, scratchpad areas, and analog/digital points on the installed I/O modules.
For details, check out the API Reference, which is generated from the Swagger specification.
Here’s an example request using this API:
https://opto-01-02-03/manage/api/v1/io/local/modules/type
Getting Started with groov Manage REST API
groov View REST API
The groov View API is used to access groov View project data and data-store tag values.
For details, check out the API Reference which is generated from the Swagger specification.
Here’s an example request using this API:
https://opto-01-02-03/view/api/v1/data-store/tags?api_key=1a2b3c4d5e6f7g8h9i
Using the groov View REST API with groov EPIC
PAC Control REST API
Finally, the PAC Control API is used to access controller strategy variables.
For details, check out the API Reference, which is generated from the Swagger specification.
Here’s an example request using this API:
https://opto-01-02-03/pac/device/strategy/vars/int32s
Using the PAC Control REST API with groov EPIC
Auto-Generate API Requests with EPIC
Documentation and interfaces to automatically generate requests for the REST APIs can be found directly in groov Manage via the link on the Info and Help screen. Follow these steps to use the Swagger generated page to help you create the requests you need:
- Get your API key from groov Manage
Accounts
. It is recommended to create a new user for API access so that it can be managed separately from the admin user. - Open the API page in a new tab thru groov Manage Info and Help and then select either Manage, View, or PAC Control API depending on what you want to access, there are descriptions for each above.
- Click Authorize, paste in your API key, and then hit close.
- Choose a command, for example,
GET /api/v1/io/{device}/modules/{moduleIndex}/analog/values
in the Manage API page.
Here you can enter any parameters, denoted in the example by curly braces { }, and select Execute to have the request built for you -
Copy your Request URL or cURL command, for example to read the local analog module 2:
curl -X GET "https://opto-01-02-03/manage/api/v1/io/local/modules/2/analog/values" -H "accept: application/json" -H "apiKey: 3KbLb7yZRxnTBP49nEmobDkrpmPkFoBo"
Which returns a JSON formatted object containing an array of channel values, where this device has a single temperature sensor installed on channel 0:
json { "moduleIndex": 2, "channelValues": [ { "value": 71.155029296875, "qualityError": false }, { "value": 0, "qualityError": false } // . . . ] }
Other Resources
- Forum Search: Opto Forums REST API A few helpful results: