Chuyển tới nội dung chính

Public endpoint

Mỗi request cần được gửi đến public endpoint của service tương ứng. Bạn có thể lấy danh sách public endpoint bằng cách gửi request đến https://api.vietnix.cloud/v3/auth/catalog. Để dễ đọc hơn, bạn có thể lọc response bằng công cụ jq được cài sẵn trên mỗi node.

Request mẫu​

curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud/v3/auth/catalog | jq '.catalog[] | . as {
endpoints: $e,
type: $t,
name: $n
} | $e[] | {
type: $t,
serviceName: $n,
publicEndpoint: select(.interface=="public").url
}'

Response mẫu​

JSON body
{
"type": "volumev2",
"serviceName": "cinderv2",
"publicEndpoint": "https://api.vietnix.cloud:8776/v2/f33507157a634f1cac71e06a70fb558e"
}
{
"type": "volumev3",
"serviceName": "cinderv3",
"publicEndpoint": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e"
}
{
"type": "identity",
"serviceName": "keystone",
"publicEndpoint": "https://api.vietnix.cloud:5000/v3"
}
{
"type": "image",
"serviceName": "glance",
"publicEndpoint": "https://api.vietnix.cloud:9292"
}
{
"type": "placement",
"serviceName": "placement",
"publicEndpoint": "https://api.vietnix.cloud:8780"
}
{
"type": "compute",
"serviceName": "nova",
"publicEndpoint": "https://api.vietnix.cloud:8774/v2.1/f33507157a634f1cac71e06a70fb558e"
}
{
"type": "network",
"serviceName": "neutron",
"publicEndpoint": "https://api.vietnix.cloud:9696"
}
{
"type": "orchestration",
"serviceName": "heat",
"publicEndpoint": "https://api.vietnix.cloud:8004/v1/f33507157a634f1cac71e06a70fb558e"
}
{
"type": "metric",
"serviceName": "gnocchi",
"publicEndpoint": "https://api.vietnix.cloud:8041"
}
{
"type": "key-manager",
"serviceName": "barbican",
"publicEndpoint": "https://api.vietnix.cloud:9313"
}
{
"type": "load-balancer",
"serviceName": "octavia",
"publicEndpoint": "https://api.vietnix.cloud:9888"
}
{
"type": "container-infra",
"serviceName": "magnum",
"publicEndpoint": "https://api.vietnix.cloud:9513/v1"
}
{
"type": "backup",
"serviceName": "freezer",
"publicEndpoint": "https://api.vietnix.cloud:8736"
}