/
Structured Date Service RESTful APIs

Structured Date Service RESTful APIs

Brief Description

A CollectionSpace structured date represents a single date or date range that may have some uncertainty.

REST-based API

The Structured Date Service offers a REST-based Application Programming Interface (API) to parse a date string into a structured date.

Parse a display date

Attempts to interpret a given display date (string), and returns suggested structured date parts.

GET /cspace-services/structureddates?displayDate={datestring}

For example:

GET /cspace-services/structureddates?displayDate=june%201998

Returns:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:structureddate_common xmlns:ns2="http://collectionspace.org/services/structureddate"> <dateDisplayDate>june 1998</dateDisplayDate> <dateEarliestSingleYear>1998</dateEarliestSingleYear> <dateEarliestSingleMonth>6</dateEarliestSingleMonth> <dateEarliestSingleDay>1</dateEarliestSingleDay> <dateEarliestSingleEra>urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'</dateEarliestSingleEra> <dateLatestYear>1998</dateLatestYear> <dateLatestMonth>6</dateLatestMonth> <dateLatestDay>30</dateLatestDay> <dateLatestEra>urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'</dateLatestEra> <dateEarliestScalarValue>1998-06-01</dateEarliestScalarValue> <dateLatestScalarValue>1998-07-01</dateLatestScalarValue> <scalarValuesComputed>true</scalarValuesComputed> </ns2:structureddate_common>

If the supplied date string can not be parsed, the HTTP response will have status code 400, and the body will contain an error message.

Related content

Structured Date Service RESTful APIs
Structured Date Service RESTful APIs
More like this
Structured Date Service RESTful APIs
Structured Date Service RESTful APIs
More like this
CollectionSpace Data Type Definitions
CollectionSpace Data Type Definitions
More like this
User Manual - Special Fields and Interfaces
User Manual - Special Fields and Interfaces
More like this
User Manual - Special Fields and Interfaces
User Manual - Special Fields and Interfaces
More like this
Date and Time Requirements
Date and Time Requirements
More like this