Publishing Server Extended Manual
Contents |
Introduction
This extended manual documents the "hidden" features of the Publishing Server version 3.0. The goal of this document is to give developers a more insight information when interfacing with the Publishing Server. For example if you want to deliver information to the NUB this manual becomes valuable.
Event XML schema & sample
When performing a insert or update (POST) of the system, please make sure that the event data validates against the XML schema. A sample of a XML schema and sample can be | downloaded here.
URI mappings Publishing Server
The base URL http://publisher.uitburo.nl knows several URI mappings. The table below shows the actual URI mappings of the system.
| /agenda/search.do | GET | Entry points for searching events. |
| /agenda/suggest.do | GET | Entry points for searching events. |
| /agenda/mostViewed | GET | Entry point for viewing "most viewed" events for account/region |
| /agenda/lastViewed | GET | Entry point for viewing "last viewed" events for account/region |
| /event/{id} | GET | Use this URI for receiving a single event. |
| /event/add | POST | Use this URI for adding an event in the system |
| /event/addAll | POST | Use this URI for adding a set of events in the system |
| /event/{id}/update | POST | Use this URI for updating events in the system |
| /event/{id} | DELETE | Use this URI for deleting (soft) events from the system |
| /admin/events/incomplete | GET | Entry point for finding incomplete events in the Publishing Server (need an admin API key) |
| /admin/reindex | GET | Entry point for reindex the Publishing Server (need an admin API key) |
Advanced topics
Required fields
The publishing server checks if events are complete when performing an insert (POST) or update (PUT). The following field are mandatory:
- datetime_start
- datetime_end
- production_cidn
- title
- genres/head_genres
- location/cidn
- location/name
- location/postal_code
The request will return a status-code 200 and the event resource will have the meta-status incomplete.
<event id="{id}" meta-status="incomplete" .... >
Duplicate checking
When a new event is added to the Publishing Server (via POST) the system performs the following it check on the following fields for duplicates:
- For all active events
- Production CIDN
- Location CIDN
- Uitgave
- StartDateTime within 15 minutes
When the conditions above are met, then system reports the event with meta-status duplicate.
<event id="{id}" meta-status="duplicate" .... >
Inserting or updating in general
When inserting of updating event data into the Publishing Server, the POST request has to meet the following requirements:
- The content type of the HTTP body is application/xml
- You will need an admin API key with READWRITE rights
- Make sure the xml validates against the event XML schema (can be found on this page)
Insert a single event
It is possible to insert a single event. Perform a HTTP POST on the the following URI:
POST /event/add HTTP/1.1
With the xml of an event in the HTTP body. When the insert is successful, the Publishing Server provides an generated ID. With this ID you can perform a HTTP GET request, as shown below:
GET /event/{id} HTTP/1.1
In the root element <event> the meta-status attribute provides information on the status of the event. When inserting a single event, make sure the root element <event> does NOT contain a ID attribute.
Insert a serie of events
>>> todo <<<
Update an event
It is possible to update a single event. Perform a HTTP POST on the the following URI:
POST /event/{id}/update HTTP/1.1
With the xml of an event in the HTTP body. When the insert is successful, the Publishing Server provides an generated ID. With this ID you can perform a HTTP GET request, as shown below:
GET /event/{id} HTTP/1.1
In the root element <event> the meta-status attribute provides information on the status of the event.'
Delete an event
It is possible to delete events. The PS3 knows the concept of soft deletes. In fact this means that nothing will be deleted from the system, but the event gets the meta-status=deleted. So if the following HTTP request is invoked:
DELETE /event/{id}?key={key} HTTP/1.1
The request will return a status-code 200 and the event resource will have the meta-status deleted.
<event id="{id}" meta-status="deleted" .... >