API for exposing Events and their sessions with speakers.
EMS uses Collection+JSON and further constrains the media-type.
All collections in EMS are homogenious. This means there will only be one type of object in any given collection.
Date properties are formatted according to RFC-3339. Will always be set to Midnight. MUST be in UTC timezone.
DateTime properties are formatted according to RFC-3339. MUST be in UTC timezone.
URI properties are normalized URIs according to RFC-3986.
Never assume that the properties listed are the only ones there. As the API evolves, new properties MAY appear. Clients MUST be written to allow for this. Old clients MUST ignore unknown properties.
An event is a primary object type in EMS. An event consists of the following fields:
namerequired, string.venueoptional, string.startoptional,DateTime.endoptional,DateTime. If this appears, it MUST be a datetime afterstart.
A Session is always linked to a specific Event. A session consists of the following fields:
titlerequired, string.summaryoptional, stringbodyoptional, stringaudienceoptional, stringoutlineoptional, stringlocalerequired, two-letter iso code of language of the session. Usually 'en' or 'no'.formatrequired, enumeration from the set ("presentation", "lightning-talk", "panel" or "bof"), if not filled, the server will assign a default.levelrequired, enumeration from set set ("beginner", "beginner-intermediate", "intermediate", "intermediate-advanced", "advanced"), if not filled, the server will assign a default.stateoptional, set by the server. May be set by the use of hypertext controls found elsewhere.tagsoptional, string arraykeywordsoptional, string array
A Contact is a primary object type in EMS. A contact consists of the following fields:
namerequired, string.emailsrequired, array string. There MUST be at least 1 email.biooptional, string.localeoptional, two-letter iso code of language of the contact. Usually 'en' or 'no'.
There will also be hypertext controls for the photo of the contact.
See the wiki for the link relations used. All link relations not found in the registries defined in collection+json should be considered to have the base URI of http://purl.org/javabin/rels/ems/
You can use Trygve Laugstøl's excellent collection+json browser to explore the API.
The application is using JAAS for authentication.
The authentication is for now just Basic, meaning that the application should use HTTPS to make this more secure.
Set the system property 'java.security.auth.login.config' to the location of the config file.
If no system or security properties were set, try to read from the file, ${user.home}/.java.login.config, where ${user.home} is the value represented by the "user.home" System property.
Example file:
ems {
com.sun.security.auth.module.LdapLoginModule REQUIRED
userProvider="ldap://ldap.java.no"
authIdentity="uid={USERNAME},ou=People,dc=java,dc=no"
useSSL=false;
};
To create a new event you need to create a file called event.json with the follwoing content:
{
"template": {
"data": [
{
"name": "name",
"value": "JavaZone 20XX"
},
{
"name": "venue",
"value": "Oslo Spektrum"
}
]
}
}
Add the basic auth token and run the following curl:
curl -XPOST -H 'Content-Type: application/vnd.collection+json' -d@event.json -n https://javazone.no/ems/server/events -H 'Authorization: Basic <auth>' -v