<aside> 🚧 The Raster API is still in Alpha and will be undergoing regular updates and changes until Beta release

</aside>

Intro

GraphQL

Raster’s APIs are GraphQL, and a read-only public key is available. It can be created initially, regenerated if it is discovered to be compromised, or deleted as needed. You can access the allowed libraries outside of Raster using the Raster API using public API key.

Here’s a curl example to get all the photos in a library:

curl --request POST \\
  --header 'Content-Type: application/json' \\
  --header 'Authorization: Bearer <API_KEY>' \\
  --url '<https://api.raster.app/>' \\
	--data '{"query": "query Photos { photos(organizationId: \\"monogram-labs\\", libraryId: \\"barcelona\\") { name url }}"}’

Make sure to replace the <API_KEY>, <ORG_ID> and the <LIBRARY_ID> with the appropriate values.

Authentication

The Raster API uses API keys to authenticate requests. You can view and manage your API keys in each organization’s settings.

API access is granted through HTTP Basic Authentication. To authenticate, use your API key as the username in the basic auth process. No password is required.

You need to authenticate via bearer auth

"Authorization: Bearer pk_4eC39HqLH3U46nipzJ6ixhzdp7dc42Sf"

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Queries

Photos

Returns a list of images from a Library.