Skip to main content
Windward

The Javelin 2014 RESTful API

 

Overview 

The Javelin REST API is used to interact with a Javelin server, giving you an easy way to access Windward reporting capabilities.

 

  • This API uses a resource-oriented architecture. Operations are performed on objects called resources (for example a User or Template).
  • The API is based on HTTP. In general, HTTP verbs are used to determine the type of operation you wish to execute. A GET request retrieves information. A POST creates a new resource. A PUT updates a resource. DELETE removes the resource.

  • When a web request requires input information, these are supplied either as query variables or XML in the request body.
  • Javelin uses basic authentication. This means that the username and password are passed with each request.

 

 

The base URLs for the Windward-hosted Javelin are located at https://javelin.windward.net/JavelinRestService.svc/ (accessing the link directly in a browser will not load anything). To access a resource, add the "Relative URL" to the end of the base URL.

 

Note: replace “javelin.windward.net” with your host name if you are using a different server.

 

Javelin API

Summary

Resource
Relative URL
HTTP Verb
General
v1
GET
General
v1/login
GET
User
v1/users
GET
User
v1/users
POST
User
v1/users/{username}
GET
User
v1/users/{username}
PUT
User
v1/users/{username}
DELETE
User
v1/users/{username}/billing
PUT
Packet
v1/packets
GET
Packet
v1/packets
POST
Packet
v1/packets/{packetname}
GET
Packet
v1/packets/{packetname}
PUT
Packet
v1/packets/{packetname}
DELETE
Template
v1/packets/{packetname}/templates
GET
Template
v1/packets/{packetname}/templates
POST
Template
v1/packets/{packetname}/templates/upload
POST
Template
v1/packets/{packetname}/templates/{templatename}
GET
Template
v1/packets/{packetname}/templates/{templatename}
PUT
Template
v1/packets/{packetname}/templates/{templatename}
DELETE
Template
v1/packets/{packetname}/templates/{templatename}/info
GET
Template
v1/packets/{packetname}/templates/{templatename}/report
GET
Task
v1/packets/{packetname}/templates/{templatename}/tasks
GET
Task
v1/packets/{packetname}/templates/{templatename}/tasks
POST
Task
v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}
GET
Task
v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}
PUT
Task
v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}
DELETE
Task
v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}/report
GET
Back to top

General

Operation

v1

HTTP Verb

GET

Description

Get the version number associated with the Javelin REST service

Body example

NA

Body attributes

NA

Return response example

<javelin>

   <name>Windward Javelin REST Web Service</name>

   <api_version>1.0.0.0</api_version>

</javelin>

Return response attributes

name – name of the web service

api_version – version of the Javelin API

Notes

 

Back to top
 

Operation

v1/login

HTTP Verb

GET

Description

Check if the given username and password exists is registered

Body example

NA

Body attributes

NA

Return response example

<login>yes</login>

Return response attributes

Login – ‘yes’ if user is registered; ‘no’ if the user is not registered

Notes

 

Back to top

User

Operation

/v1/users

HTTP Verb

GET

Description

Get a list of all users.

Body example

NA

Body attributes

NA

Return response example

<users>

   <user>

      <name>user1</name>

      <disabled>false</disabled>

      <reports>0</reports>

      <pages>0</pages>

      <per_report>0</ per_report >

      <per_page>0</per_page>

   </user>

   <user>

      <name>user2</name>

      <disabled>false</disabled>

      <reports>0</reports>

      <pages>0</pages>

      <per_report>0</ per_report >

      <per_page>0</per_page>

   </user>

</users>

Return response attributes

user – a user; there will one or more of these

name – a user name

disabled – whether the user account is disabled

reports – number of reports generated

pages – number of pages of reports generated

per_report – set cost per report

per_page – set cost per page of reports

Notes

Must be an administrator.

Back to top

 

Operation

/v1/users

HTTP Verb

POST

Description

