PUT
/
datacenter
/
{datacenterId}
Update a datacenter
curl --request PUT \
  --url https://aiapi.scope3.com/datacenter/{datacenterId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "AWS US-East-1",
  "description": "Amazon Web Services datacenter in Northern Virginia",
  "location": {
    "lat": 38.9697,
    "lng": -77.3833
  },
  "embodied_water_l": 1500,
  "embodied_emissions_kgco2e": 2500,
  "pue": 1.2,
  "gco2e_per_kwh": 475
}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "AWS US-East-1",
  "description": "Amazon Web Services datacenter in Northern Virginia",
  "location": {
    "lat": 38.9697,
    "lng": -77.3833
  },
  "embodied_water_l": 1500,
  "embodied_emissions_kgco2e": 2500,
  "pue": 1.2,
  "gco2e_per_kwh": 475,
  "locked": false,
  "customer_id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

datacenterId
string
required

Body

application/json
name
string
Required string length: 1 - 100
Example:

"AWS US-East-1"

description
string | null
Example:

"Amazon Web Services datacenter in Northern Virginia"

location
object
embodied_water_l
number
Required range: x >= 0
Example:

1500

embodied_emissions_kgco2e
number
Required range: x >= 0
Example:

2500

pue
number
Required range: 1 <= x <= 3
Example:

1.2

gco2e_per_kwh
number
Required range: 0 <= x <= 2000
Example:

475

Response

Datacenter updated successfully

id
string
required

The ID of a specific datacenter, either custom or predefined

Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
required
Example:

"AWS US-East-1"

customer_id
integer
required

ID of the customer who owns this datacenter (visible to admins only)

created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string
Example:

"Amazon Web Services datacenter in Northern Virginia"

location
object
embodied_water_l
number
Required range: x >= 0
Example:

1500

embodied_emissions_kgco2e
number
Required range: x >= 0
Example:

2500

pue
number
Required range: 1 <= x <= 3
Example:

1.2

gco2e_per_kwh
number
Required range: 0 <= x <= 2000
Example:

475

locked
boolean
Example:

false

created_by
string

ID of the user who created the datacenter (admin or owner only)