LDSTechForumProjects

Church Historical Timeline API: Timeline

Church Historical Timeline Index edit

Unreleased Service Documentation

This document is in beta format, and this page is currently under construction. This page may reference services that have not yet been released to the community.

The services referenced by this document have not yet been released, so please do not attempt to use this document yet.

A Timeline is a grouping of common events.

Timeline List

URI

http://timelines.lds.org/timelines

HTTP Method

GET

RESPONSE

XML:

HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version='1.0' encoding='utf-8'?>
<timelines xmlns="http://timelines.lds.org/schema/timelines/v1.0" count="20">
    <timeline language="en_US" id="4">
        <title>LDS History</title>
        <description>LDS Historical Events</description>
    </timeline>
    <timeline language="en_US" id="3">
        <title>World History</title>
        <description>History of the World</description>
    <events/>
    ...
</timelines>

JSON:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "count": 20,
  "timelines": [
    {
      "id": 4,
      "title": "LDS History",
      "description": "LDS Historical Events",
      "language": "en_US"
    },
    {
      "id": 3,
      "title": "World History",
      "description": "History of the World",
      "language": "en_US"
    },
    ...
}

Timeline Create

Create a new Timeline.

URI

http://timelines.lds.org/timelines

HTTP Method

POST

PAYLOAD

XML:

<?xml version='1.0' encoding='utf-8'?>
<timeline xmlns="http://timelines.lds.org/schema/timelines/v1.0">
    <title>Timeline of Johannes Brahms</title>
    <description>The life of the musician.</description>
</timeline>

JSON:

{
  "title": "Timeline of Johannes Brahms",
  "description": "The life of the musician."
}

RESPONSE

XML:

HTTP/1.1 201 Created
Content-Type: application/xml
Location: http://timelines.lds.org/timelines/32234 <!-- This is the REST URI for the new Timeline. -->

<?xml version='1.0' encoding='utf-8'?>
<timeline xmlns="http://timelines.lds.org/schema/timelines/v1.0" id="32234">
    <title>Timeline of Johannes Brahms</title>
    <description>The life of the musician.</description>
</timeline>

JSON:

HTTP/1.1 201 Created
Content-Type: application/json
Location: http://timelines.lds.org/timelines/50
{
  "id": 50,
  "title": "New Timeline",
  "description": "This is a new timeline.",
  "language": "en_US"
}


Timeline Read

Returns a timeline with its events.

URI

http://timelines.lds.org/timelines/{id}

http://timelines.lds.org/timelines?id={id}&name={name}

Replace {id} and {name} with the id or name of the timeline that you want to read.

HTTP Method

GET

Errors

Error Possible Causes Implemented
404 Not Found. This request contained an invalid ID or a bad URI. Yes

RESPONSE

XML:

HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version='1.0' encoding='utf-8'?>
<timeline xmlns="http://timelines.lds.org/schema/timelines/v1.0" id="5332">
    <title>Pioneer's Journey West</title>
    <description>A timeline of the different companies that traveled west to Zion.</description>
    <events>
        <event id="33244">
            <title>Martin handcart company left Iowa City</title>
            <description>There were “576 [people], with 146 carts, 7 wagons, 30 oxen, and 50 cows and beef cattle”.</description>
            ...
        </event>
        ...
    </events>
</timeline>

JSON:

HTTP/1.1 200 OK
Content-Type: application/json
{
   "id": 1,
   "title": "LDS History",
   "description": "LDS History (Brief History of the Restoration of the Gospel)",
   "language": "en_US",
   "events":    [
            {
         "id": 1,         
         "title": "Fall of Adam",
         "description": "&lt;a href=&quot;http://scriptures.lds.org/en/gen/3&quot; title=&quot;Fall of Adam&quot; ...",
         "start": "4000 BC"
      },
      ...
   ]
}

Simile Timeline Read

The SIMILE Timeline widget is a major client for Timeline Read. It requires a specific XML and JSON structure.

URI

http://timelines.lds.org/timelines/{id}/simile

HTTP Method

GET

Errors

Error Possible Causes Implemented
404 Not Found. This request contained an invalid ID or a bad URI. Yes

RESPONSE:

See the SIMILE Timeline Docs for more information on this data format.

Timeline Search

Searches for timelines by name.

URI

http://timelines.lds.org/timelines/search

HTTP Method

GET

Parameters

Required parameters: at least a name or a description must be given.

&title=? 
Specify the name of the timeline you are searching for.
&description=? 
Specify the description you are searching for.

Errors

Error Possible Causes Implemented
400 The search request did not include enough information. No

RESPONSE:

HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version='1.0' encoding='utf-8'?>
<timelines xmlns="http://timelines.lds.org/schema/timelines/v1.0">
    <timeline id="4">
        <title>LDS History</title>
        <description>LDS Historical Events</description>
    </timeline>
    <timeline id="3">
        <title>World History</title>
        <description>History of the World</description>
    <events/>
    ...
</timelines>

Timeline Update

Updates a timeline's name and description.

URI

http://timelines.lds.org/timelines/{id}

HTTP Method

PUT

Errors

Error Possible Causes Implemented
404 Not Found. This request contained an invalid ID or a bad URI. No
500 Server Error. A generic server error or multiple server errors occurred. No

BODY:

<?xml version='1.0' encoding='utf-8'?>
<timeline xmlns="http://timelines.lds.org/schema/timelines/v1.0" id="34">
    <title>Timeline of Joseph Smith</title>
    <description>The life of the the Prophet.</description>
</timeline>

RESPONSE:

HTTP/1.1 204 No Content

Timeline Delete

Deletes the timeline.

URI

http://timelines.lds.org/timelines/{id}

HTTP Method

DELETE

Errors

Error Possible Causes Implemented
404 Not Found. This request contained an invalid ID or a bad URI. No
500 Server Error. A generic server error or multiple server errors occurred. No

RESPONSE:

HTTP/1.1 204 No Content
This page was last modified on 17 April 2010, at 05:47.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.