Add a new user.

Body example

<user>

   <name>user1 </name>

   <password>password1</password>

   <email>user1@myemail.com</email>

   <disabled>false</disabled>

   <admin>false</admin>

   <time_zone>Mountain Standard Time</time_zone>

   <reports>0</reports>

   <pages>0</pages>

   <per_report>0</ per_report >

   <per_page>0</per_page>

   <activation_date>2011-01-01</activation_date>

   <trxn_id>Ju5la8F05Mug</trxn_id >

   <failed_payment>false</failed_payment>  

</user>

Body attributes

name – (required) user name; cannot be blank

password – (required) user password

email – user email address

disabled – ‘true’ (user cannot make any web requests) or ‘false’ (default)

admin – ‘true’ (user is an administrator) or ‘false’ (default)

time_zone – defaults to the Javelin server time zone if not set

   'Morocco Standard Time'

   'UTC'

   'GMT Standard Time'

   'Greenwich Standard Time'

   'W. Europe Standard Time'

   'Central Europe Standard Time'

   'Romance Standard Time'

   'Central European Standard Time'

   'W. Central Africa Standard Time'

   'Namibia Standard Time'

   'Jordan Standard Time'

   'GTB Standard Time'

   'Middle East Standard Time'

   'Egypt Standard Time'

   'Syria Standard Time'

   'South Africa Standard Time'

   'FLE Standard Time'

   'Israel Standard Time'

   'E. Europe Standard Time'

   'Arabic Standard Time'

   'Arab Standard Time'

   'Russian Standard Time'

   'E. Africa Standard Time'

   'Iran Standard Time'

   'Arabian Standard Time'

   'Azerbaijan Standard Time'

   'Mauritius Standard Time'

   'Georgian Standard Time'

   'Caucasus Standard Time'

   'Afghanistan Standard Time'

   'Ekaterinburg Standard Time'

   'Pakistan Standard Time'

   'West Asia Standard Time'

   'India Standard Time'

   'Sri Lanka Standard Time'

   'Nepal Standard Time'

   'Central Asia Standard Time'

   'Bangladesh Standard Time'

   'N. Central Asia Standard Time'

   'Myanmar Standard Time'

   'SE Asia Standard Time'

   'North Asia Standard Time'

   'China Standard Time'

   'North Asia East Standard Time'

   'Singapore Standard Time'

   'W. Australia Standard Time'

   'Taipei Standard Time'

   'Ulaanbaatar Standard Time'

   'Tokyo Standard Time'

   'Korea Standard Time'

   'Yakutsk Standard Time'

   'Cen. Australia Standard Time'

   'AUS Central Standard Time'

   'E. Australia Standard Time'

   'AUS Eastern Standard Time'

   'West Pacific Standard Time'

   'Tasmania Standard Time'

   'Vladivostok Standard Time'

   'Magadan Standard Time'

   'Central Pacific Standard Time'

   'New Zealand Standard Time'

   'UTC+12'

   'Fiji Standard Time'

   'Kamchatka Standard Time'

   'Tonga Standard Time'

   'Azores Standard Time'

   'Cape Verde Standard Time'

   'UTC-02'

   'Mid-Atlantic Standard Time'

   'E. South America Standard Time'

   'Argentina Standard Time'

   'SA Eastern Standard Time'

   'Greenland Standard Time'

   'Montevideo Standard Time'

   'Newfoundland Standard Time'

   'Paraguay Standard Time'

   'Atlantic Standard Time'

   'Central Brazilian Standard Time'

   'SA Western Standard Time'

   'Pacific SA Standard Time'

   'Venezuela Standard Time'

   'SA Pacific Standard Time'

   'Eastern Standard Time'

   'US Eastern Standard Time'

   'Central America Standard Time'

   'Central Standard Time'

   'Central Standard Time (Mexico)'

   'Canada Central Standard Time'

   'US Mountain Standard Time'

   'Mountain Standard Time (Mexico)'

   'Mountain Standard Time'

   'Pacific Standard Time (Mexico)'

   'Pacific Standard Time'

   'Alaskan Standard Time'

   'Hawaiian Standard Time'

   'UTC-11'

   'Samoa Standard Time'

   'Dateline Standard Time'

