-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
get html reports with rest api, possible?
Hey guys,
Is it possible to use the REST Api to generate the same HTML reports for backup jobs as you can do on the veeam user interface?
thank you
best regards
Is it possible to use the REST Api to generate the same HTML reports for backup jobs as you can do on the veeam user interface?
thank you
best regards
-
- Veeam Software
- Posts: 2015
- Liked: 671 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: get html reports with rest api, possible?
Hi,
If you mean triggering report generation that would be an equivalent of a button in the UI, then it's not possible now. But you can certainly gather some info on the job runs and generate html report on the client side.
The endpoints to start would be /sessions and /jobs.
Most of the stats on read and processed data are not available through VBR REST yet though.
Best regards,
Oleg
If you mean triggering report generation that would be an equivalent of a button in the UI, then it's not possible now. But you can certainly gather some info on the job runs and generate html report on the client side.
The endpoints to start would be /sessions and /jobs.
Most of the stats on read and processed data are not available through VBR REST yet though.
Best regards,
Oleg
-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
Re: get html reports with rest api, possible?
hey thank you for your response thats exactly what I needed. But I get http error 404 when executing my script do I need to configure the rest api for all functionatily or?
-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
Re: get html reports with rest api, possible?
hey thank you for your response thats exactly what I needed. But I get http error 404 when executing my script do I need to configure the rest api for all functionatily or?oleg.feoktistov wrote: ↑Jun 12, 2024 1:08 pm Hi,
If you mean triggering report generation that would be an equivalent of a button in the UI, then it's not possible now. But you can certainly gather some info on the job runs and generate html report on the client side.
The endpoints to start would be /sessions and /jobs.
Most of the stats on read and processed data are not available through VBR REST yet though.
Best regards,
Oleg
-
- Veeam Software
- Posts: 2015
- Liked: 671 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: get html reports with rest api, possible?
Depends on your script. But 404 code usually means VBR cannot find the particular endpoint you are calling. Could you please share your script here omitting any private data? I'll have a look. Thanks!
-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
Re: get html reports with rest api, possible?
hey,
I make a post request for auth token afterwards get request on this url https://enterprisemanagerhost:9398/api/v1/sessions
I make a post request for auth token afterwards get request on this url https://enterprisemanagerhost:9398/api/v1/sessions
-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
Re: get html reports with rest api, possible?
hey,oleg.feoktistov wrote: ↑Jun 14, 2024 1:34 pm Depends on your script. But 404 code usually means VBR cannot find the particular endpoint you are calling. Could you please share your script here omitting any private data? I'll have a look. Thanks!
I make a post request for auth token afterwards get request on this url https://enterprisemanagerhost:9398/api/v1/sessions
thank you so much
-
- Enthusiast
- Posts: 43
- Liked: 1 time
- Joined: May 30, 2023 12:58 pm
- Contact:
Re: get html reports with rest api, possible?
oleg.feoktistov wrote: ↑Jun 14, 2024 1:34 pm Depends on your script. But 404 code usually means VBR cannot find the particular endpoint you are calling. Could you please share your script here omitting any private data? I'll have a look. Thanks!
Code: Select all
headers = {"X-RestSvcSessionId":session}
# headers = {"x-api-version": "1.1-rev1", "Authorization": session}
logger.info("Starting data retrieval process")
try:
logger.info(f"Contacting API at {apiurl}")
# response=req.get(apiurl+'/reports/summary/job_statistics', headers=headers, verify=False)
response=req.get(apiurl+'/v1/sessions', headers=headers, verify=False)
-
- Veeam Software
- Posts: 2015
- Liked: 671 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: get html reports with rest api, possible?
Hi,
Apologies, there must have been a misunderstanding. For some reason, I automatically thought that you are using VBR REST API, my bad. I see now that you are referring to EM REST API. In that case, you could start with GET /jobs?format=Entity and GET /backupSessions?format=Entity and filter required data on client side. GET /reports/summary/job_statistics wouldn't contain all the info you could need for an HTML report.
Best regards,
Oleg
Apologies, there must have been a misunderstanding. For some reason, I automatically thought that you are using VBR REST API, my bad. I see now that you are referring to EM REST API. In that case, you could start with GET /jobs?format=Entity and GET /backupSessions?format=Entity and filter required data on client side. GET /reports/summary/job_statistics wouldn't contain all the info you could need for an HTML report.
Best regards,
Oleg
Who is online
Users browsing this forum: jie.yan and 4 guests