External API

EVE-SRP provides read-only access to requests you can access to external applications. Responses can be formatted as XML or JSON depending on your requirements. The URLs for the API are the same ones you access normally in a web browser, just in a different format.

API Keys

The first step to using the external API is to create an API key. Click the “Create API Key” button, and a key will be generated.

_images/create_api_key.png

You can revoke API keys at any time by clicking the “X” in the “Remove” column. The key is the string of letters and numbers and can be copied to your clipboard by clicking on its button (requires Flash).

To use the API key, provide it as a parameter in the query string along with the desired format. The parameter name for the key is apikey and the field name for the format is fmt, and valid values are json or xml.

Lists of Requests

You can retrieve lists of up to 200 requests per page through the API. Filtering and sorting options are applied the same way they are when viewing the lists as HTML. In addition to the personal, pending, pay and completed lists exposed in the UI, there is an all route that will list all requests you have access to. As with the other lists that show requests other than your own, you must have a permission greater than ‘submitter’ granted to you in a division to access those lists.

JSON

In response to http://example.com/request/personal/?apikey=dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I,&fmt=json

{
  "api_keys": [
    {
      "id": 6, 
      "key": "dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I,", 
      "timestamp": "Thu, 10 Jul 2014 06:48:51 GMT"
    }
  ], 
  "requests": [
    {
      "alliance": "Test Alliance Please Ignore", 
      "base_payout": "40000000.00", 
      "base_payout_str": "40,000,000.00", 
      "corporation": "Dreddit", 
      "details": "I literally forgot how to broadcast for armor.", 
      "division": {
        "href": "/api/division/1/", 
        "id": 1, 
        "name": "Test Alliance"
      }, 
      "href": "/request/39861569/", 
      "id": 39861569, 
      "kill_timestamp": "Wed, 02 Jul 2014 19:26:00 GMT", 
      "killmail_url": "https://zkillboard.com/kill/39861569/", 
      "payout": "40000000.00", 
      "payout_str": "40,000,000.00", 
      "pilot": "Paxswill", 
      "status": "paid", 
      "submit_timestamp": "Wed, 09 Jul 2014 19:43:58 GMT", 
      "submitter": {
        "href": "/api/user/1/", 
        "id": 1, 
        "name": "paxswill"
      }
    }, 
    {
      "alliance": "Test Alliance Please Ignore", 
      "base_payout": "9158708.44", 
      "base_payout_str": "9,158,708.44", 
      "corporation": "Dreddit", 
      "details": "crest mail?", 
      "division": {
        "href": "/api/division/1/", 
        "id": 1, 
        "name": "Test Alliance"
      }, 
      "href": "/request/39697412/", 
      "id": 39697412, 
      "kill_timestamp": "Mon, 23 Jun 2014 16:06:00 GMT", 
      "killmail_url": "https://zkillboard.com/kill/39697412/", 
      "payout": "9158708.44", 
      "payout_str": "9,158,708.44", 
      "pilot": "Paxswill", 
      "status": "paid", 
      "submit_timestamp": "Wed, 09 Jul 2014 09:12:19 GMT", 
      "submitter": {
        "href": "/api/user/1/", 
        "id": 1, 
        "name": "paxswill"
      }
    }
  ]
}

XML

In response to http://example.com/request/personal/?apikey=dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I,&fmt=xml

<?xml version="1.0" encoding="UTF-8" ?>
<response user="paxswill">
  <apikeys>
    <apikey id="6">
      <key>dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I,</key>
      <timestamp>2014-07-10T06:48:51.167054</timestamp>
    </apikey>
  </apikeys>
  <requests>
    <request id="39861569" status="paid">
      <payout>
        <base pretty="40,000,000.00">40000000.00</base>
        <computed pretty="40,000,000.00">40000000.00</computed>
      </payout>
      <details>I literally forgot how to broadcast for armor.</details>
      <pilot>
        <alliance>Test Alliance Please Ignore</alliance>
        <corporation>Dreddit</corporation>
        <name>Paxswill</name>
      </pilot>
      <submit-timestamp>2014-07-09T19:43:58.126158</submit-timestamp>
      <kill-timestamp>2014-07-02T19:26:00</kill-timestamp>
      <division id="1" name="Test Alliance" />
      <submitter id="1" name="paxswill" />
      <killmail-url>https://zkillboard.com/kill/39861569/</killmail-url>
      <url>/request/39861569/</url>
      <ship>Guardian</ship>
      <location>
        <system>WD-VTV</system>
        <constellation>UX3-N2</constellation>
        <region>Catch</region>
      </location>
    </request>
    <request id="39697412" status="paid">
      <payout>
        <base pretty="9,158,708.44">9158708.44</base>
        <computed pretty="9,158,708.44">9158708.44</computed>
      </payout>
      <details>crest mail?</details>
      <pilot>
        <alliance>Test Alliance Please Ignore</alliance>
        <corporation>Dreddit</corporation>
        <name>Paxswill</name>
      </pilot>
      <submit-timestamp>2014-07-09T09:12:19.250893</submit-timestamp>
      <kill-timestamp>2014-06-23T16:06:00</kill-timestamp>
      <division id="1" name="Test Alliance" />
      <submitter id="1" name="paxswill" />
      <killmail-url>https://zkillboard.com/kill/39697412/</killmail-url>
      <url>/request/39697412/</url>
      <ship>Tristan</ship>
      <location>
        <system>Hikkoken</system>
        <constellation>Ishaga</constellation>
        <region>Black Rise</region>
      </location>
    </request>
  </requests>
</response>

RSS

An RSS feed for requests in a list is available by adding /rss.xml to the end of a list URL. For example, the URL for the feed of pending requests would be http://example.com/request/pending/rss.xml?apikey=dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I

Request Details

If you need details beyond that provided in the lists of requests, or to look up information on a specific request you can access a request’s URL through the API. For example, the request for killmail #39861569 in JSON format could be retrieved with the URL http://example.com/request/39861569/?apikey=dVbP0_SCPS12LnLpIZoJvemzeUUOOUErT7nojbJW4_I,&fmt=json. The path for an individual requests is also returned as part of the response in request listings.

JSON

{
  "actions": [
    {
      "id": 2, 
      "note": "", 
      "timestamp": "Thu, 10 Jul 2014 06:37:09 GMT", 
      "type": "paid", 
      "user": {
        "href": "/api/user/1/", 
        "id": 1, 
        "name": "paxswill"
      }
    }, 
    {
      "id": 1, 
      "note": "Good to go.", 
      "timestamp": "Wed, 09 Jul 2014 19:58:56 GMT", 
      "type": "approved", 
      "user": {
        "href": "/api/user/1/", 
        "id": 1, 
        "name": "paxswill"
      }
    }
  ], 
  "alliance": "Test Alliance Please Ignore", 
  "base_payout": "40000000.00", 
  "base_payout_str": "40,000,000.00", 
  "corporation": "Dreddit", 
  "current_user": {
    "href": "/api/user/1/", 
    "id": 1, 
    "name": "paxswill"
  }, 
  "details": "I literally forgot how to broadcast for armor.", 
  "division": {
    "href": "/api/division/1/", 
    "id": 1, 
    "name": "Test Alliance"
  }, 
  "href": "/request/39861569/", 
  "id": 39861569, 
  "kill_timestamp": "Wed, 02 Jul 2014 19:26:00 GMT", 
  "killmail_url": "https://zkillboard.com/kill/39861569/", 
  "modifiers": [
    {
      "id": 1, 
      "note": "You're awesome!", 
      "timestamp": "Wed, 09 Jul 2014 19:50:10 GMT", 
      "user": {
        "href": "/api/user/1/", 
        "id": 1, 
        "name": "paxswill"
      }, 
      "value": 0.15, 
      "value_str": "15.0% bonus", 
      "void": {
        "timestamp": "Wed, 09 Jul 2014 19:58:00 GMT", 
        "user": {
          "href": "/api/user/1/", 
          "id": 1, 
          "name": "paxswill"
        }
      }
    }
  ], 
  "payout": "40000000.00", 
  "payout_str": "40,000,000.00", 
  "pilot": "Paxswill", 
  "status": "paid", 
  "submit_timestamp": "Wed, 09 Jul 2014 19:43:58 GMT", 
  "submitter": {
    "href": "/api/user/1/", 
    "id": 1, 
    "name": "paxswill"
  }, 
  "valid_actions": [
    "approved", 
    "evaluating"
  ]
}

XML

<?xml version="1.0" encoding="UTF-8" ?>
<response user="paxswill">
  <request id="39861569" status="paid">
    <payout>
      <base pretty="40,000,000.00">40000000.00</base>
      <computed pretty="40,000,000.00">40000000.00</computed>
    </payout>
    <details>I literally forgot how to broadcast for armor.</details>
    <pilot>
      <alliance>Test Alliance Please Ignore</alliance>
      <corporation>Dreddit</corporation>
      <name>Paxswill</name>
    </pilot>
    <submit-timestamp>2014-07-09T19:43:58.126158</submit-timestamp>
    <kill-timestamp>2014-07-02T19:26:00</kill-timestamp>
    <division id="1" name="Test Alliance" />
    <submitter id="1" name="paxswill" />
    <killmail-url>https://zkillboard.com/kill/39861569/</killmail-url>
    <url>/request/39861569/</url>
    <ship>Guardian</ship>
    <location>
      <system>WD-VTV</system>
      <constellation>UX3-N2</constellation>
      <region>Catch</region>
    </location>
    <actions>
      <action id="2" type="paid">
        <note></note>
        <timestamp>2014-07-10T06:37:09.242568</timestamp>
        <user id="1" name="paxswill" />
      </action>
      <action id="1" type="approved">
        <note>Good to go.</note>
        <timestamp>2014-07-09T19:58:56.524278</timestamp>
        <user id="1" name="paxswill" />
      </action>
    </actions>
    <modifiers>
      <modifier id="1">
        <note>You&#39;re awesome!</note>
        <user id="1" name="paxswill" />
        <value>15.0% bonus</value>
        <timestamp>2014-07-09T19:50:10.909394</timestamp>
        <void id="1" name="paxswill">
          <timestamp>2014-07-09T19:58:00.069323</timestamp>
        </void>
      </modifier>
    </modifiers>
  </request>
</response>