请登陆roapi-cloud网站,并注册帐号,获取可以访问服务的token.
复制 docker run -t --rm -p 8080:8080 ghcr.io/roapi-cloud/roapi-cloud:latest --addr-http 0.0.0.0:8080
复制 curl -u <你的帐号>:<你的token> -k https://localhost:8080/api/<你的空间名>/spacex_launches/_json -d test_data/spacex_launches.json
curl -u <你的帐号>:<你的token> -k https://localhost:8080/api/<你的空间名>/uk_cities_with_headers/_csv -d test_data/uk_cities_with_headers.csv
复制 curl -X POST -d "SELECT city, lat, lng FROM uk_cities LIMIT 2" localhost:8080/api/<你的空间名>/sql
curl -X POST -d "query { uk_cities(limit: 2) {city, lat, lng} }" localhost:8080/api/<你的空间名>/graphql
curl "localhost:8080/api/<你的空间名>/tables/uk_cities?columns=city,lat,lng&limit=2"
复制 [
{
"city": "Elgin, Scotland, the UK",
"lat": 57.653484,
"lng": -3.335724
},
{
"city": "Stoke-on-Trent, Staffordshire, the UK",
"lat": 53.002666,
"lng": -2.179404
}
]
复制 curl localhost:8080/api/schema
复制 {
"uk_cities": {
"fields": [
{
"name": "city",
"data_type": "Utf8",
"nullable": false,
"dict_id": 0,
"dict_is_ordered": false
},
{
"name": "lat",
"data_type": "Float64",
"nullable": false,
"dict_id": 0,
"dict_is_ordered": false
},
{
"name": "lng",
"data_type": "Float64",
"nullable": false,
"dict_id": 0,
"dict_is_ordered": false
}
]
}
}