A table in the API is an exported table from Position Green where you can design the contents of the table. The format of the response is always the same only varying on the number of columns you have set up when designing the table.
Design a table in Position Green
After receiving a link from Position Green to a table you can select what columns and what filters you require to create a table you want to get using the API.
In the example below all organizational units are exported with their corresponding scope 1, 2 and 3 in each column.
Position Green API Swagger
Below you'll find a description of the tables endpoint, to test the endpoint please go to our Swagger page.
Query tables in API
Returns a list of available tables
GET https://api.positiongreen.com/v1/tables
Returns a list of tables
{
// Response
}
For each table set to be visible in the API it will return an object when querying tables.
Example of a response.
[
{
"id": "201b9192-e565-4680-ad64-30fd78dc4b6d",
"name": "API Table 1",
"description": ""
}
]
Get data for table
Returns data for the specific table
GET https://api.positiongreen.com/v1/tables/id
Returns data for a table
Path Parameters
Name | Type | Description |
* | String |
Example response below for a table. Each row in the table is returned as an object where the column name is key and the data from the table is the value.
[
{
"Organisatorisk enhet": "Supplier 2",
"Scope 1": 2000,
"Scope 2": 5200,
"Scope 3": 15700
},
{
"Organisatorisk enhet": "Supplier 1",
"Scope 1": 1500,
"Scope 2": 4300,
"Scope 3": 5800
},
{
"Organisatorisk enhet": "Supplier 4",
"Scope 1": 1200,
"Scope 2": 5000,
"Scope 3": 8000
},
{
"Organisatorisk enhet": "Supplier 6",
"Scope 1": 890,
"Scope 2": 3500,
"Scope 3": 5080
},
{
"Organisatorisk enhet": "Supplier 3",
"Scope 1": 500,
"Scope 2": 1500,
"Scope 3": 2000
},
{
"Organisatorisk enhet": "Supplier 5",
"Scope 1": 480,
"Scope 2": 1800,
"Scope 3": 1400
}
]
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article