واجهة الفوترة
اطّلع على ملف حسابك ورصيدك، واستبدل القسائم، وراجع سجلّ نشاطك.
يُموَّل الرصيد عبر القسائم (vouchers) ويُسجَّل في دفتر لا يقبل إلا الإضافة. القسائم تضيف رصيداً، بينما تُقاس خدماتك العاملة (تطبيقات Docker وقواعد بيانات Postgres وMySQL وRedis المُدارة) بالساعة ويُخصَم مقابلها من رصيدك حسب استخدامك. أمّا تخزين المستودع الخاص والنطاقات المخصّصة فتُسعَّر على حدة ولا تخضع للقياس. تتيح لك هذه الصفحة كذلك ملف حسابك، وسجلّ معاملاتك، واستهلاك الشهر الحالي، وبطاقة الأسعار السارية، ونشاطك الأخير. هذه العمليات مُولَّدة من مواصفة OpenAPI المنسَّقة.
Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/me"{
"sub": "string",
"email": "[email protected]",
"balance_syp": 0
}{
"error": "validation failed",
"request_id": "01J9Z3K8QWERTYUIOP"
}Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/billing"{
"balance_uusd": 5000000,
"balance_usd": "5.00",
"balance_syp": 650000,
"syp_per_usd": 130,
"low_balance": true,
"low_balance_threshold_uusd": 0,
"suspended_for_billing": true,
"display_currency": "AED",
"balance_display": "18.36",
"fx_rate_per_usd": 3.6725
}{
"error": "validation failed",
"request_id": "01J9Z3K8QWERTYUIOP"
}Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/billing/transactions"{
"transactions": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"amount_uusd": 0,
"kind": "usage_debit",
"source": "string",
"ref_id": "string",
"balance_after_uusd": 0,
"created_at": "2019-08-24T14:15:22Z"
}
],
"total": 0,
"limit": 0,
"offset": 0
}{
"error": "validation failed",
"request_id": "01J9Z3K8QWERTYUIOP"
}Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/billing/usage"{
"period_start": "2019-08-24T14:15:22Z",
"period_end": "2019-08-24T14:15:22Z",
"total_uusd": 0,
"lines": [
{
"resource_type": "container",
"rate_kind": "memory_gb_hour",
"unit": "GB-hour",
"quantity_milli": 694000,
"unit_price_uusd": 0,
"amount_uusd": 0,
"replicas_milli": 3000
}
],
"ai_pending": {
"prompt_tokens": 0,
"completion_tokens": 0
}
}{
"error": "validation failed",
"request_id": "01J9Z3K8QWERTYUIOP"
}Response Body
application/json
application/json
curl -X GET "https://example.com/v1/billing/rate-card"{
"rate_card": [
{
"resource_kind": "memory_gb_hour",
"unit": "GB-hour",
"unit_price_uusd": 200
}
],
"settings": {
"welcome_credit_uusd": 0,
"low_balance_threshold_uusd": 0,
"syp_per_usd": 0,
"voucher_denominations_uusd": [
0
]
}
}{
"error": "validation failed",
"request_id": "01J9Z3K8QWERTYUIOP"
}Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/vouchers/redeem" \ -H "Content-Type: application/json" \ -d '{ "code": "ALW-2K4F-9QXM" }'{
"balance_syp": 0,
"history": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"amount_syp": 0,
"kind": "credit",
"reason": "string",
"created_at": "2019-08-24T14:15:22Z"
}
]
}Authorization
bearerAuth Bearer JWT obtained after Google sign-in in the portal.
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/activity"[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"kind": "container.deployed",
"summary": "string",
"created_at": "2019-08-24T14:15:22Z"
}
]