reports – number of reports generated; defaults to 0

pages – number of pages of reports generated; defaults to 0

per_report – cost per report in cents (USD); defaults to 0

per_page – cost per page in cents (USD); defaults to 0

activation_date – last time account was activated with billing information; account disables 6 months after activation date; yyyy-MM-dd format; used in manual and PayPal billing; defaults to  0001-01-01

trxn_id – recurring PayPal transaction id; used in PayPal billing; defaults to and empty string

failed_payment – ‘true’ if last PayPal payment failed; used in PayPal billing; defaults to false

Return response example

<user>

   <name>user1</name>

   <email>user1@myemail.com</email>

   <disabled>false</disabled>

   <admin>false</admin>

   <time_zone>Mountain Standard Time</time_zone>

   <reports>0</reports>

   <pages>0</pages>

   <per_report>0</ per_report >

   <per_page>0</per_page>

   <activation_date>2011-01-01</activation_date>

   <trxn_id>Ju5la8F05Mug </trxn_id >

   <failed_payment>false</failed_payment>  

   <default_packet>wr_default_21</default_packet>

</user>

Return response attributes

Same as body attributes except:

No password,

default_packet – the default packet created for the user; cannot be deleted

Notes

Must be an administrator. User names must be unique and cannot be blank.

Back to top

 

Operation

/v1/users/{username}

HTTP Verb

GET

Description

Retrieves information on a specific user with name {username}.

Body example

None

Body attributes

None

Return response example

<user>

   <name>user1</name>

   <email>user1@myemail.com</email>

   <disabled>false</disabled>

   <admin>false</admin>

   <time_zone>Mountain Standard Time</time_zone>

   <reports>0</reports>

   <pages>0</pages>

   <per_report>0</ per_report >

   <per_page>0</per_page>

   <activation_date>2011-01-01</activation_date>

   <trxn_id>Ju5la8F05Mug </trxn_id >

   <failed_payment>false</failed_payment>  

   <default_packet>wr_default_21</default_packet>

</user>

Return response attributes

See “/v1/users” POST “Return response attributes.”

Notes

Must be an administrator or user {username}.

Back to top

 

Operation

/v1/users/{username}

HTTP Verb

PUT

Description

Update the information on a specific user with name {username}.

Body example

<user>

   <name>user1</name>

   <password>password1</password>

   <email> user1@myemail.com </email>

   <disabled>false</disabled>

   <admin>false</admin>

   <time_zone>Mountain Standard Time</time_zone>

   <reports>0</reports>

   <pages>0</pages>

   <per_report>0</ per_report >

   <per_page>0</per_page>

   <activation_date>2011-01-01</activation_date>

   <trxn_id> Ju5la8F05Mug </trxn_id >

   <failed_payment>false</failed_payment>  

</user>

Body attributes

See “/v1/users” POST “Body attributes.”

Return response example

<user>

   <name>user1</name>

   <email>user1@myemail.com</email>

   <disabled>false</disabled>

   <admin>false</admin>

   <time_zone>Mountain Standard Time</time_zone>

   <reports>0</reports>

   <pages>0</pages>

   <per_report>0</ per_report >

   <per_page>0</per_page>

   <activation_date>2011-01-01</activation_date>

   <trxn_id>Ju5la8F05Mug</trxn_id >

   <failed_payment>false</failed_payment>   

   <default_packet>false</default_packet>

</user>

Return response attributes

See “/v1/users” POST “Return response attributes.”

Notes

Must be an administrator or user {username}. A non-admin can only change their password, time zone, and email address.

 Back to top 

 

Operation

