alawadi.cloudمستندات
مرجع الـ API

واجهة التطبيقات

أنشئ تطبيقات HTTP داخل مشروعك وحدّثها وافحصها وتحكّم بها.

أدِر تطبيقات HTTP (تطبيقات Docker) العاملة داخل مشروعك: أنشئها، وحدّث حزمة Docker أو متغيّرات البيئة الخاصة بها، وافحص السجلّات، وتحكّم بدورة حياتها عبر إعادة التشغيل والإيقاف والتشغيل. يستمع كل تطبيق على المنفذ 8080 كعملية غير جذرية (non-root)، ويحصل تلقائياً على نطاق فرعي *.alawadi.cloud مع شهادة TLS مُدارة.

GET
/v1/projects/{projectId}/containers

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Response Body

application/json

curl -X GET "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers"
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "name": "string",
    "display_name": "string",
    "type": "container",
    "runtime": "string",
    "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
    "port": 3000,
    "replicas": 0,
    "status": "provisioning",
    "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
    "public_url": "https://my-shop.alawadi.cloud",
    "public": true,
    "cpu_milli": 0,
    "memory_mb": 0,
    "storage_gb": 0,
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "connection": {
      "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
      "port": "5432",
      "env_var": "DATABASE_URL",
      "instructions": "string",
      "requires_auth": "true"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "marketplace_app": "wordpress"
  }
]
POST
/v1/projects/{projectId}/containers

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "image": "string",    "http_port": 0  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "name": "string",
  "display_name": "string",
  "type": "container",
  "runtime": "string",
  "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
  "port": 3000,
  "replicas": 0,
  "status": "provisioning",
  "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
  "public_url": "https://my-shop.alawadi.cloud",
  "public": true,
  "cpu_milli": 0,
  "memory_mb": 0,
  "storage_gb": 0,
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "connection": {
    "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
    "port": "5432",
    "env_var": "DATABASE_URL",
    "instructions": "string",
    "requires_auth": "true"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "marketplace_app": "wordpress"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
PATCH
/v1/projects/{projectId}/containers/{containerId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "name": "string",
  "display_name": "string",
  "type": "container",
  "runtime": "string",
  "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
  "port": 3000,
  "replicas": 0,
  "status": "provisioning",
  "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
  "public_url": "https://my-shop.alawadi.cloud",
  "public": true,
  "cpu_milli": 0,
  "memory_mb": 0,
  "storage_gb": 0,
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "connection": {
    "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
    "port": "5432",
    "env_var": "DATABASE_URL",
    "instructions": "string",
    "requires_auth": "true"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "marketplace_app": "wordpress"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
DELETE
/v1/projects/{projectId}/containers/{containerId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Response Body

application/json

curl -X DELETE "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
GET
/v1/projects/{projectId}/containers/{containerId}/logs

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Response Body

text/plain

curl -X GET "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08/logs"
"string"
POST
/v1/projects/{projectId}/containers/{containerId}/restart

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Response Body

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08/restart"
Empty
POST
/v1/projects/{projectId}/containers/{containerId}/stop

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Response Body

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08/stop"
Empty
POST
/v1/projects/{projectId}/containers/{containerId}/start

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string
containerId*string

Response Body

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/containers/497f6eca-6276-4993-bfeb-53cbbbba6f08/start"
Empty

الأخطاء تأتي برمز ورسالة

يُعيد كل طلب فاشل جسم JSON بالشكل { "code": "...", "message": "..." }. الرموز التي ستراها على نقاط النهاية هذه: 401 UNAUTHORIZED؛ 402 INSUFFICIENT_BALANCE أو 402 ACCOUNT_NOT_INITIALIZED؛ 403 FORBIDDEN أو 403 ACCOUNT_SUSPENDED؛ 404 NOT_FOUND (المورد الذي لا تملكه يظهر كأنه غير موجود، دون أي تسريب)؛ 409 عندما يكون الاسم مأخوذاً مسبقاً، أو عندما يتحكّم التوسيع التلقائي بعدد النسخ (AUTOSCALING_OWNS_REPLICAS)، أو عندما لا ينطبق إجراء دورة الحياة على نوع الخدمة (LIFECYCLE_UNSUPPORTED)؛ و429 RATE_LIMITED. أما وسم الحزمة المفقود أو القابل للتغيير فيُرفض وقت النشر بالرمز 400 BAD_IMAGE.

النشر والتوسيع والتنبيهات

نشر حزمة جديدة خطوة منفصلة وغير قابلة للتغيير. كل إصدار هو حزمة Docker تُرفع إلى مستودعك الخاص وتُطرح عبر وسم فريد، وليس :latest أبداً. تولّد البوابة سير عمل GitHub Actions نيابةً عنك، فلا يتبقّى لنظام CI إلا نسخه ورفع الحزمة. أما التوسيع التلقائي وسياسات التنبيه فترتبط بتطبيق قيد التشغيل، ولكلٍّ منها صفحته المرجعية الخاصة.

قواعد البيانات المُدارة

من لوحة التحكم أو الواجهة

تملك قواعد Postgres وMySQL وRedis المُدارة تجربةً كاملة في لوحة التحكم ضمن قواعد البيانات (الإنشاء، والربط بتطبيق، وعرض بيانات الاتصال). نقاط النهاية هذه هي مسار الواجهة لنفس التجربة: راجع إضافة قواعد البيانات المُدارة.

POST
/v1/projects/{projectId}/postgres

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/postgres" \  -H "Content-Type: application/json" \  -d '{    "name": "orders-db",    "resources": {      "cpu_milli": 500,      "memory_mb": 1024,      "storage_gb": 10    }  }'
{
  "service": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "name": "string",
    "display_name": "string",
    "type": "container",
    "runtime": "string",
    "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
    "port": 3000,
    "replicas": 0,
    "status": "provisioning",
    "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
    "public_url": "https://my-shop.alawadi.cloud",
    "public": true,
    "cpu_milli": 0,
    "memory_mb": 0,
    "storage_gb": 0,
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "connection": {
      "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
      "port": "5432",
      "env_var": "DATABASE_URL",
      "instructions": "string",
      "requires_auth": "true"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "marketplace_app": "wordpress"
  },
  "connection": {
    "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
    "port": "5432",
    "env_var": "DATABASE_URL",
    "instructions": "string",
    "requires_auth": "true"
  }
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
POST
/v1/projects/{projectId}/mysql

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/mysql" \  -H "Content-Type: application/json" \  -d '{    "name": "orders-db",    "resources": {      "cpu_milli": 500,      "memory_mb": 1024,      "storage_gb": 10    }  }'
{
  "service": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "name": "string",
    "display_name": "string",
    "type": "container",
    "runtime": "string",
    "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
    "port": 3000,
    "replicas": 0,
    "status": "provisioning",
    "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
    "public_url": "https://my-shop.alawadi.cloud",
    "public": true,
    "cpu_milli": 0,
    "memory_mb": 0,
    "storage_gb": 0,
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "connection": {
      "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
      "port": "5432",
      "env_var": "DATABASE_URL",
      "instructions": "string",
      "requires_auth": "true"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "marketplace_app": "wordpress"
  },
  "connection": {
    "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
    "port": "5432",
    "env_var": "DATABASE_URL",
    "instructions": "string",
    "requires_auth": "true"
  }
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
POST
/v1/projects/{projectId}/redis

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/redis" \  -H "Content-Type: application/json" \  -d '{    "name": "cache",    "resources": {      "cpu_milli": 500,      "memory_mb": 1024,      "storage_gb": 10    }  }'
{
  "service": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "name": "string",
    "display_name": "string",
    "type": "container",
    "runtime": "string",
    "image": "registry.alawadi.cloud/acme/web:sha-8f31c2a",
    "port": 3000,
    "replicas": 0,
    "status": "provisioning",
    "internal_host": "web.tenant-3f2a.svc.cluster.local:3000",
    "public_url": "https://my-shop.alawadi.cloud",
    "public": true,
    "cpu_milli": 0,
    "memory_mb": 0,
    "storage_gb": 0,
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "connection": {
      "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
      "port": "5432",
      "env_var": "DATABASE_URL",
      "instructions": "string",
      "requires_auth": "true"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "marketplace_app": "wordpress"
  },
  "connection": {
    "host": "orders-db-rw.tenant-3f2a.svc.cluster.local:5432",
    "port": "5432",
    "env_var": "DATABASE_URL",
    "instructions": "string",
    "requires_auth": "true"
  }
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
GET
/v1/projects/{projectId}/service-links

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/service-links"
{
  "links": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
      "consumer_service_id": "23570cdd-ac17-47d2-bcbc-c7128eb2ba97",
      "provider_service_id": "17062ceb-e6d9-456f-9abb-e8f6605cc7cc",
      "link_type": "http",
      "injected_env": {
        "property1": "string",
        "property2": "string"
      }
    }
  ]
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
POST
/v1/projects/{projectId}/service-links

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/service-links" \  -H "Content-Type: application/json" \  -d '{    "consumer_service_id": "23570cdd-ac17-47d2-bcbc-c7128eb2ba97",    "provider_service_id": "17062ceb-e6d9-456f-9abb-e8f6605cc7cc",    "link_type": "http"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  "consumer_service_id": "23570cdd-ac17-47d2-bcbc-c7128eb2ba97",
  "provider_service_id": "17062ceb-e6d9-456f-9abb-e8f6605cc7cc",
  "link_type": "http",
  "injected_env": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}
{
  "error": "validation failed",
  "request_id": "01J9Z3K8QWERTYUIOP"
}

المستودعات الخاصة

GET
/v1/registries

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/registries"
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "host": "ghcr.io",
    "username": "string"
  }
]
POST
/v1/registries

Authorization

bearerAuth
AuthorizationBearer <token>

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/registries" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "host": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "host": "ghcr.io",
  "username": "string"
}
GET
/v1/registries/{registryId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

registryId*string

Response Body

application/json

curl -X GET "https://example.com/v1/registries/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "host": "ghcr.io",
  "username": "string"
}
PUT
/v1/registries/{registryId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

registryId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/v1/registries/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "host": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "host": "ghcr.io",
  "username": "string"
}
DELETE
/v1/registries/{registryId}

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer JWT obtained after Google sign-in in the portal.

In: header

Path Parameters

registryId*string

Response Body

curl -X DELETE "https://example.com/v1/registries/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty

في هذه الصفحة