Veeam Backup for Microsoft Office 365 RESTful API: Workflow examples
Over the past few weeks, I’ve explained
Workflow 1: Create and start a job
The above image explains the steps we need to perform to create and start the job.
- Get authentication token via “POST /<VERSION>/token“
- Get the specific organization ID via “GET /<VERSION>/Organizations“
- Get the specific backup repository ID via “GET /<VERSION>/BackupRepositories“
- Create the job via “POST /<VERSION>/Organizations/<ORGANIZATIONID>/Jobs” (this requires a JSON with the correct information and the organization ID).
- Modify the schedule via “PUT /<VERSION>/Jobs/<JOBID>“
- Start the job via “POST /<VERSION>/Jobs/<JOBID>” (this requires the following JSON: { “start”: null })
As you can see, there are 6 requests which are performed to create and start the job however step 5 is optional.
Workflow: Mail restore example
If you want to restore an e-mail from scratch the flow requires 6 steps as well based upon your needs.
- Get authentication token via “POST /<VERSION>/token“
- Get the specific organization ID via “GET /<VERSION>/Organizations”
- Start the restore session via “POST /<VERSION>/Organizations/<ORGANIZATIONID>/Action” (this requires a JSON with the correct information and the organization ID)
- Get the mailbox ID via “GET /<VERSION>/RestoreSession/<RESTORESESSIONID>/Organization/Mailboxes“
- Explore the backup for a folder or item via “GET /<VERSION>/RestoreSession/<RESTORESESSIONID>/Organization/Mailboxes/<MAILBOXID>/Folders” or “GET /<VERSION>/RestoreSession/<RESTORESESSIONID>/Organization/Mailboxes/<MAILBOXID>/Items“
- Perform the restore via one of the following options:
- Item restore: “POST /<VERSION>/RestoreSessions/<RESTORESESSIONIDID>/Organization/Mailboxes/<MAILBOXID>/Items/Action” (this requires a JSON with the correct information and the restore session ID as well as the mailbox ID)
- Folder restore: “POST /<VERSION>/RestoreSessions/<RESTORESESSIONIDID>/Organization/Mailboxes/<MAILBOXID>/Folders/Action” (this requires a JSON with the correct information and the restore session ID as well as the mailbox ID)
As you can see from the above workflows, in general it takes just a few steps to perform the final result. In both examples, we did a fresh authentication however this can be cached via your client and skipped to lower the amount of steps needed.
What’s next?
In the final part, we will go over additional settings for the Veeam Explorers and the Veeam Backup for Microsoft Office 365 console.
Missed a part?
- Part 1: Veeam Backup for Microsoft Office 365 RESTful API: Getting Started
- Part 2: Veeam Backup for Microsoft Office 365 RESTful API: Creating your infrastructure
- Part 3: Veeam Backup for Microsoft Office 365 RESTful API: Job management
- Part 4: Veeam Backup for Microsoft Office 365 RESTful API: Exchange restores
- Part 5: Veeam Backup for Microsoft Office 365 RESTful API: OneDrive restores
- Part 6: Veeam Backup for Microsoft Office 365 RESTful API: SharePoint restores