/v1/users/{username}

HTTP Verb

DELETE

Description

Delete a user.

Body example

None

Body attributes

None

Return response example

None

Return response attributes

None

Notes

Must be an administrator.

Back to top 

 

Operation

v1/users/{username}/billing

HTTP Verb

GET

Description

Get information on user billing.

Body example

None

Body attributes

None

Return response example

<user>

   <name>user1</name>

   <reports>14</reports>

   <pages>27</pages>

</user>

Return response attributes

name – user name

reports – number of reports the user has run

page – number of pages of reports the user has run

Notes

Must be an administrator or user {username}.

Back to top

 

Packet

Operation

v1/packets

HTTP Verb

GET

Description

Get a list of all the packets available to the user, with the names of templates in each packet.

Body example

None

Body attributes

None

Return response example

<packets>

   <packet>

      <name>packet1</name>

      <template>myTemplate1</template>

      <template>myTemplate2</template>

   </packet>

   <packet>

      <name>packet2</name>

      <template>myTemplate23</template>

   </packet>

</packets>

Return response attributes

packet – a packet; can be one or more packets

name – name of the packet

template – name of a template in the packet; there can be zero or more of these

Notes

Administrators will get information on all packets. Non-administrators will get all of the packets they have created as well as a default packet whose name will start with “wr_default”.

Back to top

 

Operation

v1/packets

HTTP Verb

POST

Description

Create a new packet.

Body example

<packet>

   <name>newPacketName</name>

</packet>

Body attributes

name – name of the new packet

Return response example

<packet>

   <name>newPacketName</name>

</packet>

Return response attributes

name – name of the newly created packet

Notes

Packet names must be unique.

Back to top

 

Operation

v1/packets/{packetname}

HTTP Verb

GET

Description

Retrieve information on the packet with name {packetname}.

Body example

None

Body attributes

 

Return response example

<packet>

   <name>packet1</name>

   <template_name>myPacket1</template_name>

   <template_name>myPacket2</template_name>

</packet>

Return response attributes

name – name of the packet

template_name – name of a template in the packet; there can be zero or more of these

Notes

 

Back to top

 

Operation

v1/packets/{packetname}

HTTP Verb

PUT

Description

Update a packet with name {packetname}.

Body example

<packet>

   <name>newPacketName</name>

</packet>

Body attributes

name – new name for the packet

Return response example

<packet>

   <name>newPacketName</name>

   <template_name>myTemplate1</template_name>

   <template_name>myTemplate2</template_name>

</packet>

Return response attributes

name – updated name of the packet

template_name – name of a template in the packet; can be zero or more of these

Notes

 

Back to top

 

Operation

v1/packets/{packetname}

HTTP Verb

DELETE

Description

Delete a packet with name {packetname}.

Body example

None

Body attributes

None

Return response example

None

Return response attributes

None

Notes

All templates and tasks in the packet are deleted as well.

Back to top

Template

Operation

v1/packets/{packetname}/templates

HTTP Verb

GET

Description

Get a list of all templates in the {packetname} packet available to the user.

Body example

None

Body attributes

None

Return response

<templates>

   <template>

      <name>myTemplate1</name>

   </template>

   <template>

      <name>myTemplate2</name>

   </template>

</ templates >

Return response attributes

template – all the templates in a given packet; can be zero of more of these

name – template name

Notes

 

Back to topBack to top

 

 

Operation

v1/packets/{packetname}/templates?name={templatename}&ext={extension}

HTTP Verb

POST

Description

Create a new template in packet {packetname}

Body example

UTF8 encoded binary of the template

Body attributes

None

Return response example

 <template>

   <name>myTemplate1</name>

</template>

Return response attributes

name – name of the template

Notes

Specify the name of the template in {templatename} and the extension (docx, xlsx, pptx) in {extension}.

Back to top

 

Operation

v1/packets/{packetname}/templates/upload

HTTP Verb

