Перейти до вмісту
NimbusNexus

Робочі простори

Робочий простір — це верхній рівень ізоляції в моделі акаунтів NimbusNexus. Кожен проєкт належить рівно одному робочому простору; доступ кожного користувача обмежено робочими просторами (і конкретними проєктами в них). Ієрархія така: робочий простір → проєкт → ресурс.

Більшості акаунтів достатньо одного робочого простору. Більші організації використовують кілька робочих просторів, щоб розділити білінг, доступ і ліміти ресурсів на рівні організаційних підрозділів — напр., один робочий простір на кожен бізнес-підрозділ або на кожну юридичну особу. Білінг ведеться окремо для кожного робочого простору, а доступ перетинає межу робочого простору, лише коли ви самі її відкриваєте: запрошуєте когось усередину або надаєте іншому проєкту спільний доступ до мережі чи DNS-зони.

Не плутайте робочий простір із DNS-зоною — у деяких контекстах це те саме слово (OpenStack називає робочі простори «доменами»). API зберігає слово OpenStack: шляхи ендпоінтів робочих просторів починаються з /api/v1/domains/, а в назвах їхніх полів теж стоїть domain (domain_id, domain_name, domain_description).

Що далі

  • Проєкти — наступний рівень нижче; те, що містять робочі простори.
  • Користувачі і Ролі — дозволи IAM надаються в межах робочого простору.
  • Міжпроєктні довіри — короткочасні делегування, які дають NimbusNexus змогу завершити за вас роботу в одному проєкті.

Reference

GET/api/v1/domains/

Find Domain

List domains visible to the caller, optionally filtered by a name search term.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
searchquerystring | null—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/domains/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/domains/

Create Domain

Create a new domain and grant the calling user the admin role on it.

Request body

FieldTypeDescription
name*stringDomain name
descriptionstring | null—
enabledboolean | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/domains/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example"
  }'
PATCH/api/v1/domains/

Update Domain

Update the name, description or enabled state of an existing domain.

Request body

FieldTypeDescription
domain_id*stringDomain ID
domain_namestring | null—
domain_descriptionstring | null—
enabledboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/domains/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_id": "<domain_id>"
  }'
DELETE/api/v1/domains/

Delete Domain

Disable (if needed) and delete a domain along with its descendants.

Request body

FieldTypeDescription
id*stringDomain ID

Responses

  • 204Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation Error
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/domains/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
POST/api/v1/domains/invite

Invite To Domain

Invite a user by email to a domain with the specified role and notify them in-app and via email.

Request body

FieldTypeDescription
domain*stringProject ID
role_id*string—
email*string—

Responses

  • 201Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/domains/invite" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "example",
    "role_id": "<role_id>",
    "email": "[email protected]"
  }'
POST/api/v1/domains/invite_action

Invite Action

Accept or decline a pending domain invitation, applying or revoking the offered role accordingly.

Request body

FieldTypeDescription
access*boolean—
notification_id*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/domains/invite_action" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "access": true,
    "notification_id": "<notification_id>"
  }'
GET/api/v1/domains/{domain_id}

Show Domain

Retrieve a single domain by ID.

Parameters

NameInTypeDescription
domain_id*pathstring—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/domains/<domain_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →