Barrelman Docs

Admin

Operational endpoints backing the admin console — data migrations, runnable scripts and jobs, metrics, and downstream service health. These power the import and maintenance workflow and are not part of the public query surface.

Migration status

Check if parent_context is populated and coverage stats.

GET
/admin/migration/status

Response Body

curl -X GET "https://example.com/admin/migration/status"
fetch("https://example.com/admin/migration/status")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/status"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/status"

response = requests.request("GET", url)

print(response.text)
Empty

Run full migration

Run post-import → codes → abbreviations → parent context → tsvectors. This may take several minutes on large datasets.

POST
/admin/migration/run

Response Body

curl -X POST "https://example.com/admin/migration/run"
fetch("https://example.com/admin/migration/run")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/run"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/run"

response = requests.request("POST", url)

print(response.text)
Empty

Run post-import SQL

Add columns, extract structured fields, build indexes.

POST
/admin/migration/post-import

Response Body

curl -X POST "https://example.com/admin/migration/post-import"
fetch("https://example.com/admin/migration/post-import")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/post-import"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/post-import"

response = requests.request("POST", url)

print(response.text)
Empty

Generate codes

Extract IATA, ICAO, ref, short_name, abbreviation, alt_name codes from OSM tags.

POST
/admin/migration/generate-codes

Response Body

curl -X POST "https://example.com/admin/migration/generate-codes"
fetch("https://example.com/admin/migration/generate-codes")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/generate-codes"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/generate-codes"

response = requests.request("POST", url)

print(response.text)
Empty

Generate abbreviations

Generate first-letter abbreviations for multi-word Latin-script names.

POST
/admin/migration/generate-abbreviations

Response Body

curl -X POST "https://example.com/admin/migration/generate-abbreviations"
fetch("https://example.com/admin/migration/generate-abbreviations")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/generate-abbreviations"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/generate-abbreviations"

response = requests.request("POST", url)

print(response.text)
Empty

Resolve parent context (full)

Spatial join to populate parent_context for all named places.

POST
/admin/migration/resolve-parent-context

Response Body

curl -X POST "https://example.com/admin/migration/resolve-parent-context"
fetch("https://example.com/admin/migration/resolve-parent-context")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/resolve-parent-context"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/resolve-parent-context"

response = requests.request("POST", url)

print(response.text)
Empty

Resolve parent context (incremental)

Resolve parent_context for new/changed POIs and cascade for changed boundaries.

POST
/admin/migration/resolve-parent-context-incremental

Response Body

curl -X POST "https://example.com/admin/migration/resolve-parent-context-incremental"
fetch("https://example.com/admin/migration/resolve-parent-context-incremental")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/resolve-parent-context-incremental"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/resolve-parent-context-incremental"

response = requests.request("POST", url)

print(response.text)
Empty

Rebuild tsvectors

Rebuild full-text search vectors for all named places (includes parent_context).

POST
/admin/migration/rebuild-tsvectors

Response Body

curl -X POST "https://example.com/admin/migration/rebuild-tsvectors"
fetch("https://example.com/admin/migration/rebuild-tsvectors")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/migration/rebuild-tsvectors"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/migration/rebuild-tsvectors"

response = requests.request("POST", url)

print(response.text)
Empty

Admin console config

GET
/admin/config

Response Body

curl -X GET "https://example.com/admin/config"
fetch("https://example.com/admin/config")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/config"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/config"

response = requests.request("GET", url)

print(response.text)
Empty

Verify admin key

GET
/admin/verify

Response Body

curl -X GET "https://example.com/admin/verify"
fetch("https://example.com/admin/verify")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/verify"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/verify"

response = requests.request("GET", url)

print(response.text)
Empty

List runnable scripts

GET
/admin/scripts

Response Body

curl -X GET "https://example.com/admin/scripts"
fetch("https://example.com/admin/scripts")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/scripts"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/scripts"

response = requests.request("GET", url)

print(response.text)
Empty

Run a script

POST
/admin/scripts/{id}/run

Request Body

application/jsonRequired
paramsobject

Path Parameters

idRequiredstring

Response Body

curl -X POST "https://example.com/admin/scripts/string/run" \
  -H "Content-Type: application/json" \
  -d '{
    "params": {}
  }'
const body = JSON.stringify({
  "params": {}
})

fetch("https://example.com/admin/scripts/string/run", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/admin/scripts/string/run"
  body := strings.NewReader(`{
    "params": {}
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/scripts/string/run"
body = {
  "params": {}
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

List jobs

GET
/admin/jobs

Response Body

curl -X GET "https://example.com/admin/jobs"
fetch("https://example.com/admin/jobs")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/jobs"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/jobs"

response = requests.request("GET", url)

print(response.text)
Empty

Get job detail + logs

GET
/admin/jobs/{id}

Path Parameters

idRequiredstring

Response Body

curl -X GET "https://example.com/admin/jobs/string"
fetch("https://example.com/admin/jobs/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/jobs/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/jobs/string"

response = requests.request("GET", url)

print(response.text)
Empty

Cancel a running job

POST
/admin/jobs/{id}/cancel

Path Parameters

idRequiredstring

Response Body

curl -X POST "https://example.com/admin/jobs/string/cancel"
fetch("https://example.com/admin/jobs/string/cancel")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/jobs/string/cancel"

  req, _ := http.NewRequest("POST", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/jobs/string/cancel"

response = requests.request("POST", url)

print(response.text)
Empty

Stream job logs (SSE)

GET
/admin/jobs/{id}/stream

Path Parameters

idRequiredstring

Response Body

curl -X GET "https://example.com/admin/jobs/string/stream"
fetch("https://example.com/admin/jobs/string/stream")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/jobs/string/stream"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/jobs/string/stream"

response = requests.request("GET", url)

print(response.text)
Empty

Data metrics

GET
/admin/metrics

Response Body

curl -X GET "https://example.com/admin/metrics"
fetch("https://example.com/admin/metrics")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/metrics"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/metrics"

response = requests.request("GET", url)

print(response.text)
Empty

Downstream service health

GET
/admin/services

Response Body

curl -X GET "https://example.com/admin/services"
fetch("https://example.com/admin/services")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/admin/services"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/services"

response = requests.request("GET", url)

print(response.text)
Empty

Proxy a request to the running API for testing

POST
/admin/test-endpoint

Request Body

application/jsonRequired
methodstring
pathRequiredstring
querystring
bodystring
authstring

Response Body

curl -X POST "https://example.com/admin/test-endpoint" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "string",
    "path": "string",
    "query": "string",
    "body": "string",
    "auth": "api"
  }'
const body = JSON.stringify({
  "method": "string",
  "path": "string",
  "query": "string",
  "body": "string",
  "auth": "api"
})

fetch("https://example.com/admin/test-endpoint", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/admin/test-endpoint"
  body := strings.NewReader(`{
    "method": "string",
    "path": "string",
    "query": "string",
    "body": "string",
    "auth": "api"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/admin/test-endpoint"
body = {
  "method": "string",
  "path": "string",
  "query": "string",
  "body": "string",
  "auth": "api"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty