WebSphere Process Server, Version 6.2 Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, i5/OS, z/OS


Timetable resource: Timetable time-interval list - POST method

The POST method creates a new time interval for the current timetable.

Example

POST /bpm/businesscalendar/v1/timetables/id/events

Parameters

None

Request content

The request is the specification of the new time interval.

The default content type is application/json. Following is the schema for the application/json content type:
{
    "description" : "Timetable Time Interval Input",
    "type" : "object",
    "properties" : {
        "name" : { "type" : "string",
            "description": "Name of the timetable interval.",
            "optional" : "true" },
        "description" : { "type" : "string",
            "description": "description of the timetable interval.",
            "optional" : "true" },
        "available" : { "type" : "boolean",
            "default": "true",
            "description": "Indicates whether the time interval marks available time."},
        "startTime" : { "type": "string",
            "format": "date-time",
            "description": "Specifies starting date and time of the time interval."},
        "endTime" : { "type": "string",
            "format": "date-time",
            "optional": "true",
            "description": "Specifies end date and time of the time interval. Either endTime or duration may exist."},
        "originalTimezone" : { "type": "string",
            "description": "The time zone of the startTime, endTime, and until properties. For example, GMT-08."},
        "duration" : { "type": "string",
            "optional": "true",
            "description": "Duration of the time interval in xsd:duration like format PnDTnHnMnS. Either endTime or duration may exist."},
        "rrule" : {
            "type" : "object",
            "optional": "true",
            "description": "Recurrence rule specification.
                When not specified, the time interval repeats only once."
            "properties" : {
                "frequency" : { "type": "string",
                    "enum": ["secondly","minutely","hourly","daily","weekly","monthly","yearly"],
                    "description": "Identifies the type of recurrence rule."},
                "until" : { "type": "string",
                    "format": "date-time",
                    "description": "The date and time till this recurrence rule repeats.
                        Either until or count may exist.
                        If neither specified, the time interval repeats forever.",
                    "optional": "true" },
                "count" : { "type": "integer",
                    "minimum": "1",
                    "description": "Defines the number of recurrences.
                        Either until or count may exist.
                        If neither specified, the time interval repeats forever.",
                    "optional": "true" },
                "interval" : { "type" : "integer",
                    "default": "1",
                    "minimum": "1",
                    "description": "Specifies how often the time interval repeats."},
                "byday" : { "type" : "string",
                    "description": "Specifies a comma character separated list of days of the week;
                        MO indicates Monday; TU indicates Tuesday; WE indicates Wednesday;
                        TH indicates Thursday; FR indicates Friday; SA indicates Saturday; SU indicates Sunday.
                        Optionally, can include a positive(+n) or negative_-n) number to indicate nth occurence
                        of the specified day in montly or yearly recurrence rule.",
                    "optional": "true"},
                "bymonthday" : { "type" : "string",
                    "description": "Specifies a comma character separated list of days of the month. Valid values are 1 to 31.",
                    "optional": "true"},
                "bymonth" : { "type" : "string",
                    "description": "Specifies a comma character separated list of months of the year. Valid values are 1 to 12.",
                    "optional": "true"}
            }
        }
    }
}

Response content

The response is the new time interval.

The default content type is application/json. Following is the schema for the application/json content type:
{
    "description" : "Timetable Time Interval Definition",
    "type" : "object",
   	"properties" : {
        "id" : { "type" : "string",
            "description": "Instance ID of the timetable interval.",
            "readonly" : "true" },
        "uri" : { "type": "string",
            "description": "Relative URI of the timetable interval.",
            "readonly" : "true" },
        "name" : { "type" : "string",
            "description": "Name of the timetable interval."},
        "description" : { "type" : "string",
            "description": "description of the timetable interval."},
        "available" : { "type" : "boolean",
            "default": "true",
            "description": "Indicates whether the time interval marks available time."},
        "startTime" : { "type": "string",
            "format": "date-time",
            "description": "Specifies starting date and time of the time interval."},
        "endTime" : { "type": "string",
            "format": "date-time",
            "optional": "true",
            "description": "Specifies end date and time of the time interval. Either endTime or duration may exist."},
        "originalTimezone" : { "type": "string",
            "description": "The time zone of the startTime, endTime, and until properties. For example, GMT-08."},
        "duration" : { "type": "string",
            "optional": "true",
            "description": "Duration of the time interval in xsd:duration like format PnDTnHnMnS. Either endTime or duration may exist."},
        "rrule" : {
            "type" : "object",
            "optional": "true",
            "description": "Recurrence rule specification.
                When not specified, the time interval repeats only once.",
            "properties" : {
                "frequency" : { "type": "string",
                    "description": "Identifies the type of recurrence rule."},
                "until" : { "type": "string",
                    "description": "The date and time till this recurrence rule repeats.",
                    "optional": "true" },
                "count" : { "type": "integer",
                    "description": "Defines the number of recurrences.",
                    "optional": "true" },
                "interval" : { "type" : "integer",
                    "description": "Specifies how often the time interval repeats."},
                "byday" : { "type" : "string",
                    "description": "Specifies a comma character separated list of days of the week.",
                    "optional": "true"},
                "bymonthday" : { "type" : "string",
                    "description": "Specifies a comma character separated list of days of the month.",
                    "optional": "true"},
                "bymonth" : { "type" : "string",
                    "description": "Specifies a comma character separated list of months of the year.",
                    "optional": "true"}
            }
        }
    }
}

Error response content

The error response is the detailed error information.

The default content type is application/json. Following is the schema for the application/json content type:
{
    "description" : "Timetable Error",
    "type" : "object",
    "properties" : {
        "errorNumber" : { "type" : "string",
            "description": "Message ID of the exception.",
            "readonly" : "true" },
        "errorMessage" : { "type" : "string",
            "description": "Message text of the exception.",
            "readonly" : "true" },
        "programmerDetails" : { "type" : "string",
            "description": "Additional exception details.",
            "readonly" : "true",
            "optional" : "true" }
    }
}

Status codes

The POST method returns one of the following status codes:
CodeDescription
200 OK
Successful completion. The newly created time interval is returned.
401 Unauthorized
The caller is not authorized for this request.
500 Internal Server Error
A severe problem has occurred. The programmer details are provided.

Available since

Version 6.2.0

Parent topic: Timetable resource: Timetable time-interval list