XML Data

The data in this application is available in XML format. XML is a format used for program-to-program data exchange. If you are technically inclined and want to access this data programmatically, here are the resources available. If you are not a programmer, software engineer, or "IT geek" this material may look like gibberish.

Currently Available XML Data:

  • http://www.actionshootingscores.com/xml/organizations?state=AA

    AA is the 2 letter abbreviation for a US state or CN for Canada or XX for any other country. This returns a list of organization names, cities, states, and organization id numbers. The id number assigned to an organization will not change, once you've gotten the organization id(s) you're interested in you're set.

  • http://www.actionshootingscores.com/xml/matches?org=N?start=mm-dd-yyyy?end=mm-dd-yyyy

    N is the organization id (see the previous url), start and end define a date range. Please use this date format mm-dd-yyyy All are numbers, years have 4 digits, with a dash as a separator. This returns a list of match names, dates, types, and match id numbers. Once and id is assigned to a match, it will never change nor be assigned to another match. As matches are added to the database, the id's increase. The sequence is is global so don't assume that the next match for the organization of interest is 1 more than the previous id.

  • http://www.actionshootingscores.com/xml/results?match=N

    N is the match id (see the previous url). This returns the match results, which varies by type of match.

  • http://www.actionshootingscores.com/xml/scoresheets?match=N

    N is the match id (see the earlier url). This returns the raw score sheet data and some computed data for each shooter in the match, which varies by type of match. These streams can be quite verbose.

    • For IDPA matches, points down per target is present only when the value is greater than 0.
    • For IDPA and USPSA matches, string of fire times are only present when greater than 0.00
    • For USPSA, number of hits in the A, B, C, D zones and number of misses per target are present only when they are greater than 0.

Making sense of all this.

  • In order to get match results or score sheet data, you need to know the match id number which is the N in the url parameter ?match=N. Match id is a foreign key in the tables that contain match computed match scores and score sheet data.
  • For matches you created, you can see the match id on these web pages - "Shooters in 'type' Match", "Add or Edit Scoresheet Data" and "Change Information for Match". It's labeled Match Key: N
  • You can use these XML urls to search for the match_id. You do this by traversing 2 tables in the database.
    • First, you need to find the organization using the first url listed above. Once you the organization id, save it away as it does not change.
    • Second, using the organization id, use the second url listed above with a date range to obtain a list of matches. One of the elements for each match is the match id. You will need to repeat this step with a revised date range to capture new matches as time goes on.
    • Now you can get the match results and/or the score sheet data for the match(es) of interest.

If you use this data on your web site we ask that you put a link to our home page, www.actionshootingscores.com, on the page(s) that use this.

Example

Here is an example, using ruby. We are going to get the results for match id 5. I have removed much of the output to save space.

a web app by dagny gromer © 2006 Go To Starting Page Contact Us