CSV, XML and JSON Export Options

Click Here to Go to the Intro PageAs of Root Server Version 1.8, the export options for the BMLT have increased. In addition to the original CSV (Comma-Separated Values) format, you can now extract XML and JSON data.

This gives the BMLT the ability to participate in what is called the Semantic Web, but we’re really only interested in making better satellites.

Where to Get the Data

The Stable Root URIYou get the data by making a call to certain directories within the root server. The main URI is the one shown in the main screen of the root server. In our examples, we’ll use the one for the stable BMLT Test Server, which is http://bmlt.magshare.net/stable/main_server/.

From this base, the export options are in the client_interface directory, like so: http://bmlt.magshare.net/stable/main_server/client_interface/

The three direct access subdirectories are:

Note that each gives the same error message: "You must supply one of the following: 'switcher=GetSearchResults', 'switcher=GetFormats' or 'switcher=GetChanges'." (The XML one might be presented as an error, depending on which browser you use). This simply means that you need to specify some extra parameters to get the results you want.

The Calling Parameters

Most of the parameters are exactly the same as the ones you use to specify the “simple” search. The process is very similar. The "block_mode" parameter is ignored, but everything else counts. You specify a search, and the results will be determined according to how you make the call.

Additional Parameter

There is an additional parameter that can be used for these calls:

data_field_key
SYNTAX: data_field_key=<The Key of A Data Item>[,<The Key of A Data Item>] You can add multiple keys, to get multiple results.
This allows you to ask that only certain fields be returned. For example, you can ask that all the towns for the search results be returned, when searching for all meetings that begin between 4PM, and 7PM:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/index.php?
switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19&
data_field_key=location_municipality
Depending upon the browser you use, the results can be a bit strange. Look at the source code. It is pure XML, and it may not be rendered that well on your browser.
You can ask that all the towns and the meeting names, for the search results be returned, when searching for all meetings that begin between 4PM, and 7PM:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/index.php?
switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19&
data_field_key=location_municipality,meeting_name

The above examples are for an XML response, but they also count for CSV and JSON, as shown here:

CSV:
http://bmlt.magshare.net/stable/main_server/client_interface/csv/index.php?
switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19&
data_field_key=location_municipality
And JSON:
http://bmlt.magshare.net/stable/main_server/client_interface/json/index.php?
switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19&
data_field_key=location_municipality,meeting_name

Additional Switcher

As of root server version 1.8.31, is now possible to get changes sent from the server. This capability is available in CSV, XML and JSON.

In order to get changes, you use the “switcher=GetChanges” value. This code allows you to specify three different parameters:

