Overview#
The Organization & Project module covers full information queries across two foundational dimensions in FlightHub 2 - organization and project. Compared to the original "Organization Project" module, it is more comprehensive and includes:Members & Permissions Management: Query interfaces for project members, organization members, roles, and permissions, used for rendering member lists, loading current user role context, and rendering role/permission assignment panels.
Project Management: Project collaboration (scan-to-join), project configuration (auto-recording), and project basic information (project list under organization).
Organization Management: List of organizations the current user has joined, and details of a single organization.
This module currently focuses on query capabilities. Creation and binding of organizations / projects / roles must still be done in the FlightHub 2 console.
For how to obtain request headers such as X-Project-Uuid and X-User-Token, refer to the Authentication Tutorial under Root Directory.
Interface Usage Flow#
Organization / Project basic info loading:
Member and role info loading:
Role and permission query:
Project collaboration and configuration:
1.
Load organization / project basic info: First use Get Organization List (GET /openapi/v2.0/organizations) to obtain the current user's organization list, then use Get Organization Details (GET /openapi/v2.0/organizations/{uuid}) and Get Project List Under Organization (GET /openapi/v2.0/project) to load organization details and the project list under the organization. The project uuid can be filled into the X-Project-Uuid header of subsequent requests.
2.
Render members and roles: Use Get Current User's Organization Role (GET /openapi/v2.0/organizations/{uuid}/users/current) to retrieve the full context of the current user within the organization. Use Get Organization User List (GET /openapi/v2.0/organizations/{uuid}/users), Get Project User List (GET /openapi/v2.0/users), and Get Project Independent Member List (GET /openapi/v2.0/members) to populate member lists by organization / project / project-independent member dimensions respectively.
3.
Render the role and permission management panel: Call Get Role List (GET /openapi/v2.0/organizations/{uuid}/roles), Get Permission List (GET /openapi/v2.0/organizations/{uuid}/permissions), and Get Role Permissions (GET /openapi/v2.0/organizations/{uuid}/roles/permissions) to obtain roles, the permission tree, and permissions bound to the role.
4.
Collaboration and configuration loading: Call Get Project Quick-Join Information (GET /openapi/v2.0/projects/join-codes) for pre-validation before scanning to join a project. On the project settings page, use Get Auto Recording Config (GET /openapi/v2.0/auto-record-configs) to load the initial values of the auto-recording configuration.
Project Members and Device Binding#
Overview#
The Organization & Project module supports retrieving the FlightHub 2 project list, device list, and the project's storage upload credentials.Note: Creating organizations, creating projects, and binding devices via API is not currently supported. Please refer to the FlightHub 2 User Manual: Organization Management chapter to perform related creation and binding operations in FlightHub 2.
The project's storage upload credentials can be used for wayline file uploads. For detailed usage flow, refer to the Wayline Management Tutorial.
Interface Usage Flow#
The following uses the device lens switching feature as an example to illustrate the related interface call flow. For other more detailed features, please refer to the specific interface descriptions.
Project Device Details#
Project Device Tutorial#
Overview#
The Project Device module is used to query details of a specified device under the current project, including device model, SN, and the device's aliases within the project and organization.This module only provides the ability to query a single device's details by SN. To list all devices under the project, please use the Get Project Device List (GET /openapi/v2.0/project/device) interface in the "Organization Project" module.
Interface Usage Flow#
The typical usage is to first obtain the target SN from Get Project Device List (GET /openapi/v2.0/project/device), then call this interface to get the details.1.
Use Get Project Device List (GET /openapi/v2.0/project/device) to obtain the SN list of devices in the project.
2.
Call Get Project Device Details (GET /openapi/v2.0/project/device/{sn}), passing the sn path parameter and the X-User-Token / X-Project-Uuid request headers, to obtain the details of this device under the current project.
Project Device History Topology#
Project Team Tutorial#
Overview#
The Project Team module is used to query a project's historical device topology, helpful for reviewing the combinations of docks / remote controllers / aircraft that have been connected to the project.This interface is for historical display only; the returned nodes' online status is always false. To view a device's current online status, please use the device list interface in the "Device Management" module.
Interface Usage Flow#
1.
Use Get Project List Under Organization (GET /openapi/v2.0/project) to obtain the target project's uuid.
2.
Call Get Project Device History Topology (GET /openapi/v2.0/topologies/history), with X-User-Token and X-Project-Uuid in the request headers, to obtain the historical device topology under this project for team/device combination retrospection display.