GET /api-v1/organization/tree/{id}

Headers

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID integer

    ID of organization, for which the operation must be performed

Path parameters

  • id integer Required

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id integer
    • organizationId integer
    • parentOrganizationId integer(int32)
    • name string
    • isActive boolean
    • roles array[object]
      Hide roles attributes Show roles attributes object
      • id integer
      • type string

        Values are ROLE or SUPER_ROLE.

      • name string
      • isDefault boolean
    • globalRoles array[object]
      Hide globalRoles attributes Show globalRoles attributes object
      • id integer
      • type string

        Values are ROLE or SUPER_ROLE.

      • name string
      • isDefault boolean
    • availableRoles array[object]
      Hide availableRoles attributes Show availableRoles attributes object
      • type string

        Values are ROLE or SUPER_ROLE.

      • name string
      • isDefault boolean
      • description string
      • id integer
      • realId integer
      • roleType string

        Values are ORGANIZATION or GLOBAL.

    • subUserContactId integer
    • availableEmployees array[object]
      Hide availableEmployees attributes Show availableEmployees attributes object
      • id integer
      • name string
      • email string
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

GET /api-v1/organization/tree/{id}
curl \
 --request GET 'https://wyzio.app/api-v1/organization/tree/{id}' \
 --header "WEAL-TOKEN: string" \
 --header "TARGET-ORGANIZATION-ID: 42"
Response examples (200)
[
  {
    "id": 42,
    "organizationId": 42,
    "parentOrganizationId": 42,
    "name": "string",
    "isActive": true,
    "roles": [
      {
        "id": 42,
        "type": "ROLE",
        "name": "string",
        "isDefault": true
      }
    ],
    "globalRoles": [
      {
        "id": 42,
        "type": "ROLE",
        "name": "string",
        "isDefault": true
      }
    ],
    "availableRoles": [
      {
        "type": "ROLE",
        "name": "string",
        "isDefault": true,
        "description": "string",
        "id": 42,
        "realId": 42,
        "roleType": "ORGANIZATION"
      }
    ],
    "subUserContactId": 42,
    "availableEmployees": [
      {
        "id": 42,
        "name": "string",
        "email": "string"
      }
    ]
  }
]