curl --request GET \
--url https://api.staging.loci.ng/v1/frames/data \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.loci.ng/v1/frames/data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.loci.ng/v1/frames/data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.loci.ng/v1/frames/data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.loci.ng/v1/frames/data"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.loci.ng/v1/frames/data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.loci.ng/v1/frames/data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"frames": [
{
"id": "2163551",
"bbox": [
7.48751263500003,
9.051434265000069,
7.500301437000076,
9.06200771500005
],
"datasets": [
{
"layerId": "lyr_8142687a47796c6e",
"name": "Administrative baseline",
"category": "Administrative",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"adm_lga": "ABUJA MUNICIPAL AREA COUNCIL",
"adm_lga_code": "436",
"adm_state": "FCT",
"adm_state_code": "14",
"adm_ward": "GARKI",
"adm_ward_code": "9470",
"adm_zone": "NORTH CENTRAL",
"adm_zone_code": "3"
}
},
{
"layerId": "lyr_07311eb9fddfe966",
"name": "Built environment baseline",
"category": "Built environment",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"bld_ct": "608",
"bld_dens": "1237.337222089773"
}
},
{
"layerId": "lyr_96ed00bcae6ecbe5",
"name": "Cultural baseline",
"category": "Cultural",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"cul_ctethnfrm": "1",
"cul_ctethnsta": "5",
"cul_ctlangfrm": "1",
"cul_ctlangsta": "8",
"cul_ethnfrm": "Gwandara",
"cul_ethnsta": "Gbari, Gwandara, Igbira, Koro, Nupe",
"cul_langfrm": "Gwandara",
"cul_langsta": "Ashe, Begbere-Ejar, Dibo, Gade, Gbagyi, Gbari, Gwandara, Ija-Zuba",
"cul_rururb": "Urban"
}
},
{
"layerId": "lyr_ee58d5508da410ea",
"name": "Physical baseline",
"category": "Physical",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"phy_elevmean": "522.0260260260264",
"phy_landcov": "6",
"phy_sbsiltxtcls": "6",
"phy_slopemean": "6.229817091881695",
"phy_tpsiltxtcls": "9"
}
},
{
"layerId": "lyr_1b81b870d62fe092",
"name": "Population baseline",
"category": "Population",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"pop_demest25": "5699",
"pop_demest26": "5805"
}
},
{
"layerId": "lyr_1c0ea62e30f89f79",
"name": "Urbanisation baseline",
"category": "Urbanisation",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"urb_class": "Peri-urban",
"urb_index": "1"
}
}
]
}
]
}
}What is recorded on frames
Everything the datasets your key can read say about the frames you name, grouped by frame and named by dataset.
A baseline dataset, one keyed by frame, contributes its row for each frame as values: the administrative identity, population, buildings, physical and cultural attributes Milsat records, and any baseline your organisation has added or licensed. A feature dataset, one of points, lines or polygons, contributes the features bound to each frame as features, at most 200 per dataset per request. Feature datasets appear only for a key holding feature.read; a narrower key sees baselines alone.
A dataset that records nothing on a frame is simply absent from that frame’s list, and a frame id the index does not know comes back with no box and no datasets. Neither is an error.
A dataset licensed per query is charged once per request in which it contributed something, and its id is listed in charged. One the organisation’s credits cannot cover is left out and named in leftOut with the reason, so the rest of the answer still arrives.
At most 100 frame ids per request. Needs frame.read.
curl --request GET \
--url https://api.staging.loci.ng/v1/frames/data \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.loci.ng/v1/frames/data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.loci.ng/v1/frames/data', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.loci.ng/v1/frames/data",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.loci.ng/v1/frames/data"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.loci.ng/v1/frames/data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.loci.ng/v1/frames/data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"frames": [
{
"id": "2163551",
"bbox": [
7.48751263500003,
9.051434265000069,
7.500301437000076,
9.06200771500005
],
"datasets": [
{
"layerId": "lyr_8142687a47796c6e",
"name": "Administrative baseline",
"category": "Administrative",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"adm_lga": "ABUJA MUNICIPAL AREA COUNCIL",
"adm_lga_code": "436",
"adm_state": "FCT",
"adm_state_code": "14",
"adm_ward": "GARKI",
"adm_ward_code": "9470",
"adm_zone": "NORTH CENTRAL",
"adm_zone_code": "3"
}
},
{
"layerId": "lyr_07311eb9fddfe966",
"name": "Built environment baseline",
"category": "Built environment",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"bld_ct": "608",
"bld_dens": "1237.337222089773"
}
},
{
"layerId": "lyr_96ed00bcae6ecbe5",
"name": "Cultural baseline",
"category": "Cultural",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"cul_ctethnfrm": "1",
"cul_ctethnsta": "5",
"cul_ctlangfrm": "1",
"cul_ctlangsta": "8",
"cul_ethnfrm": "Gwandara",
"cul_ethnsta": "Gbari, Gwandara, Igbira, Koro, Nupe",
"cul_langfrm": "Gwandara",
"cul_langsta": "Ashe, Begbere-Ejar, Dibo, Gade, Gbagyi, Gbari, Gwandara, Ija-Zuba",
"cul_rururb": "Urban"
}
},
{
"layerId": "lyr_ee58d5508da410ea",
"name": "Physical baseline",
"category": "Physical",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"phy_elevmean": "522.0260260260264",
"phy_landcov": "6",
"phy_sbsiltxtcls": "6",
"phy_slopemean": "6.229817091881695",
"phy_tpsiltxtcls": "9"
}
},
{
"layerId": "lyr_1b81b870d62fe092",
"name": "Population baseline",
"category": "Population",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"pop_demest25": "5699",
"pop_demest26": "5805"
}
},
{
"layerId": "lyr_1c0ea62e30f89f79",
"name": "Urbanisation baseline",
"category": "Urbanisation",
"kind": "frames",
"orgId": "org-milsat",
"values": {
"urb_class": "Peri-urban",
"urb_index": "1"
}
}
]
}
]
}
}Authorizations
An API key minted in the Developers tab of the LOCI app, sent as Authorization: Bearer loci_sk_…. Acts for one organisation, is read-only, and expires.
Query Parameters
Comma-separated frame ids, at most 100.
Response
One entry per requested frame, in the order asked.
Show child attributes
Show child attributes