Version 1.2

Appendix B - Technical detail on file downloading

Outage data may be downloaded in CSV or XML format. The CSV export option is available within the main search screen, and is discussed further in Appendix D.

For automatically retrieving search results, the POCP site offers a SOAP Web Service capable of handling the same queries as the regular web interface. The web service is accessible via http://pocp.redspider.co.nz/soap4.php. The SOAP interface provides a WSDL schema for ease of integration.

Developers intending to access the Web Service should contact Richard Clark (richard@redspider.co.nz) in order to ensure they are aware of the latest changes.

Developers intending to use this interface should have a solid understanding of how the website works in general, what the various terms such as outage block and plant relate to, and what their expected formats are. The intention of this section is to outline the interface itself, details on using the site are found elsewhere in this guide.

The interface currently supports the following methods:

array_of_outage = search(plant, id, start, end, gps, owners, categories, planning, assessment, last_modified_since)

Arguments:

plant
Plant or outage block
id
Outage ID
start
Start date/time (YYYY-MM-DD HH:MM:SS)
end
End date/time (YYYY-MM-DD HH:MM:SS)
gps
List of Grid Points (array of string)
owners
List of Owner IDs (array of int)
categories
List of Category IDs (array of int)
planning
List of Planning status IDs (array of int)
assessment
List of Assessment status IDs (array of int)
last_modified_since
Only include outages modified since this date/time (YYYY-MM-DD HH:MM:SS)

Return value:

This function returns an array of "outages". Outages are a complex type of the following structure:

id
Outage ID
plant
Outage block/plant
start
Start date and time of outage
end
End date and time of outage
time_type
Whether the range is continuous, or daily
owner
int ID for owner
assessment_status
int ID for current assessment status
planning_status
int ID for current planning status
category
int ID for current category
mwatt_remaining
Megawatts remaining (string, empty if unknown)
mwatt_lost
Megawatt reduction (string, empty if unknown)
mvar_remaining
Megavar remaining (string, empty if unknown)
gps
List of Grid Points (array of string)
last_modified
date/time the outage was last modified
nature
The nature field (string)
reference_id
The reference ID for the outage, can be used to construct URLs to POCP pages. (int)

Reference ID is the POCP internal ID for a given outage, and can be used to construct a URL to link directly to the POCP entry for that outage like this:

http://pocp.redspider.co.nz/index.php?op=get_outage|view_outage&outage_id=reference_id

So, reference ID 25713 would be:

http://pocp.redspider.co.nz/index.php?op=get_outage|view_outage&outage_id=25713

owner_list()

Arguments

No arguments

Return value

Returns an array of Mapping, a Mapping is a complex type of the following structure:

name
Name of the element, in this case the Owner name
id
Integer ID relating to the name

category_list()

Arguments

No arguments

Return value

See owner_list, the name field will contain the name of the category however.

assessment_status_list()

Arguments

No arguments

Return value

See owner_list, the name field will contain the name of the assessment_status.

planning_status_list()

Arguments

No arguments

Return value

See owner_list, the name field will contain the name of the planning_status.

Users requiring further technical assistance should contact Richard Clark at Red Spider (richard@redspider.co.nz) in the first instance.