Go to All Forums

API Maintenance task?

Sorry I am not special deleted the topic - issue of netware. Thanks for help!

We your customer, could anybody help, I need solve task like, I need set Maintenance to few monitors at need time, how i can do this using API script? Maybe some PHP inside my LAN or other script?

For example I have RDS server monitoring and I need every saturday reboot this server, how I can tell monitoring set maintenance for this reboot time? Like maybe some powershell or php or other script using API from the same RDS server, it have monitoring agent installed.

We have tasks and this servers is rebooted every saturday and zoho monitor is alarm, I need add script for set maintenance task before execute my reboot. how I can do this? Need shortly example please? Thank you so much!

I am create API using Scope: Site24x7.Operations.All and Descriptions: All Operations API Scope and I got error about timeoute token or error... But I am using get list of my monitors once time... Why?

Thank you.

Attachments
error_api.jpg
Size: 13.13 KB
Like (2) Reply
Replies (2)

Re: API Maintenance task?

I can't understand, why this token valid 3 minutes only? I need token for every day using script for set maintenance for few monitors and how I can do this? Every day generate new token?

Attachments
valid_api.jpg
Size: 15.73 KB
Like (1) Reply

Re: Re: API Maintenance task?

Aлексей,

Have attached the sample script for maintenance. 

I can't understand, why this token valid 3 minutes only? I need token for every day using script for set maintenance for few monitors and how I can do this? Every day generate new token?

-That is grant token that you need to generate once, paste in script and run it. The refresh token will be stored in a separate file and that will be used in next run, you dont need to generate grant token again. Refer our api doc to learn more about generating tokens - https://www.site24x7.com/help/api/#authentication

As mentioned in the deleted post, please contact support@site24x7.com for your specific case.

Regards,
Karthick

Attachments
SampleAPI.ps1.zip
Size: 2.15 KB
Like (1) Reply

Was this post helpful?