# Schedule Management (SCM)

Version: 1.0 | Release Date: 30/6/2018

# Get Event Type

Get schedule event type.

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/cawSchEvent/getEventType")
  .get()
  .addHeader("authorization", "Bearer OGFiZmU2ZTktMzYzMS00NjIwLWJhNGYtYWU2OGQyNTZhMmNi")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://127.0.0.1:8080/jsf/rfws/cawSchEvent/getEventType

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the M18

# Result

Type Location(error_id) Description
success Body A JSON object
{"result":[
	{"code":"abc","desc":"Debug Type"},
 	{"code":"notice","desc":"Notice Event"}
	]
}

A List of Array containing all event Types

Field Data Type Remarks
code String Event Type code
desc String Event Type description

# Get Schedule

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/cawSchEvent/getSchedule?sDatetime=2017-01-01 00:00:00&eDatetime=2017-12-31 23:59:59")
  .get()
  .addHeader("authorization", "Bearer OGFiZmU2ZTktMzYzMS00NjIwLWJhNGYtYWU2OGQyNTZhMmNi")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://127.0.0.1:8080/jsf/rfws/cawSchEvent/getSchedule?sDatetime=[start time]&eDatetime=[end time]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the M18
sDatetime string(Query) Date String in yyyy-MM-dd hh:mm:ss in UTC timezone. DateFrom of the incoming query performed.
eDatetime string(Query) Date String in yyyy-MM-dd hh:mm:ss i n UTC timezone. DateTo of the incoming query performed.
eventTypeCode string(Query) If empty, all event type will be loaded. Otherwise, only event with event type code containing the input words will be loaded
eventDesc string(Query) If not empty, only event with description containing the input words will be loaded
hexColor boolean(Query) If true, convert color to hexadecimal form. Forexample, rgb(247,11,11) -> #f70b0b. Alpha value is prepended to first two digits (a RGB format). For example, rgb(247,11,11,0.5) - > #80f70b0b
uId long(Query) If missing/ 0, the query does not apply uId filter. If uId > 0, result will only include events with attendee = uId.

# Result

Type Location(error_id) Description
success Body A json object

Output with uId = 0

{"result":[
	{"schEventTypeCode":"abc",
     "code":"SCH170674",
     "allDayEvent":false,
     "jsonData":"",
     "color":"#f70b0b",
     "attendees":[{"uId":61,"name":"jkdebug_one_role"},{"uId":69,"name":"jkdebug3"}]
     "startDateUTC":"2017-07-14 04:00:00",
     "edTimeZone":"Asia/Shanghai",
     "desc":""},
 	{"schEventTypeCode":"fde",
     "code":"SCH17dff4",
     "allDayEvent":false,
     "jsonData":"",
     "color":"#f70b0b",
     "attendees":[{"uId":61,"name":"jkdebug_one_role"},{"uId":45,"name":"AA"}]
     "startDateUTC":"2017-07-15 04:00:00",
     "edTimeZone":"Asia/Shanghai",
     "desc":""}
	]
}

Output with uId = 45

{"result":[
 	{"schEventTypeCode":"fde",
     "code":"SCH17dff4",
     "allDayEvent":false,
     "jsonData":"",
     "color":"#f70b0b",
     "attendees":[{"uId":61,"name":"jkdebug_one_role"},{"uId":45,"name":"AA"}]
     "startDateUTC":"2017-07-15 04:00:00",
     "edTimeZone":"Asia/Shanghai",
     "desc":""}
	]
}

A List of Array containing schedule

Field Data Type Remarks
schEventTypeCode String Event Type Code
code String Event Code
allDayEvent Boolean Is/ is not all Day Event
jsonData String Extra data for 3PD extension
color String Color of event
attendees JSON Array Containing JSON Object with attendees’ name and UID
startDateUTC Date string Event start date time in UTC (Exact)
sdTimeZone String Start date time timezone
endDateUTC Date String Event End Date time in UTC(Exact)
edTimeZone String End Date time timezone
desc String Event description