When I using the REST API to update the Refresh Schedule:
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-refresh-schedule
I need the specify settings for the schedule like below:
But when I using below json body (Get it By F12):
{'value': {'notifyOption':'NoNotification', 'enabled': true, 'isDaily':true,'times': ['07:00'],'localTimeZoneId': 'UTC','refreshNotificationEnabled':false,'refreshContacts':[{'displayName':'xx Leoxx','objectId':'06211a47-86a2-48e7-8840-1984efbfb0d5','userPrincipalName':'My E-mail.com','isSecurityGroup':false,'objectType':1,'groupType':0,'aadAppId':null,'emailAddress':'My E-mail.com','relevanceScore':null,'creatorObjectId':null}]}}
It always prompts me that the json is not correct.
According to my understanding of the contact, it seems that it needs to display the name and object ID after verification during the input process, which seems to be impossible to obtain in advance? Or the objectId is bound to my personal account and will not be regenerated due to different deployment targets.
Anyway, I would like to have a correct json body. Please give me a json body that exactly matches my screenshot settings and verifies that it works, it has been driving me crazy for a day. thank you very much.
Note: I have already checked the body from the REST API, that is the old one, what I need is that:
- Daily instead of certain days(Sunday,Tuesday,Friday).
- Need include the contact person who will send the notification when it fails.

I don't think what you ask is possible with the official PowerBI REST API. There is no option to add the notification emailaddress in the MS Docs, or an option that is 'daily' withou listing every weekday. Link: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-refresh-schedule#schedulenotifyoption
In this forum post the answer from Microsoft also notes that adding a notification emailaddress is not possible. https://community.fabric.microsoft.com/t5/Service/power-bi-create-schedule-refresh-api-not-able-to-set-email-ID/m-p/1679990
Best you can now do is the following, which will email the dataset owner:
EDIT Using the REST API that PowerBI uses from the webportal I have been able to change the refresh settings. Please note, Microsoft might change this API anytime, since it is not desgined for end-users.
First you will need to get an access token. I got mine by copying the first token request from the webportal (caught with browser development tools). When you use an Azure AD application you will easily be able to get a token. Microsoft has a lot of documentation about it. https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
One setup could be this. See for details about the app settings in AzureAD: https://stackoverflow.com/a/63989297
When you have your bearer token you can start using the API. I have caught these endpoints using my browser. My base URI references north-europe. It might be different for you. When changing the refresh settings in the webportal you will see a request 'rehreshschedule', you can use details there to fill your automation script.
First we get the dataset:
Then we create the body for the refreshschedule request. I suggest following the details you catch once from the portal. Refresh body options: refresh
Lastly we actually send the request.
As for the requirement from your management.
Using such a backend API is not safe either, since Microsoft is not at all required (and doesn't) inform users of change in backend APIs.
I hope this will help you get further on this project :).