API & Interfaces

Platform API Quickstart

Content


Considerations

Alongside the prerequisites, we recommend that you take the following steps in order to
successfully work with our API:

  • GraphQL Client: Using a GraphQL Client such as Apollo Studio, Altair GraphQL
    Client or GraphiQL will considerably accelerate your query development, due to their
    introspection and autocomplete features. After setting the authorization header, they
    will be able to fetch the documentation from our endpoints automatically.
  • Rate Limiting: Our API is rate limited based on Fair Use policies and might deny
    high frequency, complex queries. Please structure your data acquisition in a
    meaningful way and use cache layers where necessary.
  • Change Notices: Our API - alongside our app, is extended numerous times per
    week. Existing features are deemed stable (unless they are flagged as Experimental
    or Deprecated in our documentation), but can switch to a Deprecated state within
    one month after prior notice. Deprecated queries and fields can be removed at any
    time. Please reach out to support@ampere.cloud to be enrolled in an API change
    newsletter.
  • User Rights: All requests to our API are running in the scope of the user that
    generated the key. If you have a company administrator's API key, you will be able to
    execute all functions that are available to them.

Endpoint & Authorization

The Endpoint of the GraphQL API is available under the following address:
https://api.ampere.cloud/apollo-gateway


In order to authorize against the API, an authorization token will be needed, supplied in the
header:

Authorization: Bearer <token>

This token will have to be supplied by every user that wants to connect to the API.
If you have a graphical user interface allowing the user to configure the communication,
prompt him to enter his API Token.


Example Queries

Getting Available Facilities

Since a user can be member of multiple companies, the best approach to get
all facilities a user can access is as such:

api qsg 1

This will output a result as such. You will need the returned id of the facility to request its
readings.

api qsg 2

Getting Available Readings

Data is both available as Raw Readings (e.g. gathered data from the facility)
and Analysis (e.g. interpreted data, such as self consumption rate)

You can query the available readings and analysis by passing the id of the facility into the
device query:

api qsg 3

This returns a result as such:

api qsg 4

You can use the returned readingTypes to request the values for a certain timespan.

Requesting Readings and Analysis

Using the facilityIdand the available readingtypesfrom above, you can request
data using the readingsfield of the facility.

Readings

The readings field expects a readingInput field, which is formatted as such:

api qsg 5

Example 1: Get all Pac readings of the facility for a day

api qsg 6

Result

api qsg 7

Example 2: Get produced energy of the facility for a day

api qsg 8

Result

api qsg 9


Next Steps


Thanks to the power of GraphQL a single query to our API is enough to fetch all the data you
need in one step. By merging both sections above, you can, for example, request both the
facility's energy production and the irradiation of its sensors in a single query.
In general, all features of our software (both to read and to write) are exposed in our
GraphQL API, with the exception of legacy use cases (that cover less than 3% of the API),
which still run on a REST based API.
If you need support or are missing a functionality, please do not hesitate to contact your
amperecloud representative!


Additional Resources

Pdfopen_in_new_24dp_FILL0_wght400_GRAD0_opsz24


Need More Help?

If you encountered any difficulties or need further assistance, here are some steps you can take:

Contact Support:

  • Email: Reach out to our support team by emailing us at support@amperecloud.com. Provide as much detail as possible about the issue you're facing.
  • Fill out a form: Complete our online support form. Please include all relevant information about your request, and our team will get back to you as soon as possible.

Share Your Feedback

If this article didn’t meet your needs or if you have suggestions on how we can improve, please let us know by submitting feedback. Your input helps us enhance our resources and support.