start_date
SYNTAX: start_date=<YYYY-MM-DD> (The ‘Y-m-d’ PHP date() function format. Example: ’2011-06-11′ is June 11th, 2011)
If this is specified, then the changes returned will be from this date (starting at 12 AM), forward.
end_date
SYNTAX: end_date=<YYYY-MM-DD>
If this is specified, then the changes returned will be until this date (ending at 12 AM of the next day). You can specify both of these, to provide a "window of time."
meeting_id
SYNTAX: meeting_id=<Meeting ID> (This must be the integer id_bigint of the BMLT root server, for a specific meeting.
If specified, then the changes affecting one meeting will be returned. Remember that the BMLT root server "prunes" meeting changes, so you may not be able to get more than the maximum number of changes (the default is five changes). Only one meeting ID can be supplied.
service_body_id
SYNTAX: service_body_id=<Service Body ID> (This must be the integer id_bigint of the BMLT root server, for a specific Service body. -As of root server version 1.8.32)
If specified, then the changes affecting all the meetings associated with a Service body will be returned. Remember that the BMLT root server "prunes" meeting changes, so you may not be able to get more than the maximum number of changes per meeting (the default is five changes). Only one Service body ID can be supplied. Additionally, if the Service body "contains" other Service bodies (like an RSC "contains" ASCs), then the "child" Service bodies will be included in the response (as of root server version 1.8.33).

Examples:

Get all changes after July 4th, 2009 (CSV):

http://bmlt.magshare.net/stable/main_server/client_interface/csv/?switcher=GetChanges&start_date=2009-07-04

Get all changes in the 1-year period between July 4th, 2009, and July 3rd, 2010 (XML):

http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetChanges&start_date=2009-07-04&end_date=2010-07-03

Get all changes for the Kings Bay Area Service, in the 1-year period between July 4th, 2009, and July 3rd, 2010 (JSON):

http://bmlt.magshare.net/stable/main_server/client_interface/json/?switcher=GetChanges&start_date=2009-07-04&end_date=2010-07-03&service_body_id=1007

Get all changes for the meeting "People in Focus" (XML):

http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetChanges&meeting_id=273

Additional Response (XML Only)

The XML response now has the capability to return Service body information. This is accessed via the "GetServiceBodies.php" file. It is NOT a "switcher" value.

http://bmlt.magshare.net/stable/main_server/client_interface/xml/GetServiceBodies.php

This will return an XML response that is described in this schema:

http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetServiceBodies.php

Dynamic Schemas

For the XML export, the XML namespace and the XML schema are linked to your server. This is because they are actually dependent upon the setup for your server. For example, if you have added your own data items, then the choices for the data_field_key parameter will be different from the default. If we used a static XML schema, then your XML would fail validation.

However, the schema document is generated dynamically, and should ensure that your XML is always valid. The schema also serves a second purpose, in giving you a simple list of the possible values for the data_field_key parameter.

This link will access the schema for the default stable server. In many browsers, the screen will show as blank. However, look at the source. It is a pure XML Schema response, and will not display on most browsers. Some browsers will display well-formed XML, so you may actually see the schema without needing to view source.

The schema for your XML dump is available in the <meetings/> element:

<meetings xmlns="http://bmlt.magshare.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://bmlt.magshare.net
http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetSearchResults.php">

The BMLT XML Schema is a very, very simple schema. There's not much to the XML structure, which makes it eminently usable.

We do not currently provide a JSON schema, but are considering developing one. JSON schemas are not widely used. You can use the XML schema to determine the fields for JSON. They are exactly equivalent to each other.

The CSV data is a very basic CSV format, with the first row being the column names (header row)

Schema Elements

In CSV, the header will contain the keys for the data response. All keys will be used, including empty ones. In XML and JSON, empty keys will be removed.

In XML, each row will be bounded by a <row> element. The "id" attribute of the element will be an integer, and will be the index of the row (not the meeting ID). The "id_bigint" element can also be provided.

In XML, the "root" element is called "meetings". This element establishes the namespace and schema of the response data, which is well-formed and valid XML.

The response is given meeting-by-meeting, so there is no effort to consolidate repetitive data (for example, if the search centers on New York City, every localion_municipality will be "New York." If we wanted to optimize, we could simply send back one value. However, we send back the same value for all meetings. This allows users of the response data to design simple, effecive data handlers).

Examples

Now, we'll go over a few basic examples. We'll only display portions of the responses here, but you will be able to view the full responses by following the links.

CSV Examples

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/csv/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19
Response:
"id_bigint","worldid_mixed","shared_group_id_bigint","service_body_bigint","weekday_tinyint","start_time","duration_time","formats","lang_enum","longitude","latitude","email_contact","meeting_name","location_text","location_info","location_street","location_city_subsection","location_neighborhood","location_municipality","location_sub_province","location_province","location_postal_code_1","location_nation","comments","train_lines","bus_lines","contact_phone_2","contact_email_2","contact_name_2","contact_phone_1","contact_email_1","contact_name_1","format_B","format_BL","format_BT","format_C","format_CH","format_CL","format_CS","format_D","format_ES","format_GL","format_IL","format_IP","format_IW","format_JT","format_M","format_NC","format_O","format_Pi","format_RF","format_Rr","format_SC","format_SD","format_SG","format_SL","format_Sm","format_So","format_St","format_Ti","format_To","format_Tr","format_TW","format_W","format_WC","format_YP","format_OE","format_BK","format_NS","format_Ag","format_FD","format_AB"
"24","00014731","","1005","1","16:15:00","01:30:00","O,RF","en","-73.905834","40.838762","","Meditation on Sundays","Our Lady of Victory Church","@171st St","1512 Webster Ave","Bronx","Claremont","New York","Bronx","NY","10457","USA","","","","","","","","","","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"
"346","00113665","","1010","1","16:30:00","01:30:00","C,JT,WC,BK","en","-73.976946","40.724846","","Just for Today","Housing Works, Ground Floor","Btwn Aves C&D","743 E 9th St","Manhattan","East Village","New York","New York","NY","10009","USA","","","","","","","","","","0","0","0","1","0","0","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","0","0","1","0","0","0","0"
"803","00010448","","1001","1","17:00:00","02:00:00","O,D,St","en","-73.4077826142311","40.7096557895169","","Surrender On Sunday","Community Center (On East Street)","","East St. at Cedar St.","","","Amityville","Suffolk","NY","11701","USA","","","","","","","","","","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0"
"114","00000000","","1015","1","17:00:00","01:30:00","O,ES,St","es","-73.881634","40.880458","","Un Nuevo Empezar","North Central Bronx Hosp, Rm 14B07","Btwn E 210th St & Dekalb Ave","3424 Kossuth Ave","Bronx","Williamsbridge","New York","Bronx","NY","10467","USA","","Tren 4 hasta Mosholu Pkwy","Bus Bx 10 hasta Mosholu Pkwy","","","","","","","0","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","0","1","0","0","0","0","0","0","0","0","0","0","0","0","0"

Note that all of the fields are returned, and that empty fields are given ("'"). This is required for valid CSV data. Also, each column is bounded by double-quotes ("). If the data contains a double-quote, that quote is escaped (\"). The first row is always a header, and contains the data item keys.

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/csv/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name
Response:
"meeting_name","location_municipality"
"Meditation on Sundays","New York"
"Just for Today","New York"
"Surrender On Sunday","Amityville"
"Un Nuevo Empezar","New York"

Note that no meeting ID is returned. If you need that, you should also specify the "id_bigint" column:

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the meeting ID, town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/csv/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name,id_bigint
Response:
id_bigint","meeting_name","location_municipality"
"24","Meditation on Sundays","New York"
"346","Just for Today","New York"
"803","Surrender On Sunday","Amityville"
"114","Un Nuevo Empezar","New York"

Note also that the order in which the columns are returned is up to the server. The order in which they are specified in the URI is irrelevant.

XML Examples

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19
Response:
<?xml version="1.0" encoding="UTF-8"?>
<meetings xmlns="http://bmlt.magshare.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://bmlt.magshare.net http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetSearchResults.php">
	<row id="0">
		<id_bigint>24</id_bigint>
		<worldid_mixed>00014731</worldid_mixed>
		<service_body_bigint>1005</service_body_bigint>
		<weekday_tinyint>1</weekday_tinyint>
		<start_time>16:15:00</start_time>
		<duration_time>01:30:00</duration_time>
		<formats>O,RF</formats>
		<lang_enum>en</lang_enum>
		<longitude>-73.905834</longitude>
		<latitude>40.838762</latitude>
		<meeting_name>Meditation on Sundays</meeting_name>
		<location_text>Our Lady of Victory Church</location_text>
		<location_info>@171st St</location_info>
		<location_street>1512 Webster Ave</location_street>
		<location_city_subsection>Bronx</location_city_subsection>
		<location_neighborhood>Claremont</location_neighborhood>
		<location_municipality>New York</location_municipality>
		<location_sub_province>Bronx</location_sub_province>
		<location_province>NY</location_province>
		<location_postal_code_1>10457</location_postal_code_1>
		<location_nation>USA</location_nation>
	</row>
	<row id="1">
		<id_bigint>346</id_bigint>
		<worldid_mixed>00113665</worldid_mixed>
		<service_body_bigint>1010</service_body_bigint>
		<weekday_tinyint>1</weekday_tinyint>
		<start_time>16:30:00</start_time>
		<duration_time>01:30:00</duration_time>
		<formats>C,JT,WC,BK</formats>
		<lang_enum>en</lang_enum>
		<longitude>-73.976946</longitude>
		<latitude>40.724846</latitude>
		<meeting_name>Just for Today</meeting_name>
		<location_text>Housing Works, Ground Floor</location_text>
		<location_info>Btwn Aves C&D</location_info>
		<location_street>743 E 9th St</location_street>
		<location_city_subsection>Manhattan</location_city_subsection>
		<location_neighborhood>East Village</location_neighborhood>
		<location_municipality>New York</location_municipality>
		<location_sub_province>New York</location_sub_province>
		<location_province>NY</location_province>
		<location_postal_code_1>10009</location_postal_code_1>
		<location_nation>USA</location_nation>
	</row>
	<row id="2">
		<id_bigint>803</id_bigint>
		<worldid_mixed>00010448</worldid_mixed>
		<service_body_bigint>1001</service_body_bigint>
		<weekday_tinyint>1</weekday_tinyint>
		<start_time>17:00:00</start_time>
		<duration_time>02:00:00</duration_time>
		<formats>O,D,St</formats>
		<lang_enum>en</lang_enum>
		<longitude>-73.4077826142311</longitude>
		<latitude>40.7096557895169</latitude>
		<meeting_name>Surrender On Sunday</meeting_name>
		<location_text>Community Center (On East Street)</location_text>
		<location_street>East St. at Cedar St.</location_street>
		<location_municipality>Amityville</location_municipality>
		<location_sub_province>Suffolk</location_sub_province>
		<location_province>NY</location_province>
		<location_postal_code_1>11701</location_postal_code_1>
		<location_nation>USA</location_nation>
		<comments>Last Sunday of every month is a Step meeting.</comments>
	</row>
	<row id="3">
		<id_bigint>114</id_bigint>
		<worldid_mixed>00000000</worldid_mixed>
		<service_body_bigint>1015</service_body_bigint>
		<weekday_tinyint>1</weekday_tinyint>
		<start_time>17:00:00</start_time>
		<duration_time>01:30:00</duration_time>
		<formats>O,ES,St</formats>
		<lang_enum>es</lang_enum>
		<longitude>-73.881634</longitude>
		<latitude>40.880458</latitude>
		<meeting_name>Un Nuevo Empezar</meeting_name>
		<location_text>North Central Bronx Hosp, Rm 14B07</location_text>
		<location_info>Btwn E 210th St & Dekalb Ave</location_info>
		<location_street>3424 Kossuth Ave</location_street>
		<location_city_subsection>Bronx</location_city_subsection>
		<location_neighborhood>Williamsbridge</location_neighborhood>
		<location_municipality>New York</location_municipality>
		<location_sub_province>Bronx</location_sub_province>
		<location_province>NY</location_province>
		<location_postal_code_1>10467</location_postal_code_1>
		<location_nation>USA</location_nation>
		<train_lines>Tren 4 hasta Mosholu Pkwy</train_lines>
		<bus_lines>Bus Bx 10 hasta Mosholu Pkwy</bus_lines>
	</row>

Note that the actual response data is returned as optimized XML, which means that everything is crammed into one line. This has been formatted for your reading pleasure. Also note that not all rows have all elements. If data is not supplied for an element, the element is not provided at all, as opposed to an empty element.

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name
Response:
<?xml version="1.0" encoding="UTF-8"?>
<meetings xmlns="http://bmlt.magshare.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://bmlt.magshare.net http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetSearchResults.php">
	<row id="0">
		<meeting_name>Meditation on Sundays</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>
	<row id="1">
		<meeting_name>Just for Today</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>
	<row id="2">
		<meeting_name>Surrender On Sunday</meeting_name>
		<location_municipality>Amityville</location_municipality>
	</row>
	<row id="3">
		<meeting_name>Un Nuevo Empezar</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>
Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the meeting ID, town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name,id_bigint
Response:
<?xml version="1.0" encoding="UTF-8"?>
<meetings xmlns="http://bmlt.magshare.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://bmlt.magshare.net http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetSearchResults.php">
	<row id="0">
		<id_bigint>24</id_bigint>
		<meeting_name>Meditation on Sundays</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>
	<row id="1">
		<id_bigint>346</id_bigint>
		<meeting_name>Just for Today</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>
	<row id="2">
		<id_bigint>803</id_bigint>
		<meeting_name>Surrender On Sunday</meeting_name>
		<location_municipality>Amityville</location_municipality>
	</row>
	<row id="3">
		<id_bigint>114</id_bigint>
		<meeting_name>Un Nuevo Empezar</meeting_name>
		<location_municipality>New York</location_municipality>
	</row>

JSON Examples

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/json/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19
Response:
[
	{"id_bigint":"24","worldid_mixed":"00014731","shared_group_id_bigint":"","service_body_bigint":"1005","weekday_tinyint":"1","start_time":"16:15:00","duration_time":"01:30:00","formats":"O,RF","lang_enum":"en","longitude":"-73.905834","latitude":"40.838762","email_contact":"","meeting_name":"Meditation on Sundays","location_text":"Our Lady of Victory Church","location_info":"@171st St","location_street":"1512 Webster Ave","location_city_subsection":"Bronx","location_neighborhood":"Claremont","location_municipality":"New York","location_sub_province":"Bronx","location_province":"NY","location_postal_code_1":"10457","location_nation":"USA"}
	{"id_bigint":"346","worldid_mixed":"00113665","shared_group_id_bigint":"","service_body_bigint":"1010","weekday_tinyint":"1","start_time":"16:30:00","duration_time":"01:30:00","formats":"C,JT,WC,BK","lang_enum":"en","longitude":"-73.976946","latitude":"40.724846","email_contact":"","meeting_name":"Just for Today","location_text":"Housing Works, Ground Floor","location_info":"Btwn Aves C&D","location_street":"743 E 9th St","location_city_subsection":"Manhattan","location_neighborhood":"East Village","location_municipality":"New York","location_sub_province":"New York","location_province":"NY","location_postal_code_1":"10009","location_nation":"USA"}
	{"id_bigint":"803","worldid_mixed":"00010448","shared_group_id_bigint":"","service_body_bigint":"1001","weekday_tinyint":"1","start_time":"17:00:00","duration_time":"02:00:00","formats":"O,D,St","lang_enum":"en","longitude":"-73.4077826142311","latitude":"40.7096557895169","email_contact":"","meeting_name":"Surrender On Sunday","location_text":"Community Center (On East Street)","location_info":"","location_street":"East St. at Cedar St.","location_city_subsection":"","location_neighborhood":"","location_municipality":"Amityville","location_sub_province":"Suffolk","location_province":"NY","location_postal_code_1":"11701","location_nation":"USA","comments":"Last Sunday of every month is a Step meeting."}
	{"id_bigint":"114","worldid_mixed":"00000000","shared_group_id_bigint":"","service_body_bigint":"1015","weekday_tinyint":"1","start_time":"17:00:00","duration_time":"01:30:00","formats":"O,ES,St","lang_enum":"es","longitude":"-73.881634","latitude":"40.880458","email_contact":"","meeting_name":"Un Nuevo Empezar","location_text":"North Central Bronx Hosp, Rm 14B07","location_info":"Btwn E 210th St & Dekalb Ave","location_street":"3424 Kossuth Ave","location_city_subsection":"Bronx","location_neighborhood":"Williamsbridge","location_municipality":"New York","location_sub_province":"Bronx","location_province":"NY","location_postal_code_1":"10467","location_nation":"USA","comments":"","train_lines":"Tren 4 hasta Mosholu Pkwy","bus_lines":"Bus Bx 10 hasta Mosholu Pkwy"}

Note that the actual response data is returned as optimized JSON, which means that everything is crammed into one line. This has been formatted for your reading pleasure. The JSON response is an array, with each element being a JSON object representing one meeting, and with named data members. Also note that not all rows have all data members. If data is not supplied for a data member, the data member is not provided at all, as opposed to an empty data member.

Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/json/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name
Response:
[
	{"meeting_name":"Meditation on Sundays","location_municipality":"New York"},
	{"meeting_name":"Just for Today","location_municipality":"New York"},
	{"meeting_name":"Surrender On Sunday","location_municipality":"Amityville"},
	{"meeting_name":"Un Nuevo Empezar","location_municipality":"New York"}
Get All Meetings In the Database That Start At or After 4PM, and Before or At 7PM on Any Weekday, and only return the meeting ID, town and meeting name.
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/json/?switcher=GetSearchResults&sort_key=time&StartsAfterH=16&StartsBeforeH=19 &data_field_key=location_municipality,meeting_name,id_bigint
Response:
[
	{"id_bigint":"24","meeting_name":"Meditation on Sundays","location_municipality":"New York"},
	{"id_bigint":"346","meeting_name":"Just for Today","location_municipality":"New York"},
	{"id_bigint":"803","meeting_name":"Surrender On Sunday","location_municipality":"Amityville"},
	{"id_bigint":"114","meeting_name":"Un Nuevo Empezar","location_municipality":"New York"}

New In Root Server Version 1.8.13 and Up

We now have the ability to get a list of changes to meetings that occurred between two dates (or between one date and now, or between the start of the server and another date).

NOTE: The dates are inclusive, and ignore times (Hours and minutes will be ignored). They are from Midnight (00:00:00) of the "start" date (if provided, otherwise from the initiation of the server), to 11:59PM (23:59:59) of the end date (if provided, otherwise to the last change before the call was made). The most recent changes are on top.

This capability is available in CSV, XML or JSON. You get the list of changes by using a different switcher value: "GetChanges." You can optionally supply a start_date and end_date parameter (Use YYYY-MM-DD format, with leading zeroes).

Get All Changes In the Database That Occurred After September 1st, 2010, and before December 31, 2010 (Last Quarter of 2010), in CSV format:
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/csv/?switcher=GetChanges&start_date=2010-09-01&end_date=2010-12-31
Response:
"date_int","date_string","change_type","meeting_id","meeting_name","user_id","user_name","details"
"1293839136","6:45 PM, 12/31/2010","comdef_change_type_change","915","Recovery Today","21","Queens Area Service Administrator","The meeting format was changed from 'O, St' to 'C, St'."
"1293589842","9:30 PM, 12/28/2010","comdef_change_type_change","1173","The Place To Be","2","Suffolk Area Service Administrator","The meeting duration was changed from '0:00' to '1:45'."
"1293589810","9:30 PM, 12/28/2010","comdef_change_type_change","1173","The Place To Be","2","Suffolk Area Service Administrator",""
							·
							·
							·
"1283556074","7:21 PM, 9/3/2010","comdef_change_type_change","1112","Diversity is Our Strength","17","Open Arms Area Service Administrator","The meeting longitude was changed from '-74.392311573029' to '-74.395380020142'. The meeting latitude was changed from '41.715387662665' to '41.714458653529'."
"1283556028","7:20 PM, 9/3/2010","comdef_change_type_change","1112","Diversity is Our Strength","17","Open Arms Area Service Administrator","The meeting start time was changed from '22:00' to '19:30'. The meeting duration was changed from '23:00' to '21:00'."
"1283555973","7:19 PM, 9/3/2010","comdef_change_type_change","1112","Diversity is Our Strength","17","Open Arms Area Service Administrator","The meeting start time was changed from '12:00' to '22:00'. The meeting duration was changed from '1:00' to '23:00'. Street Address was changed from '104 Center St.' to '40 Market St.'. Location Name was added as 'St. John's Episcopal Church' ."
The same thing, in XML format:
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/xml/?switcher=GetChanges&start_date=2010-09-01&end_date=2010-12-31
Response (Remember that the real response is optimized. This formatting is imposed):
<changes xsi:schemaLocation="http://bmlt.magshare.net http://bmlt.magshare.net/stable/main_server/client_interface/xsd/GetChanges.php" xmlns="http://bmlt.magshare.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<row id="0">
		<date_int>1293839136</date_int>
		<date_string>6:45 PM, 12/31/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>915</meeting_id>
		<meeting_name>Recovery Today</meeting_name>
		<user_id>21</user_id>
		<user_name>Queens Area Service Administrator</user_name>
		<details>The meeting format was changed from 'O, St' to 'C, St'.</details>
	</row>
	<row id="1">
		<date_int>1293589842</date_int>
		<date_string>9:30 PM, 12/28/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1173</meeting_id>
		<meeting_name>The Place To Be</meeting_name>
		<user_id>2</user_id>
		<user_name>Suffolk Area Service Administrator</user_name>
		<details>The meeting duration was changed from '0:00' to '1:45'.</details>
	</row>
	<row id="2">
		<date_int>1293589810</date_int>
		<date_string>9:30 PM, 12/28/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1173</meeting_id>
		<meeting_name>The Place To Be</meeting_name>
		<user_id>2</user_id>
		<user_name>Suffolk Area Service Administrator</user_name>
	</row>
	<row id="3">
		<date_int>1293589786</date_int>
		<date_string>9:29 PM, 12/28/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1173</meeting_id>
		<meeting_name>The Place To Be</meeting_name>
		<user_id>2</user_id>
		<user_name>Suffolk Area Service Administrator</user_name>
		<details>County was added as 'Suffolk' .</details>
	</row>
							·
							·
							·
	<row id="247">
		<date_int>1283556074</date_int>
		<date_string>7:21 PM, 9/3/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1112</meeting_id>
		<meeting_name>Diversity is Our Strength</meeting_name>
		<user_id>17</user_id>
		<user_name>Open Arms Area Service Administrator</user_name>
		<details>The meeting longitude was changed from '-74.392311573029' to '-74.395380020142'. The meeting latitude was changed from '41.715387662665' to '41.714458653529'.</details>
	</row>
	<row id="248">
		<date_int>1283556028</date_int>
		<date_string>7:20 PM, 9/3/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1112</meeting_id>
		<meeting_name>Diversity is Our Strength</meeting_name>
		<user_id>17</user_id>
		<user_name>Open Arms Area Service Administrator</user_name>
		<details>The meeting start time was changed from '22:00' to '19:30'. The meeting duration was changed from '23:00' to '21:00'.</details>
	</row>
	<row id="249">
		<date_int>1283555973</date_int>
		<date_string>7:19 PM, 9/3/2010</date_string>
		<change_type>comdef_change_type_change</change_type>
		<meeting_id>1112</meeting_id>
		<meeting_name>Diversity is Our Strength</meeting_name>
		<user_id>17</user_id>
		<user_name>Open Arms Area Service Administrator</user_name>
		<details>The meeting start time was changed from '12:00' to '22:00'. The meeting duration was changed from '1:00' to '23:00'. Street Address was changed from '104 Center St.' to '40 Market St.'. Location Name was added as 'St. John's Episcopal Church' .</details>
	</row>
</changes>
The same thing, in JSON format:
URI:
http://bmlt.magshare.net/stable/main_server/client_interface/json/?switcher=GetChanges&start_date=2010-09-01&end_date=2010-12-31
Response (Remember that the real response is optimized. This formatting is imposed):
[
{"date_int":"1293839136","date_string":"6:45 PM, 12\/31\/2010","change_type":"comdef_change_type_change","meeting_id":"915","meeting_name":"Recovery Today","user_id":"21","user_name":"Queens Area Service Administrator","details":"The meeting format was changed from 'O, St' to 'C, St'."},
{"date_int":"1293589842","date_string":"9:30 PM, 12\/28\/2010","change_type":"comdef_change_type_change","meeting_id":"1173","meeting_name":"The Place To Be","user_id":"2","user_name":"Suffolk Area Service Administrator","details":"The meeting duration was changed from '0:00' to '1:45'."},
{"date_int":"1293589810","date_string":"9:30 PM, 12\/28\/2010","change_type":"comdef_change_type_change","meeting_id":"1173","meeting_name":"The Place To Be","user_id":"2","user_name":"Suffolk Area Service Administrator"},
							·
							·
							·
{"date_int":"1283556074","date_string":"7:21 PM, 9\/3\/2010","change_type":"comdef_change_type_change","meeting_id":"1112","meeting_name":"Diversity is Our Strength","user_id":"17","user_name":"Open Arms Area Service Administrator","details":"The meeting longitude was changed from '-74.392311573029' to '-74.395380020142'. The meeting latitude was changed from '41.715387662665' to '41.714458653529'."},
{"date_int":"1283556028","date_string":"7:20 PM, 9\/3\/2010","change_type":"comdef_change_type_change","meeting_id":"1112","meeting_name":"Diversity is Our Strength","user_id":"17","user_name":"Open Arms Area Service Administrator","details":"The meeting start time was changed from '22:00' to '19:30'. The meeting duration was changed from '23:00' to '21:00'."},
{"date_int":"1283555973","date_string":"7:19 PM, 9\/3\/2010","change_type":"comdef_change_type_change","meeting_id":"1112","meeting_name":"Diversity is Our Strength","user_id":"17","user_name":"Open Arms Area Service Administrator","details":"The meeting start time was changed from '12:00' to '22:00'. The meeting duration was changed from '1:00' to '23:00'. Street Address was changed from '104 Center St.' to '40 Market St.'. Location Name was added as 'St. John's Episcopal Church' ."}
]

Summary

The semantic export options here are not a complete solution, but they provide an extremely important and powerful "window" into a BMLT system. If you are interested in leveraging a BMLT database, but don't want the "canned" solutions, and are willing to roll up your sleeves and pop open the hood, these options can allow you to write extremely flexible and useful satellite clients.

Leave a Reply