Apps
Your App can make requests to the following REST endpoints with an App signed JWT.
Access tokens
Access tokens are how your app gets access to organization and credit resources on CarbonRegistry.com.
app access token
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.
API version
2023-06-16The ID of the access token
123e4567-e89b-12d3-a456-426614174000The date and time the access token was created
2022-01-01T00:00:00ZThe date and time the access token was last updated
2022-01-01T00:00:00ZThe access token string
crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5bThe date and time the access token expires
2022-02-01T00:00:00ZWhether the access token is currently active
trueThe permissions of the access token
{"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}The ID of the app associated with the access token
67890POST /app/accessTokens HTTP/1.1
Host: api.carbonregistry.com
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"token": "crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5b",
"expiresAt": "2022-02-01T00:00:00Z",
"isActive": true,
"permissions": {
"organization_info": "VIEW",
"organization_members": "VIEW",
"organization_projects": "VIEW",
"organization_inventory": "REQUEST",
"organization_warehouse": "WRITE"
},
"appId": "67890"
}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
This endpoint generates an installation access token for a specific installation. This access token can be used to access organization resources.
API version
2023-06-16The ID of the access token
123e4567-e89b-12d3-a456-426614174000The date and time the access token was created
2022-01-01T00:00:00ZThe date and time the access token was last updated
2022-01-01T00:00:00ZThe access token string
crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5bThe date and time the access token expires
2022-02-01T00:00:00ZWhether the access token is currently active
trueThe permissions of the access token
{"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}The ID of the app associated with the access token
67890The ID of the installation associated with the access token
123e4567-e89b-12d3-a456-426614174000The ID of the organization associated with the access token
123e4567-e89b-12d3-a456-426614174000POST /app/installations/{installationId}/accessTokens HTTP/1.1
Host: api.carbonregistry.com
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"token": "crs_19c9bd530ccd3e1187eed12dc4edb70abe757fc4c7be9c5b",
"expiresAt": "2022-02-01T00:00:00Z",
"isActive": true,
"permissions": {
"organization_info": "VIEW",
"organization_members": "VIEW",
"organization_projects": "VIEW",
"organization_inventory": "REQUEST",
"organization_warehouse": "WRITE"
},
"appId": "67890",
"installationId": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174000"
}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
This endpoint deletes the installation access token used to call it
API version
2023-06-16DELETE /app/installations/token HTTP/1.1
Host: api.carbonregistry.com
Accept: */*
trueEnables deleting / invalidating an access token. It invalidates the one used in the authorization header.
all app installations
This endpoint returns all active installation for an app
The amount of items to return
10The page to return
0API version
2023-06-16GET /app/installations?limit=1&page=1 HTTP/1.1
Host: api.carbonregistry.com
Accept: */*
{
"pagination": {
"total": 100,
"currentPage": 1,
"pageCount": 10,
"nextPage": 2,
"prevPage": 0
},
"installations": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"organization": {
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"fullName": "Organization 1",
"countryCode": "US",
"city": "New York",
"zip": "10001",
"physicalAddress": "123 Main St",
"registrationNumber": "123456",
"website": "http://example.com",
"logo": "logo.png",
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationIndustries": {
"code": "IND1",
"name": "Industry 1"
},
"type": "projectProponent",
"isPublic": true,
"url": "https://api.carbonregistry.com/app/organizations/123e4567-e89b-12d3-a456-426614174000"
},
"permissions": {
"organization_info": "VIEW",
"organization_members": "VIEW",
"organization_projects": "VIEW",
"organization_inventory": "REQUEST",
"organization_warehouse": "WRITE"
},
"appNameId": "app1",
"appId": "123e4567-e89b-12d3-a456-426614174000",
"accessTokensUrl": "https://api.carbonregistry.com/app/installations/123e4567-e89b-12d3-a456-426614174000/accessTokens"
}
]
}A paginated list of all app installations for this app.
specific app installation
This endpoint returns a specific installation
API version
2023-06-16The ID of the installation
123e4567-e89b-12d3-a456-426614174000The creation date of the installation
2022-01-01T00:00:00ZThe update date of the installation
2022-01-01T00:00:00ZThe permissions of the installation
{"organization_info":"VIEW","organization_members":"VIEW","organization_projects":"VIEW","organization_inventory":"REQUEST","organization_warehouse":"WRITE"}The app name ID of the installation
app1The app ID of the installation
123e4567-e89b-12d3-a456-426614174000The access tokens URL of the installation
https://api.carbonregistry.com/app/installations/123e4567-e89b-12d3-a456-426614174000/accessTokensGET /app/installations/{installationId} HTTP/1.1
Host: api.carbonregistry.com
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"organization": {
"createdAt": "2022-01-01T00:00:00Z",
"updatedAt": "2022-01-01T00:00:00Z",
"fullName": "Organization 1",
"countryCode": "US",
"city": "New York",
"zip": "10001",
"physicalAddress": "123 Main St",
"registrationNumber": "123456",
"website": "http://example.com",
"logo": "logo.png",
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationIndustries": {
"code": "IND1",
"name": "Industry 1"
},
"type": "projectProponent",
"isPublic": true,
"url": "https://api.carbonregistry.com/app/organizations/123e4567-e89b-12d3-a456-426614174000"
},
"permissions": {
"organization_info": "VIEW",
"organization_members": "VIEW",
"organization_projects": "VIEW",
"organization_inventory": "REQUEST",
"organization_warehouse": "WRITE"
},
"appNameId": "app1",
"appId": "123e4567-e89b-12d3-a456-426614174000",
"accessTokensUrl": "https://api.carbonregistry.com/app/installations/123e4567-e89b-12d3-a456-426614174000/accessTokens"
}Returns a specific app installation.
Last updated