Changes
Page history
Update API Endpoint Documentation
authored
Apr 14, 2025
by
Nick Fi
Hide whitespace changes
Inline
Side-by-side
Home/API-Doc.md
0 → 100644
View page @
c06b795b
---
title
:
API Endpoint Documentation
---
## End-point: key
This endpoint allows you to make an HTTP POST request to create a new API Key. Upon successful creation, the endpoint returns a 200 status code along with a JSON response containing the 'Key', 'Owner', and 'ValidFrom' fields.
### Example Response
```
json
{
"Key"
:
{
"Key"
:
"67ac7d21e7f826b3ba4f21b9oKXkiLBQ33lhzwPo"
,
"Owner"
:
"testadmin"
,
"ValidFrom"
:
"2025-02-12T10:51:13.165Z"
}
}
```
###
Method:
POST
>```
>
{{
base_url
}}
/key
>```
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
##
End-point:
key
This
endpoint
allows
you
to
make
an
HTTP
GET
request
to
retrieve
your
API
Key.
Upon
successful
creation,
the
endpoint
returns
a
200
status
code
along
with
a
JSON
response
containing
the
'Key',
'Owner',
and
'ValidFrom'
fields.
###
Example
Response
```
json
{
"Key": {
"Key": "67ac7d21e7f826b3ba4f21b9oKXkiLBQ33lhzwPo",
"Owner": "testadmin",
"ValidFrom": "2025-02-12T10:51:13.165Z"
}
}
```
### Method: GET
>```
>{{base_url}}/key
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances
Get a list of your created balances.
**Response Schema**:
``` json
{
balances: Balance[]
}
```
**Example Response:**
```
json
{
"balances"
:
[
{
"ID"
:
"67694d89f5369135dba51a96"
,
"Name"
:
"Balance One"
,
"Entries"
:
null
,
"Owner"
:
"testuser@testuser"
,
"Public"
:
false
},
{
"ID"
:
"67698398ec86538e06524667"
,
"Name"
:
"Balance Two"
,
"Entries"
:
null
,
"Owner"
:
"testuser@testuser"
,
"Public"
:
true
}
]
}
```
###
Method:
GET
>```
>
{{
base_url
}}
/balances
>```
###
Body
(**raw**)
```
json
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances
This allows us to create a new balance.
Example Request:
```
json
{
"name": "Annual Balance 2023",
"year": 2023,
"creationDate": {
"year": 2023,
"month": 11,
"day": 8
},
"creator": "John Doe",
"organizationalBoundaries": "Boundary description",
"operationalBoundaries": "Operational boundary description",
"amountEmployees": 100,
"amountStudents": 2000,
"amountUniMembers": 2100,
"usageArea": 5000,
"economizedArea": 1000
}
```
Example Response:
``` json
{
"balance": {
"name": "Annual Balance 2023",
"year": 2023,
"creationDate": {
"year": 2023,
"month": 11,
"day": 8
},
"creator": "John Doe",
"organizationalBoundaries": "Boundary description",
"operationalBoundaries": "Operational boundary description",
"amountEmployees": 100,
"amountStudents": 2000,
"amountUniMembers": 2100,
"usageArea": 5000,
"economizedArea": 1000
}
}
```
### Method: POST
>```
>{{base_url}}/balances
>```
### Body (**raw**)
```
json
{
"name"
:
"Annual Balance 2023"
,
"year"
:
2023
,
"creationDate"
:
{
"year"
:
2023
,
"month"
:
11
,
"day"
:
8
},
"creator"
:
"John Doe"
,
"organizationalBoundaries"
:
"Boundary description"
,
"operationalBoundaries"
:
"Operational boundary description"
,
"amountEmployees"
:
100
,
"amountStudents"
:
2000
,
"amountUniMembers"
:
2100
,
"usageArea"
:
5000
,
"economizedArea"
:
1000
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id
Allows us to retrieve a balance.
Example Response:
```
json
{
"balance"
:
{
"ID"
:
"67aa2450ca2c1b6e9e38af74"
,
"Name"
:
"Annual Balance 2023"
,
"Entries"
:
null
,
"Owner"
:
"testadmin"
,
"Public"
:
false
,
"Year"
:
2023
,
"CreationDate"
:
{
"year"
:
2023
,
"month"
:
11
,
"day"
:
8
},
"Creator"
:
"John Doe"
,
"Boundaries"
:
{
"Organizational"
:
"Boundary description"
,
"Operational"
:
"Operational boundary description"
},
"AmountEmployees"
:
100
,
"AmountStudents"
:
2000
,
"AmountUniMembers"
:
2100
,
"UsageArea"
:
5000
,
"EconomizedArea"
:
1000
}
}
```
###
Method:
GET
>```
>
{{
base_url
}}
/balances/:id
>```
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
##
End-point:
balances/:id
Allows
us
to
update
a
balance.
Example
Request:
```
json
{
"name": "Example Name",
"year": 2023,
"creationDate": {
"Year": 2022,
"Month": 12,
"Day": 20
},
"creator": "Example Creator",
"organizationalBoundaries": "Example Organizational Boundaries",
"operationalBoundaries": "Example Operational Boundaries",
"amountEmployees": 100,
"amountStudents": 200,
"amountUniMembers": 300,
"usageArea": 400,
"economizedArea": 500
}
```
Example Response:
``` json
{
"balance": {
"ID": "67aa2450ca2c1b6e9e38af74",
"Name": "Example Name",
"Entries": null,
"Owner": "testadmin",
"Public": false,
"Year": 2023,
"CreationDate": {
"year": 2022,
"month": 12,
"day": 20
},
"Creator": "Example Creator",
"Boundaries": {
"Organizational": "Example Organizational Boundaries",
"Operational": "Example Operational Boundaries"
},
"AmountEmployees": 100,
"AmountStudents": 200,
"AmountUniMembers": 300,
"UsageArea": 400,
"EconomizedArea": 500
}
}
```
### Method: PUT
>```
>{{base_url}}/balances/:id
>```
### Body (**raw**)
```
json
{
"name"
:
"Example Name"
,
"year"
:
2023
,
"creationDate"
:
{
"Year"
:
2022
,
"Month"
:
12
,
"Day"
:
20
},
"creator"
:
"Example Creator"
,
"organizationalBoundaries"
:
"Example Organizational Boundaries"
,
"operationalBoundaries"
:
"Example Operational Boundaries"
,
"amountEmployees"
:
100
,
"amountStudents"
:
200
,
"amountUniMembers"
:
300
,
"usageArea"
:
400
,
"economizedArea"
:
500
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id
Allows us to delete a balance.
### Method: DELETE
>```
>{{base_url}}/balances/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emissionfactors
Allows us to retrieve all emission factors.
Example Response:
```
json
[
{
"ID"
:
"67828c68508e8439794db6f9"
,
"Name"
:
"SF"
,
"Value"
:
1
,
"Unit"
:
"kgCO2e/kWh"
,
"Source"
:
"abc"
,
"Comment"
:
"2022"
,
"Classification"
:
true
},
{
"ID"
:
"67828cc1508e8439794db6fa"
,
"Name"
:
"Fuhrpark Liter Diesel"
,
"Value"
:
0.266
,
"Unit"
:
"kgCO2e/kWh"
,
"Source"
:
"abcde"
,
"Comment"
:
"-"
,
"Classification"
:
true
}
]
```
###
Method:
GET
>```
>
{{
base_url
}}
/emissionfactors
>```
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
##
End-point:
emissionfactors
Allows
us
to
create
a
new
emission
factor.
Example
Request:
```
json
{
"Name": "Wärme - location based",
"Value": 100,
"Unit": "kWh",
"Source": "Test Source",
"Comment": "Test Comment",
"Classification": false
}
```
Example response:
``` json
{
"emissionfactor": {
"ID": "67eb1245345ce4e4bb59473d",
"Name": "Wärme - location based",
"Value": 100,
"Unit": "kWh",
"Source": "Test Source",
"Comment": "Test Comment",
"Classification": false
}
}
```
### Method: POST
>```
>{{base_url}}/emissionfactors
>```
### Body formdata
|Param|value|Type|
|---|---|---|
|Name|Erdgas, BHKW 4x2-3 MW|text|
|Value|0.201|text|
|Unit|kgCO2e/kWh|text|
|Source|ecoinvent|text|
|Comment|-|text|
|Classification|true|text|
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emissionfactors/id
Allows us to get an emission factor.
Example Response:
```
json
{
"emissionfactor"
:
{
"ID"
:
"67aa10e721eddbeff3828585"
,
"Name"
:
"Emissionfactor1"
,
"Value"
:
100
,
"Unit"
:
"kWh"
,
"Source"
:
"Test Source"
,
"Comment"
:
"Test Comment"
,
"Classification"
:
false
}
}
```
###
Method:
GET
>```
>
{{
base_url
}}
/emissionfactors/:id
>```
###
Body
formdata
|Param|value|Type|
|---|---|---|
|ID|
6775
b
8
fbd
16446
b
2
dbd
641
da|text|
|Name|Emissionfactor
1
|text|
|Value|
13
|text|
|Unit|kgCO
2
e/kWh|text|
|Source|Test
Source|text|
|Comment|Test
Comment|text|
|Classification|
true
|text|
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
⁃
##
End-point:
emissionfactors/:id
Allows
us
to
update
an
emission
factor.
Example
Request:
```
json
{
"Name": "Emissionfactor1",
"Value": 100,
"Unit": "kWh",
"Source": "Test Source",
"Comment": "Test Comment",
"Classification": false
}
```
Example Response:
``` json
{
"emissionfactor": {
"ID": "67aa10e721eddbeff3828585",
"Name": "Emissionfactor1",
"Value": 100,
"Unit": "kWh",
"Source": "Test Source",
"Comment": "Test Comment",
"Classification": false
}
}
```
### Method: PUT
>```
>{{base_url}}/emissionfactors/:id
>```
### Body formdata
|Param|value|Type|
|---|---|---|
|Name|Wärme - location based1|text|
|Value|15|text|
|Unit|kgCO2e/kWh|text|
|Source|Test Source2|text|
|Comment|Test Comment2|text|
|Classification|false|text|
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emissionfactors/:id
Allows us to delete an emission factor.
### Method: DELETE
>```
>{{base_url}}/emissionfactors/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emitters
Allows us to get all emitters.
### Method: GET
>```
>{{base_url}}/emitters
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emitters
Allows us to create an emitter.
### Method: POST
>```
>{{base_url}}/emitters
>```
### Headers
|Content-Type|Value|
|---|---|
|Content-Type|application/json|
### Body (**raw**)
```
json
{
"name"
:
"BHKW Erdgas"
,
"factors"
:
[
"67862c1a38d3aba6adb38701"
]
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emitters/:id
Allows us to get emitter details.
### Method: GET
>```
>{{base_url}}/emitters/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emitters/:id
Allows us to update an emitter.
### Method: PUT
>```
>{{base_url}}/emitters/:id
>```
### Body (**raw**)
```
json
{
"name"
:
"Test Emitter"
,
"factors"
:
[
"6775c595282c462190a74334"
,
"9775c595282c462190a74235"
]
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: emitters/:id
Allows us to delete an Emitter.
### Method: DELETE
>```
>{{base_url}}/emitters/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id/entries
Allows us to get the entries of a balance.
### Method: GET
>```
>{{base_url}}/balances/:id/entries
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id/entries
Allows us to create an entry for a balance.
### Method: POST
>```
>{{base_url}}/balances/:id/entries
>```
### Body (**raw**)
```
json
{
"CreationDate"
:
{
"year"
:
2025
,
"month"
:
2
,
"day"
:
15
},
"subscope"
:
"64b5c1f55e3c4a2a6d94d0f7"
,
"emitter"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"SelectedFactor"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"unit"
:
"kg"
,
"amount"
:
123.45
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id/entries/:id
Allows us to update a balance's entry.
### Method: PUT
>```
>{{base_url}}/balances/:id/entries/:entry_id
>```
### Body (**raw**)
```
json
{
"CreationDate"
:
{
"year"
:
2025
,
"month"
:
2
,
"day"
:
15
},
"subscope"
:
"64b5c1f55e3c4a2a6d94d0f7"
,
"emitter"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"SelectedFactor"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"unit"
:
"kg"
,
"amount"
:
123.45
}
```
### Response: 200
```
json
{
"entry"
:
{
"ID"
:
"67b084a00795b181d600120c"
,
"Date"
:
{
"year"
:
2025
,
"month"
:
2
,
"day"
:
15
},
"Subscope"
:
"64b5c1f55e3c4a2a6d94d0f7"
,
"Emitter"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"SelectedFactor"
:
"64b5c1f55e3c4a2a6d94d0f8"
,
"Unit"
:
"kg"
,
"Amount"
:
123.45
,
"Comment"
:
""
}
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: balances/:id/entries/:id
Allows us to delete a balance's entry.
### Method: DELETE
>```
>{{base_url}}/balances/:id/entries/:entry_id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: subscopes
Allows us to retrieve a list of all subscopes.
### Method: GET
>```
>{{base_url}}/subscopes
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: subscopes
Allows us to create a new subscope.
Example Request:
```
json
{
"Scope"
:
2
,
"Name"
:
"Diesel"
}
```
Example
Response:
```
json
{
"subscope": {
"ID": "67eb1557345ce4e4bb59473e",
"Scope": 2,
"Name": "Diesel",
"Emittents": null
}
}
```
### Method: POST
>```
>{{base_url}}/subscopes
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: subscopes/:id
Allows us to update a subscope.
Example Request
``` json
{
"Scope": 1,
"Name": "subscope1a",
"Emittents": [
{
"ID": "6780e51cedf132a7905301a0",
"Name": "Test",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
},
{
"ID": "6780fe0104f1cb5f51714690",
"Name": "Test1",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
}
]
}
```
Example Response
```
json
{
"subscope"
:
{
"ID"
:
"67bdd31476755c9cd74df5c2"
,
"Scope"
:
1
,
"Name"
:
"subscope1a"
,
"Emittents"
:
[
{
"ID"
:
"6780e51cedf132a7905301a0"
,
"Name"
:
"Test"
,
"Factors"
:
[
"6775c595282c462190a74234"
,
"9775c595282c462190a74235"
]
},
{
"ID"
:
"6780fe0104f1cb5f51714690"
,
"Name"
:
"Test1"
,
"Factors"
:
[
"6775c595282c462190a74234"
,
"9775c595282c462190a74235"
]
}
]
}
}
```
###
Method:
PUT
>```
>
{{
base_url
}}
/subscopes/:id
>```
###
Body
(**raw**)
```
json
{
"Scope": 1,
"Name": "subscope1a",
"Emittents": [
{
"ID": "6780e51cedf132a7905301a0",
"Name": "Test",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
},
{
"ID": "6780fe0104f1cb5f51714690",
"Name": "Test1",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
}
]
}
```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: subscopes/:id
Allows us to get a subscope's details.
Example Response:
```
json
{
"subscope": {
"ID": "67bdd31476755c9cd74df5c2",
"Scope": 1,
"Name": "subscope1a",
"Emittents": [
{
"ID": "6780e51cedf132a7905301a0",
"Name": "Test",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
},
{
"ID": "6780fe0104f1cb5f51714690",
"Name": "Test1",
"Factors": [
"6775c595282c462190a74234",
"9775c595282c462190a74235"
]
}
]
}
}
```
### Method: GET
>```
>{{base_url}}/subscopes/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
## End-point: subscopes/:id
Allows us to delete a subscope.
### Method: DELETE
>```
>{{base_url}}/subscopes/:id
>```
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
_________________________________________________