Resource Formats
Zafiro RESTful API allows one to specify the format in which the resources are answered. The default format is JSON so in this case you don't need to specify a format if the default is ok. You can specify the requested format appending ".<formatName>" (a dot followed by the format name) to the end of the method, i.e.
/rest1/entity/wells.json
Currently supported formats are:
| Format | Append extension |
| JSON | json |
| HTML | html |
Date and Time formats
To send and receive Dates and TimeStamps, the Zafiro REST API will adopt the ISO8601 standard in the following formats.
About timezones: Zafiro doesn't handle timezones, hence all times are UTC based (zero offset).
| Name | Pattern | Example |
|---|---|---|
| Date | YYYY-MM-DD | 2012-08-20 |
| Timestamp | YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ssZ | 1997-07-16T19:20:30 1997-07-16T19:20:30Z |
| Time | hh:mm:ss hh:mm:ssZ | 19:20:35 19:20:35Z |
Reference:
- YYYY = four-digit year
- MM = two-digit month (01=January, etc.)
- DD = two-digit day of month (01 through 31)
- hh = two digits of hour (00 through 23) (am/pm NOT allowed)
- mm = two digits of minute (00 through 59)
- ss = two digits of second (00 through 59)
- s = one or more digits representing a decimal fraction of a second
- Z = All times are UTC based