Apps

Your App can make requests to the following REST endpoints with an App signed JWT.

circle-info

Who can use these endpoints

You need to use a JWT to access these endpoints using your ICR App's private key to sign it. For more information, see "Authenticating as an ICR App."

Access tokens

Access tokens are how your app gets access to organization and credit resources on CarbonRegistry.com.

app access token

Generate an app access token

post

This endpoint generates an app access token. This access token can be used to access app specific resources and general "public" resources, like the /projects endpoint.

Header parameters
x-icr-api-versionstringOptional

API version

Default: 2023-06-16
Responses
chevron-right
200Success
application/json
idstringRequired

The ID of the access token

Example: 123e4567-e89b-12d3-a456-426614174000
createdAtstring · date-timeRequired

The date and time the access token was created

Example: 2022-01-01T00:00:00Z
updatedAtstring · date-timeRequired

The date and time the access token was last updated

Example: 2022-01-01T00:00:00Z
tokenstringRequired

The access token string

Example: crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5b
expiresAtstring · date-timeRequired

The date and time the access token expires

Example: 2022-02-01T00:00:00Z
isActivebooleanRequired

Whether the access token is currently active

Example: true
permissionsobjectRequired

The permissions of the access token

Example: {"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}
appIdstringRequired

The ID of the app associated with the access token

Example: 67890
post
/app/accessTokens
200Success

The app access token is an access token you can use if you do not need to make requests accessing organization resources. This is mostly for semi-public endpoints like getting information on public projects.

installation access token

Generate an installation access token

post

This endpoint generates an installation access token for a specific installation. This access token can be used to access organization resources.

Path parameters
installationIdstringRequired
Header parameters
x-icr-api-versionstringOptional

API version

Default: 2023-06-16
Responses
chevron-right
200Success
application/json
idstringRequired

The ID of the access token

Example: 123e4567-e89b-12d3-a456-426614174000
createdAtstring · date-timeRequired

The date and time the access token was created

Example: 2022-01-01T00:00:00Z
updatedAtstring · date-timeRequired

The date and time the access token was last updated

Example: 2022-01-01T00:00:00Z
tokenstringRequired

The access token string

Example: crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5b
expiresAtstring · date-timeRequired

The date and time the access token expires

Example: 2022-02-01T00:00:00Z
isActivebooleanRequired

Whether the access token is currently active

Example: true
permissionsobjectRequired

The permissions of the access token

Example: {"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}
appIdstringRequired

The ID of the app associated with the access token

Example: 67890
installationIdstringRequired

The ID of the installation associated with the access token

Example: 123e4567-e89b-12d3-a456-426614174000
organizationIdstringRequired

The ID of the organization associated with the access token

Example: 123e4567-e89b-12d3-a456-426614174000
post
/app/installations/{installationId}/accessTokens
200Success

Installation access tokens are the tokens you need when accessing resources from organizations. These tokens are needed when making requests to the "Endpoints available for ICR App installations".

delete access token

Delete an installation access token

delete

This endpoint deletes the installation access token used to call it

Header parameters
x-icr-api-versionstringOptional

API version

Default: 2023-06-16
Responses
chevron-right
200Success
application/json
booleanOptional
delete
/app/installations/token
200Success

Enables deleting / invalidating an access token. It invalidates the one used in the authorization header.

all app installations

Get all installations for an app

get

This endpoint returns all active installation for an app

Query parameters
limitnumberRequired

The amount of items to return

Example: 10
pagenumberRequired

The page to return

Example: 0
Header parameters
x-icr-api-versionstringOptional

API version

Default: 2023-06-16
Responses
chevron-right
200Success
application/json
get
/app/installations
200Success

A paginated list of all app installations for this app.

specific app installation

Get an installation

get

This endpoint returns a specific installation

Path parameters
installationIdstringRequired
Header parameters
x-icr-api-versionstringOptional

API version

Default: 2023-06-16
Responses
chevron-right
200Success
application/json
idstringRequired

The ID of the installation

Example: 123e4567-e89b-12d3-a456-426614174000
createdAtstring · date-timeRequired

The creation date of the installation

Example: 2022-01-01T00:00:00Z
updatedAtstring · date-timeRequired

The update date of the installation

Example: 2022-01-01T00:00:00Z
permissionsobjectRequired

The permissions of the installation

Example: {"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}
appNameIdstringRequired

The app name ID of the installation

Example: app1
appIdstringRequired

The app ID of the installation

Example: 123e4567-e89b-12d3-a456-426614174000
accessTokensUrlstringRequired

The access tokens URL of the installation

Example: https://api.carbonregistry.com/app/installations/123e4567-e89b-12d3-a456-426614174000/accessTokens
get
/app/installations/{installationId}
200Success

Returns a specific app installation.

Last updated