POST

Description

Used for creating a template from a web browser form.

Body example

Body automatically created when using <form> and <input type=’file’> controls to upload a file. See PortalAddTemplate.htm for an example.

Body attributes

None

Return response example

<template>

   <name>myTemplate1</name>

</template>

Return response atrtibutes

name – name of the uploaded template

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}

HTTP Verb

GET

Description

Retrieve the binary for the specified template.

Body example

None

Body attributes

None

Return response example

UTF-8 encoded binary of the template

Return response attributes

None

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}?name={templatename}&ext={extension}

HTTP Verb

PUT

Description

Update a template.

Body example

UTF-8 encoded binary of the template

Body attributes

None

Return response example

<template>

   <name>myTemplate1</name>

</template

Return response attributes

name – name of the updated template

Notes

Specify the name of the template in {templatename} and the extension (docx, xlsx, pptx) in {extension}.

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}

HTTP Verb

DELETE

Description

Delete the template {templatename} in packet {packetname}.

Body example

None

Body attributes

None

Return response example

None

Return response attributes

None

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/info

HTTP Verb

GET

Description

Returns information on the given template.

Body example

None

Body attributes

None

Return response example

<template_info>

   <variables>

      <variable>

         <name>var1</name>

         <required>true</required>

         <description>The first variable.</description>

         <type>Text</type>

         <default_value>The default value.</default_value>

      </variable>

      <variable>

         <name>var2</name>

         <required>false</required>

         <description>My second variable.</description>

         <type>Number</type>

         <default_value>3</default_value>

      </variable>

   </variables>

</template_info>

Return response attributes

variable – a variable for the template; can be zero or more of these

name – name of the variable

required – true/false; whether the variable is required

description – description of the variable

type – Currency/Date/Integer/Number/Select/Text

default_value – default value for a variable

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/report?ext={extension}&{varname1}={varvalue1}&{varname2}={varvalue2}

HTTP Verb

GET

Description

Generate a report for the given template.

Body example

None

Body attributes

None

Return response example

UTF-8 encoded binary of the report

Return response attributes

None

Notes

Specify the report extension (docx, html, pdf, pptx, rtf, spread_ml, txt, word_ml, xls, xlsx) in {extension}. For each variable, specify the variable name {varname} and the variable value {varvalue}.

 

Back to top

 

 

Task

Operation

v1/packets/{packetname}/templates/{templatename}/tasks

HTTP Verb

GET

Description

Get information on all of the tasks in packet {packetname} template {templatename}.

Body example

None

Body attributes

None

Return response example

<tasks>

   <task>

      <name>task1</name>

      <start>2011-01-01T14:00:00</start>

      <end>2011-02-01T14:00:00</end>

      <schedule>0 0 13 * * ?</schedule>

      <format>docx</format>

      <from>user1@myemail.com</from>

      <to>user2@myemail.com;user3@myemail.com</to>

      <subject>Here is your financial report.</subject>

      <recurrence>Every day at 13:00.</recurrence>

      <variables>

         <variable>

            <name>myVariable</name>

            <value>4.3</value>

         </variable>

      </variables>

   </task>

</tasks>

Return response attributes

task – a task; can be zero or more of these

name – name of the task

start – when to start scheduling the task

end – when to stop scheduling the task

