الانتقال إلى المحتوى الرئيسي
PATCH
/
workspaces
/
{workspaceId}
/
organizations
/
{organizationId}
تحديث منظمة
curl --request PATCH \
  --url https://api.altostrat.io/workspaces/{workspaceId}/organizations/{organizationId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Global Marketing Team",
  "billing_account_id": "cus_a1b2c3d4e5f6g7h8",
  "limits": {
    "users": 100,
    "locations": null
  },
  "picture": "https://example.com/new_logo.png",
  "branding": {
    "display_name": "ACME Inc.",
    "login_hint": "acme-inc",
    "colors": {
      "primary": "#007bff"
    }
  }
}'
{
  "id": "org_aBcDeFg123456789",
  "name": "Engineering Department",
  "workspace_id": "ws_a1b2c3d4e5f6g7h8",
  "external_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "parent_org_id": "org_zYxWvUt987654321",
  "path": "org_root123#org_parent456",
  "depth": 2,
  "billing_account_id": "cus_a1b2c3d4e5f6g7h8",
  "picture": "https://cdn.altostrat.io/logos/engineering.png",
  "usage": {
    "usage": {
      "locations": 2,
      "users": 5
    },
    "subtree_usage": {
      "locations": 10,
      "users": 25
    }
  },
  "limits": {
    "locations": 10,
    "users": 50
  },
  "branding": {
    "display_name": "ACME Corp",
    "login_hint": "acme-corp",
    "colors": {
      "primary": "#FF5733",
      "page_background": "#FFFFFF"
    }
  }
}

Authorizations

Authorization
string
header
required

أدخل JWT الخاص بك بالتنسيق: Bearer {token}

Path Parameters

workspaceId
string
required

معرّف مساحة العمل.

Example:

"ws_a1b2c3d4e5f6g7h8"

organizationId
string
required

معرّف المنظمة.

Example:

"org_aBcDeFg123456789"

Body

application/json

قدم حقلاً واحدًا أو أكثر للتحديث. الحقول التي لم يتم توفيرها ستبقى دون تغيير.

name
string

الاسم الجديد للمنظمة. 50 حرفًا كحد أقصى.

Example:

"Global Marketing Team"

billing_account_id
string

معرّف حساب الفوترة للربط بمنظمة جذرية.

Example:

"cus_a1b2c3d4e5f6g7h8"

limits
object

تحديث حدود الموارد. لإزالة حد، مرر المفتاح بقيمة null.

Example:
{ "users": 100, "locations": null }
picture
string | null

رابط URL عام بصيغة HTTPS أو URI بيانات base64 للشعار الجديد. لإزالة الشعار، قدم null.

Example:

"https://example.com/new_logo.png"

branding
object

إعدادات العلامة التجارية للمنظمة.

Response

كائن المنظمة المحدّث.

id
string

معرّف فريد للمنظمة (يتوافق مع معرّف منظمة Auth0)، يبدأ بالبادئة org_.

Example:

"org_aBcDeFg123456789"

name
string

الاسم القابل للقراءة البشرية للمنظمة.

Example:

"Engineering Department"

workspace_id
string

معرّف مساحة العمل التي تنتمي إليها هذه المنظمة.

Example:

"ws_a1b2c3d4e5f6g7h8"

external_id
string<uuid>

معرّف مستقر وفريد للمنظمة، مستقل عن معرّف Auth0 الخاص بها.

Example:

"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"

parent_org_id
string | null

معرّف المنظمة الرئيسية، إذا كانت هذه منظمة فرعية.

Example:

"org_zYxWvUt987654321"

path
string | null

سلسلة نصية مفصولة بـ # تمثل المسار الهرمي للأسلاف.

Example:

"org_root123#org_parent456"

depth
integer

عمق المنظمة في التسلسل الهرمي (0 للمستوى الأعلى).

Example:

2

billing_account_id
string | null

معرّف حساب الفوترة المرتبط بهذه المنظمة (في وضع assigned).

Example:

"cus_a1b2c3d4e5f6g7h8"

picture
string<uri> | null

رابط URL لشعار المنظمة.

Example:

"https://cdn.altostrat.io/logos/engineering.png"

usage
object
limits
object

خريطة لحدود الموارد المطبقة مباشرة على هذه المنظمة. المفاتيح هي أنواع قابلة للقياس (locations, users, sso). القيمة null أو عدم وجود مفتاح يعني عدم تعيين حد على هذا المستوى. القيمة 0 تعني أن المورد معطل بشكل صريح.

Example:
{ "locations": 10, "users": 50 }
branding
object