> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/ar/tenants.md).

# 🕸️ المستأجرون

باستخدام المستأجرين على طول [ترخيص متعدد المستأجرين](https://www.ngsurvey.com/home/features) يمكنك تشغيل تثبيت واحد من ngSurvey مشترك عبر منظمات أو عملاء متعددين بحيث يكون لكلٍ منهم مستخدمون ومجموعات واستبيانات وإعدادات نظام منفصلة يمكن إدارتها إما على مستوى المستأجر أو بشكل عالمي من المستأجر الجذري.

![](https://848173432-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-Mh4c3UT_UuPgVNlGs7g%2F-Mh4c5p9dVZIzxHbLNbQ%2Fimage.png?alt=media\&token=5f5f96f6-a3b5-4188-9df3-9c01cfc5da9d)

يمكن إعداد كل مستأجر باستخدام أسماء مضيفين أو نطاقات ستستخدمها ngSurvey لمعرفة تحت أي مستأجر يجب أن تعمل. داخليًا لدى كل مستأجر قاعدة بيانات معزولة خاصة به مما يتيح لك تشغيل المستأجرين تحت خوادم أو مناطق مختلفة عن قاعدة بيانات ngSurvey الرئيسية.

{% hint style="info" %}
نظرًا لأن لكل مستأجر إعداداته الخاصة يمكنك تعيين علامة تجارية مختلفة لكل مستأجر.&#x20;
{% endhint %}

## ➕ إضافة **مستأجر**

يمكن إضافة المستأجرين الجدد وإدارتهم من شاشة System / Tenant.

![](https://848173432-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-Mgp3dSYv_BKowwOHwwN%2F-Mgp4qs-ET1x0-Lz-Y-N%2Fimage.png?alt=media\&token=972daff3-0085-4203-b9d6-bde4cb253e51)

## 🔅 خصائص المستأجر

* **`Organization`** الاسم الفريد للمستأجر. لا يمكن تغييره لاحقًا.
* **`Domain`** هو النطاق/المضيف الذي سيعمل تحته المستأجر. يمكنك أن يكون لديك نطاق واحد أو عدة نطاقات/مضيفين لكل مستأجر.
* **`Use custom connection string`** يتيح لك تعريف سلسلة اتصال خاصة بك إلى قاعدة بيانات ngSurvey التي سيستخدمها المستأجر.
* **`Copy system settings`** نسخ إعدادات نظام الجذر للمستأجر إلى المستأجر الذي تم إنشاؤه حديثًا.

{% hint style="info" %}
المستخدم الأول الذي سيتم إنشاؤه في المستأجر مع امتيازات سيكون نفس المستخدم الذي يُستخدم لإضافة المستأجر كمسؤول. يمكن تحرير المستخدمين إما عن طريق الاتصال بالمستأجر باستخدام النطاق/المضيف المحدد للمستأجر أو من خلال المستأجر الجذري عن طريق تغيير سياق المستأجر الجذري إلى المستأجر الذي تم إنشاؤه حديثًا. &#x20;
{% endhint %}

## 🔨 تحرير المستأجر

يمكن إزالة المستأجرين أو تحريرهم من شاشة System / tenant. يمكنك في أي وقت الاطلاع على حالة مستأجرك وقاعدة بياناته.   &#x20;

![](https://848173432-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-Mgp9Ev-q-UZQhOjzEFu%2F-MgpJoP6v9W5xmrZOuwp%2Fimage.png?alt=media\&token=4aa50c8d-bf00-412c-a2d7-b09634d25db0)

في حال تحديثات على إصدارات أحدث سيقوم NGSurvey تلقائيًا بتحديث جميع قواعد بيانات المستأجرين إذا كان لديك [AutoDBUpgrade](/ar/installation-setup/installation/microsoft-iis.md) مفعل للترقية التلقائية. إذا قمت بتعطيل الترقية التلقائية يمكنك استخدام خيار Upgrade tenants لترقية جميع قواعد بيانات المستأجرين غير المتزامنة مع تثبيت ngSurvey الجذري.

{% hint style="danger" %}
كن حذرًا إذا حذفت مستأجرًا مع قاعدة بياناته لأن البيانات لا يمكن استردادها ما لم يكن لديك نسخة احتياطية من قاعدة البيانات.
{% endhint %}

## ↪️[️](https://emojipedia.org/left-right-arrow/) التحويل من الجذر إلى مستأجر

تختار ngSurvey المستأجرين بناءً على النطاق/المضيف المستخدم لاستدعاء موقع ngSurvey ولكن يمكن للمسؤولين الوصول إلى جميع المستأجرين المختلفين باستخدام مفتاح تبديل المستأجر.

![](https://848173432-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MgpL1dI3wiV4L6tEx0X%2F-MgpLyaMo6I3Iz8qNKpG%2Fimage.png?alt=media\&token=d5156397-83d0-4b58-85aa-734c4365a5c2)

باستخدام المفتاح يمكنك اختيار أي مستأجر تريده، وبمجرد التحديد ستعمل ngSurvey في سياق هذا المستأجر مما يتيح لك تحرير وإدارة جميع البيانات والمستخدمين والإعدادات المتاحة تحت هذا المستأجر.

![](https://848173432-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MgpMNRtj9k80PYiVKBr%2F-MgpMxjfgFAaKTyiZRsf%2Fimage.png?alt=media\&token=57262a49-192d-4b85-967f-e11a05b92661)

{% hint style="info" %}
من الممكن فقط التبديل إلى مستأجر مختلف عند تشغيل قسم الإدارة تحت تثبيت ngSurvey الجذري بامتيازات مسؤول. &#x20;
{% endhint %}

## 👩🏻‍💻 استدعاءات API للمستأجرين

كما هو الحال مع قسم الاستبيانات والإدارة، ستشغل ngSurvey استدعاء API تلقائيًا بناءً على النطاق/المضيف المستخدم لاستدعاء الـ API. ومع ذلك من الممكن إجبار استدعاء الـ API على العمل تحت سياق مستأجر معين عند الاستدعاء من المستأجر الجذري عن طريق إضافة اسم/قيمة الهيدر التالية في استدعاء HTTP الخاص بك.

**`X-NGS-TenantId:TenanId`**&#x20;

لمحاكاة المستخدم الحالي للوصول إلى مستأجر تحتاج إلى استدعاء الـ API باستخدام حساب مسؤول من المستأجر الجذر&#x64A;**.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/ar/tenants.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
