The M-API is an effort to surface frequently requested data for use in Massey websites and Massey applications
V1 is a development experiment for DATA RETRIEVAL ONLY, not recommended for public consumption, is not supported, and may be discontinued without notice
www.massey.ac.nz/api/v1/massey.cfc?apikey={apikey}method={method}&format={format}&path={path}&args={args}
The M-API is exposed through a URL with a number of important query parameters described below. The eventual goal of the M-API is to be completely RESTful however time constraints mean this is not possible for Version 1.
REQUIRED
&apikey={apikey}
M-API V1 only work with a valid api key. You will need to apply for one to use this api. Applications for new apikeys is not yet publicly available.
&apikey=12345
REQUIRED
&method={method}
M-API V1 only permits the 'get' method for data retrieval. Although there is only one option it still must be included in the URL.
&method=get
Default: 'xml'
&format={format}
The api can return the data in either xml or json format
&format=xml
or
&format=json
REQUIRED
The path query parameter relates to what would be the RESTful path of the required data elements. The current path cariables available are below
Massey Event system data
&path=events/events
The event items stored in the event system
&path=events/types
The 'types' of events available
&path=events/categories
The categorisation tags for the events system
&path=news/articles
The news articles in the news system
&path=news/types
The 'types' of news articles available
&path=news/categories
The categorisation tags for the news system
&path=people/people
Available data from the directory system
Arguments are submitted as semi-colon separated pairs and used to order/filter the returned results
&args=key1:value1;key2:value2;key3:value3a,value3b,value3c;
&args=limit:5;color:blue;sizes:xl,l,s;
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=news/articles&args=....
Arguments
Retrieve XML data for 2 most recent articles ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&path=news/articles&args=limit:2
Retrieve JSON data for most 'University News' type story (uuid='B3A8EBA9-96BF-57F6-8177-280EBC969D8D') ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json
&path=news/articles&args=limit:1;type_uuid:B3A8EBA9-96BF-57F6-8177-280EBC969D8D
Retrieve JSON data for a specific article
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json
&path=news/articles&args=uuid:FAF3C6BF-EDF0-7245-DD2A-8A86E1B7CE1C
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=news/types&args=....
Arguments
Retrieve all types ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=news/types
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=news/categories&args=....
Arguments
Retrieve all categories ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=news/categories
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=events/events&args=....
Arguments
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=events/types&args=....
Arguments
Retrieve all types ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=events/types
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=events/categories&args=....
Arguments
Retrieve all categories ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=events/categories
www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json&path=people/people&args=....
Arguments
Retrieve XML data for specific staff id ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&path=people/people&args=ids:039387
Retrieve names and extensions in JSON for specific user codes ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json
&path=people/people&args=user_codes:bjwildbo,pjmoody;fields:known_as,extension
Retrieve names and extensions in JSON for all Richards ...
View Results
http://www.massey.ac.nz/api/v1/massey.cfc?method=get&apikey={YOUR API KEY}&format=json
&path=people/people&args=search_term:richard;fields:known_as,extension