Green Stack Docs
Green Stack Docs
  • Welcome
  • Fundamentals
    • Getting Started
    • Framework Architecture
    • Planning Your Solution
    • Using the Console
    • Requesting Support
  • Configuration
    • Digital Twin
    • Connectivity
      • Edge Devices
      • BACnet
    • Users & Access Control
    • Global Settings
    • Subscriptions & Billing
    • Personalization
  • Operations
    • Building Engineering
      • History Collectors
    • Reporting & Trending
      • Build & Run Reports
      • Report Groups
      • Scheduled Reports
    • Scheduler
    • Energy Manager
    • System Activity Log
  • Integration
    • Web Hooks
    • REST API
      • Making Requests
      • Responses and Errors
      • Versioning
      • Appendices
        • Building Type Codes
        • BACnet Object Types
        • Point Unit Codes
  • Open Source Credits
  • Glossary
  • Legal
Powered by GitBook
LogoLogo

©2019 - 2024 Counterbalance Software LLC

On this page
  • Accessing the API
  • Creating a new API key
  • API endpoint documentation
  • HATEOS
  • Toggling HATEOS links in API responses

Was this helpful?

  1. Integration

REST API

Last updated 1 year ago

Was this helpful?

The Green Stack REST API allows you to extend your Green Stack account and integrate custom solutions.

The API is crafted around and the REST architectural style to provide developers with a stateless and language-­agnostic interface. The API leverages common HTTP verbs and response codes, OAuth2 authentication, and resource­ oriented URLs.

Accessing the API

The root API host is https://api.greenstack.cloud/

You must have an active subscription for the Green Stack REST API to add new API keys and make API calls.

Creating a new API key

To create a new API key:

  1. Login to the Green Stack Console and navigate to Settings

  2. Select API Keys from the sidebar

  3. Select New Key to create a new API key

  4. Provide a Name for the new key and select the desired permissions

  5. Select Save to generate the key

Once you create a key, you must pass it with the X-Green-Stack-Key header to authenticate every request.

X-Green-Stack-Key: dgf...euhsdf

API endpoint documentation

HATEOS

HATEOAS (Hypermedia as the Engine of Application State) is a constraint of the REST application architecture that lets us use hypermedia links in the API responses that allow the client to dynamically navigate resources without prior knowledge of the API.

Green Stack REST API returns HATEOS links in resource responses by default. These links outline relative access to related resources, collections, and references.

Toggling HATEOS links in API responses

Links may not be necessary or appropriate for every request. Links can be removed from the response by passing the X-Green-Stack-Suppress-Links header and setting it to true

X-Green-Stack-Suppress-Links: true

The API endpoints available are documented in an spec at

REST
Open API
https://api.greensack.dev/v1