schedule – a cron expression for when to run the task (http://quartznet.sourceforge.net/tutorial/lesson_6.html)

format – output format of the report; docx, html, pdf, pptx, rtf, spread_ml, txt, word_ml, xls, xlsx

from – who the email will be from

to – who to send the email to; if you have more than one email address, separate them with a semicolon

subject – subject line of the email

recurrence – a human-readable version of ‘schedule’

variable – a variable; can be zero or more of these

variable/name – name of the variable

variable/value – value of the variable

Notes

You can have multiple <task> items in <tasks>. You can also have multiple <variable> items in <variables>.

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/tasks

HTTP Verb

POST

Description

Create a new task.

Body example

<task>

   <name>task1</name>

   <start>2011-01-01T14:00:00</start>

   <end>2011-02-01T14:00:00</end>

   <schedule>0 0 13 * * ?</schedule>

   <format>docx</format>

   <from>user1@myemail.com</from>

   <to>user2@myemail.com;user3@myemail.com</to>

   <subject>Here is your financial report.</subject>  

   <variables>

      <variable>

         <name>myVariable</name>

         <value>4.3</value>

      </variable>

   </variables>

</task>

Body attributes

Same as v1/packets/{packetname}/templates/{templatename}/tasks (GET) without <recurrence>.

Return response example

<task>

   <name>task1</name>

   <start>2011-01-01T14:00:00</start>

   <end>2011-02-01T14:00:00</end>

   <schedule>0 0 13 * * ?</schedule>

   <format>docx</format>

   <from>user1@myemail.com</from>

   <to>user2@myemail.com;user3@myemail.com</to>

   <subject>Here is your financial report.</subject>

   <recurrence>Every day at 13:00.</recurrence>

   <variables>

      <variable>

         <name>myVariable</name>

         <value>4.3</value>

      </variable>

   </variables>

</task>

Return response attributes

Same as v1/packets/{packetname}/templates/{templatename}/tasks (GET).

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}

HTTP Verb

GET

Description

Get information on a specific task.

Body example

None

Body attributes

None

Return response example

<task>

   <name>task1</name>

   <start>2011-01-01T14:00:00</start>

   <end>2011-02-01T14:00:00</end>

   <schedule>0 0 13 * * ?</schedule>

   <format>docx</format>

   <from>user1@myemail.com</from>

   <to>user2@myemail.com;user3@myemail.com</to>

   <subject>Here is your financial report.</subject>

   <recurrence>Every day at 13:00.</recurrence>

   <variables>

      <variable>

         <name>myVariable</name>

         <value>4.3</value>

      </variable>

   </variables>

</task>

Return response attributes

Same as v1/packets/{packetname}/templates/{templatename}/tasks (GET).

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}

HTTP Verb

PUT

Description

Update a task.

Body example

<task>

   <name>task1</name>

   <start>2011-01-01T14:00:00</start>

   <end>2011-02-01T14:00:00</end>

   <schedule>0 0 13 * * ?</schedule>

   <format>docx</format>

   <from>user1@myemail.com</from>

   <to>user2@myemail.com;user3@myemail.com</to>

   <subject>Here is your financial report.</subject>  

   <variables>

      <variable>

         <name>myVariable</name>

         <value>4.3</value>

      </variable>

   </variables>

</task>

Body attributes

Same as v1/packets/{packetname}/templates/{templatename}/tasks (GET) without <recurrence>.

Return response example

<task>

   <name>task1</name>

   <start>2011-01-01T14:00:00</start>

   <end>2011-02-01T14:00:00</end>

   <schedule>0 0 13 * * ?</schedule>

   <format>docx</format>

   <from>user1@myemail.com</from>

   <to>user2@myemail.com;user3@myemail.com</to>

   <subject>Here is your financial report.</subject>

   <recurrence>Every day at 13:00.</recurrence>

   <variables>

      <variable>

         <name>myVariable</name>

         <value>4.3</value>

      </variable>

   </variables>

</task>

Return response attributes

Same as v1/packets/{packetname}/templates/{templatename}/tasks (GET).

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}

HTTP Verb

DELETE

Description

Delete a task.

Body example

None

Body attributes

None

Return response example

None

Return response attributes

None

Notes

 

Back to top

 

Operation

v1/packets/{packetname}/templates/{templatename}/tasks/{taskname}/report

HTTP Verb

GET

Description

Generate a report from the given task.

Body example

None

Body attributes

None

Return response example

UTF-8 encoded binary of the report

Return response attributes

None

Notes