post https://app.360learning.com/api/v2/paths//sessions
Required OAuth scope:
paths:write
.
Creates a path session for the given path.
Required fields include the session name, start date, the ID of the main instructor, and registration validation options.
On success, the API returns the full session object, including your input and system-generated fields like _id
, timestamps (createdAt
, modifiedAt
), and groupId
(owner group).
About session owner group assignment (groupId
)
You don't provide groupId
directly. The system assigns an owner group to the newly created path session automatically based on the mainInstructorId
:
- Identify eligible groups:
The system retrieves all groups where the
mainInstructorId
has at least the author role. - Group selection logic:
If eligible groups exist, they are sorted, and the first group in the sorted list is selected as the session owner group. The sorting criteria are applied in this order:
- Public groups first.
- Next, groups are sorted by their hierarchy depth in ascending order (meaning groups higher up in the organizational tree are chosen first).
- Finally, groups are sorted by the number of users they contain in descending order (larger groups come first).
- Fallback:
If the
mainInstructorId
does not have the author role in any group, the system defaults to using the path's owner group as the session owner group.