Job Schedulers API

Table of Contents

TimeBasedAlerts Job Scheduler

This scheduler is in charge of the configuration of the different cron jobs related to TimeBasedAlerts. 

Current Implementation

The only supported operation, right now, is to re-schedule all the alerts for a particular Organization or for all of them. The configuration of the alerts must still be performed manually in the database.

This operation is depends on the following 2 permissions: 're_schedule_alerts_from_all_organizations' and 're_schedule_alerts_from_organization'.

Parameters

Base URL: /timeBasedAlertsJobScheduler

NameTypeMandatoryDescription
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
actionENUMYes

Possible values: ['RE_SCHEDULE'].

The action to be performed.

locationENUMNoPossible values: ['ALL_ORGANIZATIONS', 'ORGANIZATION']
locationIdStringNo (if 'location' == 'ORGANIZATION', then this parameter is mandatory)The id of the location.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/timeBasedAlertsJobScheduler?userId=sigal&token=033ebc40-d6bd-472a-ac8e-fb585f88fcaa&action=re_schedule

Result
{"statusFact":{"success":true}}

Not Enough Privileges Scenario

http://localhost:8080/PresentationServices/timeBasedAlertsJobScheduler?userId=poda&token=019ebc40-d6bd-472a-ac8e-fb585f88fc9b&action=re_schedule

Result
{"statusFact":{"failMessage":"Not enough privileges!","success":false}}