PATCH /api/v1/paths/sessions/{session_id}

Update a path session.

REQUEST BODY

The request accepts the following data in JSON format.

NameRequired/OptionalDescription
sessionNameRequiredName of the session.
sessionOwnerGroupRequiredID of the group owning the session.
startDateRequiredStart date of the session, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z.
instructorsMailsOptionalArray of email addresses belonging to the instructors for this session, with the main instructor as the first item of the array. If this property is provided, it cannot be null or empty.
endDateOptionalEnd date of the session, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z.
sessionAdditionalInformationOptionalAdditional information about the session: registration number, ID in another tool, etc.
It will be available in the CSV exports and through the API, but will not be displayed elsewhere.

ERROR MESSAGES

Status codeError bodyReason
400{ "error": "Request validation failed: sessionName should not be empty" }The provided session name is null or empty
400{ "error": "Request validation failed: startDate must be a valid ISO 8601 date string" }if the provided start date is not valid, or null or empty
400{ "error": "Request validation failed: endDate must be a valid ISO 8601 date string" }if the provided end date is not valid
400{ "error": "Request validation failed: endDate must be a valid ISO 8601 date string" }if the provided end date is not valid
400{ "error": "Cannot update a non root session }
400{ "error": "Session startDate cannot be updated because the session is running and has enrolled learners."}
400{ "error": "Session cannot be updated because new session start date is in the past."}
400{ "error": "Session cannot be updated because new session end date is in the past."}
400{ "error": "Session cannot be updated because new session end date precedes session start date."}
400"error": "Request validation failed: instructorsMails should not be empty"The provided instructorsMails array is null or empty or does not contain any items
400"error": "Request validation failed: each value in instructorsMails must be an email"One of the provided email addresses is not a valid email
404{ "error": "path_session_not_found" }The path session ID doesn't belong to the company
404{ "error": "groups_not_found: [{{group_id}}]" }The provided session owner group does not exist
404{ "error": "users_not_found: [{{user_id}}]" }One of the provided email addresses does not belong to the company

Servers

Path parameters

Name Type Required Description
session_id String Yes

The ID of the path session

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
company String No

(Optional) Include the company ID to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods.

apiKey String No

(Optional) Include the API key to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods.

Request body fields

Name Type Required Description
sessionName String No
endDate String No
sessionOwnerGroup String No
startDate String No
instructorsMails[] Array No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.