Raven Industries Slingshot API

API Key and Shared Secret

An API Key is issued by Raven to qualified ISV partners that intend on developing solutions using Slingshot data. A corresponding Shared Secret is issued at the same time. The API Key and the Shared Secret are a matched set and uniquely identify the ISV to Raven Industries, Inc. The API Key and Shared Secret are available only after a completed and signed ISV agreement has been executed.

A Shared Secret is known only to the ISV and Raven. It is the ISV's responsibility to protect the Shared Secret.

Top

Access Key

An Access Key is issued from Raven via the Slingshot Portal Server to Slingshot customers. A Slingshot portal account is required to request an Access Key. Access Keys are used to grant access to a customer's Slingshot data and are provided to ISV's by Slingshot customers and may be revoked by the Slingshot customer at any time.

Top

Authentication

All requests to the Slingshot API Server will contain the following custom HTTP headers:

X-SS-APIKey The API Key issued to the Slingshot developer from Raven.
X-SS-Signature The signature generated for this request using the Shared Secret issued by Raven to the ISV.
X-SS-AccessKey The Access Key issued to a Slingshot user from the Raven Slingshot Portal Server.
X-SS-TimeStamp The Unix-Style timestamp of when the request was generated; the number of seconds elapsed from midnight on Jan 1, 1970.

These header values, along with other key components of the request will be used to provide a signature that will verify the request. Details for generating this signature can be found later in this document.

All requests to the Slingshot API Server will be authenticated in 3 ways:

  1. The API Key will be verified against the Slingshot API database.
  2. The request will be validated via a HMAC SHA1 signature check of key components of the request to ensure that the request came from the owner of the API Key and that the request has not been tampered with.
  3. The request will have a valid lifetime of 120 seconds to prevent replay attacks.

If any of these checks fail, the Slingshot API server will respond with a 401 Unauthorized response. Details of what check failed may be returned in the body of the response.

Top

Authorization

After a request is authenticated, an authorization check will be performed using the Access Key that is part of the request. This Access Key will be used to control how much data will be returned to the client based on the account delegation configuration on the Slingshot Portal Server. An additional authorization check will be performed at the URI level to ensure that only the allowed HTTP verbs for each URI are being sent. Failed authorization attempts will result in one of the following responses:

  • 401 Unauthorized
  • 403 Forbidden
  • 405 Method Not Allowed

Top

Rate Limiting

In order to prevent abuse, all calls to the API are subject to a rate limit of 30 calls per every 60 seconds.

When a client has exceeded the number of API calls available during a rate limit window, all future requests will return a HTTP 429 status code.

All requests that are subject to rate limiting include the following headers that provide information about the current rate limit and the rate-limit window.

X-RateLimit-Limit The total number of requests that can be made during a rate-limit period.
X-RateLimit-Remaining The number of requests that may still be made before the rate limit is reset.
X-RateLimit-Reset The number of seconds before the rate limit is reset.

Top

Encryption

Every request to the production Slingshot API Servers must be encrypted via SSL.

Top

Generating the Signature

The most difficult part of building a proper request to the API is building the signature and signing it with a shared secret. In any language, a properly signed signature for the request should be generated using the following steps:

  1. Combine key components of the request into a single string, using a format where each value is followed by a carriage return and line feed character. The format is below:
    {Method}\r\n{Host}\r\n{URL}\r\n{Unix Timestamp}\r\n{API Key}\r\n{Access Key}\r\n
    The keywords (in curly braces) above should be replaced with the following:
    Method HTTP Method in ALL CAPS (e.g. GET, PUT, POST, DELETE, HEAD, OPTIONS).
    Host Host name of server in lower case (e.g. api.ravenslingshot.com).
    URL Absolute URI minus query string in lower case (e.g. /fieldcomputers/460/PrescriptionMaps).
    Unix Timestamp Unix style timestamp of the request (number of seconds since midnight on Jan 1 1970).
    API Key Slingshot API Key in the case in which it was generated.
    Access Key Slingshot Access Key in the case in which it was generated.
  2. Generate an HMAC (Hash-based Message Authentication Code) using the SHA1 algorithm from the string constructed above and a 'shared secret' key.
  3. The generated HMAC should then be passed along to the Slingshot API Server as the value of the X-SS-Signature request header. When the Slingshot API Server receives the request, it will do the same using the Shared Secret that matches the API Key specified in the request. If the two HMAC signatures match, the request will be considered authentic.

Examples

A function for building the signature is shown in various languages below. You can test your implementation by making sure the function produces an output of EssUFos9uCpS1FFUFaPTE3Qucz0= when provided the following strings (all encoded as UTF8):

Method GET
Host host.company.com
URL /absolute/path
Unix Timestamp 1234567890
API Key 071X7Hc9zdfElbB2fUqQVjAQ3BsOPa4F9l3yqekl
Access Key 00000000-0000-0000-0000-000000000000
Shared Secret RecQ1RrXLNP/WnMqrJsj5WsuXNDmCOoCg3AV85DQ

C#

private static string CalculateSignature(string sharedSecret,
                                         string method,
                                         string url,
                                         string host,
                                         string apiKey,
                                         string accessKey,
                                         string timestamp)
{
    string signatureBlockTemplate = "{0}\r\n{1}\r\n{2}\r\n{3}\r\n{4}\r\n{5}\r\n";
    string blockToSign = String.Format(signatureBlockTemplate,
                                       method.ToUpperInvariant(),
                                       host.ToLowerInvariant(),
                                       url.ToLowerInvariant(),
                                       timestamp,
                                       apiKey,
                                       accessKey);

    using (HMACSHA1 hmacsha1 = new HMACSHA1())
    {
        Encoding encoder = new UTF8Encoding();
        hmacsha1.Key = Convert.FromBase64String(sharedSecret);
        byte[] hmacsig = hmacsha1.ComputeHash(encoder.GetBytes(blockToSign));
        return Convert.ToBase64String(hmacsig);
    }
}
    

Java

private String CalculateSignature(String sharedSecret,
                                  String method,
                                  String url, String host,
                                  String apiKey,
                                  String accessKey,
                                  String timestamp) throws java.security.SignatureException
{
    private String signatureBlockTemplate = "%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n";
    String blockToSign = String.format(signatureBlockTemplate,
                                       method.toUpperCase(Locale.US),
                                       host.toLowerCase(Locale.US),
                                       url.toLowerCase(Locale.US),
                                       timestamp,
                                       apiKey,
                                       accessKey);
    String result;

    try
    {
        // get an hmac_sha1 key from the raw key bytes
        SecretKeySpec signingKey =
            new SecretKeySpec(com.ss.sscompanion.utilities.Base64.decode(sharedSecret),
                              HMAC_SHA1_ALGORITHM);

        // get an hmac_sha1 Mac instance and initialize with the signing key
        Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);
        mac.init(signingKey);

        // compute the hmac on input data bytes
        byte[] rawHmac = mac.doFinal(blockToSign.getBytes());

        // base64-encode the hmac
        result = com.ss.sscompanion.utilites.Base64.encodeBytes(rawHmac);
    }
    catch (Exception e)
    {
        throw new SignatureException("Failed to generate HMAC : " + e.getMessage());
    }
    return result;
}
    

PHP

        private function calculateSignature($sharedSecret,
                                            $method,
                                            $url,
                                            $host,
                                            $apiKey,
                                            $accessKey,
                                            $timestamp)
        {
            $signatureBlock =
                sprintf("%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n",
                    strtoupper($method),
                    $host,
                    strtolower($url),
                    $timestamp,
                    $apiKey,
                    $accessKey);

            return base64_encode(hash_hmac('sha1', $signatureBlock, base64_decode($sharedSecret, true), true));
        }
    
Top

Result Set Paging

Result set paging is supported for some API calls. The number of results returned and the relative starting offset of the result set is controlled by the following parameters:

HTTP Query Parameters
pageSize The number of records to return in this request. If omitted, the default value is 20. We deprecated setting a pageSize of 0 to return a complete and un-paged result set. We recommend a maximum page size of no more than 1000 to improve performance
page The index of the result page to return. If omitted, the default value is 0.
Result Fields
TotalCount The total number of records in the list being returned.
PageSize The number of records returned in this request. This is controlled by the optional query string parameter "pageSize".
IsPreviousPage A boolean value indicating if there are any pages prior to the current page in this list.
IsNextPage A boolean value indicating if there are any pages after the current page in this list.
PageIndex The index of the current page. The page index is zero based and has a maximum value of ([TotalPages] - 1). This is controlled by the optional query string parameter "page".
TotalPages The total number of pages in this list given the [TotalCount] and [PageSize].
Top

Differences from Prior Versions

There are several notable differences between the current version of the Slingshot API and prior releases:

  • Using the pageSize HTTP query parameter, it is now possible to retrieve a complete paged result set.
  • Requests for an invalid URI return an HTTP 404 result. The prior verison of the API returned an HTTP 500 result.
  • This release implements a subset of the prior API release's functionality (i.e. only the API calls documented herein have been implemented and are available for use).
  • Call throttling has been implemented. Exceeding 15 API requests in any 30 second window will result in the return of an HTTP 429 result.

Top

SlingshotIndex

Response Types

The Slingshot API server has three major response types: SlingshotIndex, SlingshotResponse, and Binary Data.

SlingshotIndex

The SlingshotIndex response is used to return any list of items. The header of the XML is included below:

    
    
      4
      20
      false
      false
      0
      1
    
    

Data Description

  • TotalCount - The total number of records in the list being returned.
  • PageSize - The number of records returned in this request. This is controlled by the optional query string parameter pageSize.
  • IsPreviousPage - A Boolean value indicating if there are any pages prior to the current page in this list.
  • IsNextPage - A Boolean value indicating if there are any pages after the current page in this list.
  • PageIndex - The index of the current page. The page index is zero based and has a max value of TotalPages -1. This is controlled by the optional query string parameter page.
  • TotalPages - The total number of pages in this list given the TotalCount and PageSize.

The rest of the SlingshotIndex response consists of summary items of the type being asked for (Field Computers, Prescription Maps, or Job Data). These entries are represented by the following XML fragment:

    
      1449
      Job from Field
      https://api.ravenslingshot.com/{nameofitem}/1449
     Subordinate type of object
    
    

Data Description

  • NameOfItem - the value of this tag will be one of: FieldComputer, PrescriptionMap, JobData, or FieldHub.
  • ID - The internal ID of the item.
  • Name - The name of the item given to it by a Slingshot user.
  • URI - the URI that can be used to retrieve more details about the item.
  • SubType - only applicable to PerscriptionMap and JobData. Contains additional information about the item. For JobData items, this will contain either 'Planter', 'Sprayer', 'Yield' or Planter/Sprayer. For PrescriptionMap items, this will contain 'Prescription Map'.
Top

SlingshotResponse

Response Types

The Slingshot API server has three major response types: SlingshotIndex, SlingshotResponse, and Binary Data.

SlingshotResponse

The SlingshotResponse response is used in two situations:

  • An error response where the server returns a 4XX or 5XX HTTP response.
  • The server needs more time to process a request where the server returns a 200 HTTP response.

The SlingshotResponse response is represented by the following XML:

    
      
      INVALID_REQUEST
      Could not send file to Field Computer
      
      
      
    

Data Description

    • status - The overall status of the response. Values include, but are not limited to.
    • INVALID_REQUEST something in the request was incorrect. The API client should use the HTTP status code to help determine what is wrong with the request.
    • MORE_TIME_NEEDED The Slingshot API server needs more time to complete the request. The API client should consult the Retry-After HTTP header to find out how many seconds it should wait before attempting to retrieve the data again.
  • errorInfo - Contains text that can be displayed to the user.
  • result - When result has a value, it will contain details that can be sent to Raven support for further debugging.
Top

Binary Data

When an API client requests files from the Slingshot API Server, the server will respond with the binary data of the file in the response body. The server will also indicate the suggested file name via the standard HTTP header Content-Disposition. The server will indicate the type of binary data via the standard HTTP header Content-Type.

Top

Service Unavailable

An error response where the server returns a 503 HTTP response indicating database issues.
The response will be a string "Resources exhausted. Try again.".
This means there is some database issue and the user needs to wait for some time before making further requests.

Top

XML Format

If you prefer XML, you can set the standard http header Accept to the value 'text/xml' and the Slingshot API server will send all non-binary respones to your client in XML format. Example below shows how you can set the Accept header in your code.

C#

    HttpWebRequest httpWebRequest;
    httpWebRequest = WebRequest.Create(
        new Uri("https://api.ravenslingshot.com/FieldHubs") as HttpWebRequest;
    httpWebRequest.Accept = "text/xml";
    httpWebRequest.Method = WebRequestMethods.Http.Get;
    

Examples

Slingshot Index

Example of a simple SlingshotIndex in XML

    
        
          141
          2
          false
          true
          0
          71
          
            12345678901
            Field Hub 1
            https://api.ravenslingshot.com/FieldHubs/12345678901
          
          
            12345678902
            Field Hub 2
            https://api.ravenslingshot.com/FieldHubs/12345678902
          
        
    
Slingshot Response

Example of a Slingshot Response in XML

        
        
          INVALID_REQUEST
          Item does not exist
          
        
    
Top

JSON Format

If you prefer JSON, you can set the standard http header Accept to the value 'application/json' and the Slingshot API server will send all non-binary respones to your client inJSON format. Example below shows how you can set the Accept header in your code.

C#

    HttpWebRequest httpWebRequest;
    httpWebRequest = WebRequest.Create(
    new Uri("https://api.ravenslingshot.com/FieldHubs") as HttpWebRequest;
    httpWebRequest.Accept = "application/json";
    httpWebRequest.Method = WebRequestMethods.Http.Get;
    

Examples

Slingshot Index

Example of a simple SlingshotIndex in JSON

    {
       "FieldHub" : [
        {
          "ID" : "12345678901",
          "Name" : "Field Hub 1",
          "Uri" : "https://api.ravenslingshot.com/FieldHubs/12345678901"
        },
        {
          "ID" : "12345678902",
          "Name" : "Field Hub 2",
          "Uri" : "https://api.ravenslingshot.com/FieldHubs/12345678902"
        } ],
        "TotalCount" : 141,
        "PageSize" : 2,
        "IsPreviousPage" : false,
        "IsNextPage" : true,
        "PageIndex" : 0,
        "TotalPages" : 72
    }
    
Slingshot Response

Example of a Slingshot Response in JSON

        {
            "status" : "INVALID_REQUEST",
            "errorInfo" : "Item does not exist"
        }
    
Top

Compressed Responses

Requesting and Receiving Compressed Responses

The Slingshot API supports the compression of JSON / XML responses. If you would like to use compression, set the standard http header 'Accept-Encoding' to either 'gzip' or 'deflate' and the Slingshot API server will compress the data before sending it to your client.

Requesting Compressed Responses

The following code sample shows how to set the 'Accept-Encoding' header to ask the Slingshot API for compressed responses.

    HttpWebRequest httpWebRequest;
    httpWebRequest =
    HttpWebRequest.Create("https://api.ravenslingshot.com/FieldHubs")
    as HttpWebRequest;
    httpWebRequest.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip");
    

Reading Compressed Responses

The following code sample shows how to check for a compressed response and decompress it.

C#

    //This sample merely dumps the response to the console.
    //Chage the Decompress.CopyTo target to your preferred stream
    string contentEncoding = resp.Headers["Content-Encoding"];
    if (String.IsNullOrEmpty(contentEncoding))
    {
        Console.WriteLine(resp.Content.ReadAsString());
    }
    else
    {
        if (contentEncoding.ToUpperInvariant().Contains("GZIP"))
        {
            using (GZipStream Decompress =
                new GZipStream(resp.Content.ReadAsStream(),
                CompressionMode.Decompress))
            {
                // Copy the decompression stream
                // into the output file.
                Decompress.CopyTo(Console.OpenStandardOutput());
            }
            Console.WriteLine();
        }
        else if (contentEncoding.ToUpperInvariant().Contains("DEFLATE"))
        {
            using (DeflateStream Decompress =
                new DeflateStream(resp.Content.ReadAsStream(),
                CompressionMode.Decompress))
            {
                // Copy the decompression stream
                // into the output file.
                Decompress.CopyTo(Console.OpenStandardOutput());
            }
            Console.WriteLine();
        }
        else
        {
            Console.WriteLine("compression method {0} not supported", contentEncoding);
        }
    }
    

Php

    $curl = curl_init();//initialize curl

    curl_setopt($curl, CURLOPT_URL, "https://api.ravenslingshot.com/FieldHubs");

    curl_setopt($curl, CURLOPT_HEADER, false);//false - truncates the header from the response (if you want header set it to true)
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    //prepare header
    $header = array();
    array_push($header, 'X-SS-APIKey: '. 'yourApiKey');
    array_push($header, 'X-SS-AccessKey: '. 'yourAccessKey');
    array_push($header, 'X-SS-TimeStamp: '. 'yourTimestamp');
    array_push($header, 'X-SS-Signature: '.'yourSignature');

    //request for compressed reponse
    array_push($header, 'Accept-Encoding: gzip');
    curl_setopt($curl, CURLOPT_HTTPHEADER, $header);

    //make the call
    $curl_response = curl_exec($curl);

    //uncompress the data
    $uncompressed  = gzdecode($curl_response);

    //pretty print
    echo "
".htmlentities($uncompressed)."
"; //close curl connection curl_close($curl);
Top

Job Data by types

For any type of job you will get the following details:
Field name Data type Unit\Format Description
Device File Name nvarchar(100) The name of the job file as it was saved on the field computer
Create Date Datetime UTC - YYYY-MM-DDTHH:MM:SSZ The date / time (in UTC) of when the file was uploaded to slingshot
Update Date Datetime UTC - YYYY-MM-DDTHH:MM:SSZ The date / time in UTC) of the most recent update the slingshot system made to this file
Status String NA The state of the file in the slingshot system.
Possible status values
CONVERSION_STATUS_SUCCESS:Success
CONVERSION_STATUS_FAILED:General error, no detail available
CONVERSION_STATUS_SERVER_ERR:Internal server error
CONVERSION_STATUS_SERVER_RESTART:Server has restarted
CONVERSION_STATUS_FILE_NOT_FOUND:Cannot access the source file
CONVERSION_STATUS_FAILED_CONVERT:Conversion utility returned a failed status
CONVERSION_STATUS_INVALID_JOB_DATA_FILE:Conversion utility returned a failed status
Job Type nvarchar(50) NA One of Yield, AsApplied, or Planter
Available Files String NA List of URLs that can be used to download more information about this job (shape files, rad file)
ID int NA Internal record id of this job data
File Name nvarchar(100 NA The base file name for this job (Planter and Yield)
Job Name nvarchar(100 NA The base file name for this job (Sprayer)
Start Date Datetime UTC - YYYY-MM-DDTHH:MM:SS The date / time of when the job was started on the field computer (only as accurate as the field computer date / time settings)
End Date Datetime UTC - YYYY-MM-DDTHH:MM:SS The date / time of when the job was ended on the field computer (only as accurate as the field computer date / time settings)
Software Version nvarchar(50) NA Should be set to the version string of the field computer, but is often empty

Based upon the job type of the job id specified you will get:

Sprayer

Field name Data type Unit\Format Description
Customer Name nvarchar(50) NA Free form text value on field computer
Customer Address nvarchar(100) NA Free form text value on field computer
Customer Number nvarchar(50) NA Free form text value on field computer
Operator Name nvarchar(50) NA Free form text value on field computer
Operator Address nvarchar(50) NA Free form text value on field computer
Operator License nvarchar(50) NA Free form text value on field computer
Field Name nvarchar(50) NA Free form text value on field computer
Field Section nvarchar(50) NA Free form text value on field computer
Field County nvarchar(50) NA Free form text value on field computer
Field Township nvarchar(50) NA Free form text value on field computer
Field Crop nvarchar(50) NA Free form text value on field computer
Field Area nvarchar(50) NA Free form text value on field computer
Application Type nvarchar(50) NA Free form text value on field computer
Soil Condition nvarchar(50) NA Free form text value on field computer
Moisture nvarchar(50) NA Free form text value on field computer
Tip Size nvarchar(50) NA Free form text value on field computer
Average Speed nvarchar(50) meter per second The average speed of the job in m/s
Weather Observation Time nvarchar(50) NA Free form text value on field computer
Weather Temperature nvarchar(50) NA Free form text value on field computer
Weather Wind Speed nvarchar(50) NA Free form text value on field computer
Weather Humidity nvarchar(50) NA Free form text value on field computer
Weather Wind Direction nvarchar(50) NA Free form text value on field computer
List of products for this job.
Each product has the following fields.
ID int NA Internal id of the product in slingshot
Product Number int NA The sequential id of the products in this job (0 based)
Product Name nvarchar(50) NA The name of the product as the operator entered it
Applied Volume float NA The total volume of the product applied (units come from how the field computer is configured)
Applied Area float square meter The total area that this product was applied
Target Rat float NA The target rate for this product (units come from how the field computer is configured)
Target Rate Min float NA The minimum rate this product was applied (units come from how the field computer is configured)
Target Rate Max float NA The maximum rate this product was applied (units come from how the field computer is configured)
Geospatial Min Value float
Geospatial Max Value float
Geospatial Avg Value float
Geospatial Acres float
Is Mixed bit NA Boolean value indicating if this product is mixed
List of ingredients for this product
(included if Is Mixed value is TRUE). Each ingredient has the following:
ID int NA Internal id of this ingredient
Name nvarchar(50) NA Text entered by operator
Manufacturer nvarchar(50) NA Text entered by operator
EPA Number nvarchar(50) NA Text entered by operator
Target Pests nvarchar(50) NA Text entered by operator
Mix Ratio nvarchar(50) NA Text entered by operator

Planter

Field name Data type Unit\Format Description
List of products for this job.
Each product has the following
ID int NA Internal id of the product in slingshot
Product name nvarchar(100) NA The name of the product as entered into the field computer screens
Applied area float square meter The total area of the job
Target Rate float NA The target rate for this product (units are however the field computer is configured)
Target Minimum float NA The minimum rate that was used for this product (units are however the field computer is configured)
Target Maximum float NA The maximum rate that was used for this product (units are however the field computer is configured)
Average Weight per Area float kg / ha The average weight per area (in kg / ha)
List of applied product for the products.
Each applied product has the following:

Field name Data type Unit\Format Description
ID int N/A Product sequential number
Type string N/A Applied Product type
Brand string N/A Applied Product provider
Variety string N/A Applied Product name
Row int Comma Separated Values List of implement positions used for the applied product

Yield

Field name Data type Unit\Format Description
List of products for this job
. Each product has the following
ID int NA Internal id of the product in slingshot
Product Name nvarchar(100) NA The name of the product as entered into the field computer screens
Applied Area float square meter The total area of the job
Total Weight float kg The total weight (in kg) of the job
Total Bushels float bushels The total volume
Average Weight per Area float kg / ha The average weight per area (in kg / ha)
Top

Field Hub Data Types and Definitions

Quick Overview

Most of the Field Hub related API calls will return data that is coming into the Slingshot system from the Field Hub itself. This page will help you to interpret these values.

  • Field Name: Active
    • Description: Indicates whether or not the Field Hub is currently reporting into the Slingshot system.
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes:
  • Field Name: Valid
    • Description: Indicates if the Field Hub is currently reporting a valid GPS position.
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes:
  • Field Name: Lat
    • Description: Latitude
    • Data Type: decmial
    • Units: decimal degrees
    • Range: -90.0 to 90.0
    • Notes:
  • Field Name: Lon
    • Description: Longitude
    • Data Type: decimal
    • Units: decimal degrees
    • Range: -180.0 to 180.0
    • Notes:
  • Field Name: Alt
    • Description: Altitude
    • Data Type: 32 bit Integer
    • Units: meters relative to sea level
    • Range: -2147483648 to 2147483647
    • Notes: Treated as 32 bit integer in API, practical values will come from a much narrower range.
  • Field Name: Speed
    • Description: Speed over ground
    • Data Type: byte
    • Units: kilometers per hour (kmph)
    • Range: 0 to 255
    • Notes:
  • Field Name: Direction
    • Description: Course over ground
    • Data Type: 32 bit Integer
    • Units: track angle degrees
    • Range: 0 to 360
    • Notes:
  • Field Name: GPSSat
    • Description: Number of satellites Field Hub is tracking.
    • Data Type: byte
    • Units: N/A
    • Range: 0 to 255
    • Notes: The upper limit is determined by number of GPS satellites actually orbiting the planet.
  • Field Name: GPSDateTime
    • Description: Time Stamp as reported by the GPS in the Field Hub.
    • Data Type: DateTime
    • Units: N/A
    • Range: '1000-01-01 00:00:00' UTC to '9999-12-31 23:59:59' UTC
    • Notes: Practical values will be in recent time periods; can be null. Formatted as 'YYYY-MM-DDTHH:mm:ssZ'. This value is in UTC.
  • Field Name: ID
    • Description: Unique id for this record; can be used by your program to determine if this record has already been downloaded / processed.
    • Data Type: 64 bit Integer
    • Units: N/A
    • Range: 0 to 9223372036854775807
    • Notes:
  • Field Name: Event
    • Description: The event that triggered the Field Hub report
    • Data Type: String
    • Units: N/A
    • Range: "1", "2", "3", "4", "5", "16", "17", "30", "31"
    • Notes:
    1 - Digital Input 1 state change
    2 - Digital Input 2 state change
    3 - Digital Input 3 state change
    4 - Digital Input 4 state change
    5 - 5 second update
    16 - Ignition Power On
    17 - Ignition Power Off
    30 - 30 second update
    31 - 30 second upate
  • Field Name: DeviceId
    • Description: This is the actual Device ID
    • Data Type: String
    • Units: N/A
    • Range: N/A
    • Notes:
  • Field Name: GPSFix
    • Description: Indicates if the GPS antenna is 'fixed' onto a group of satellites.
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false Notes:
  • Field Name: RSSI
    • Description: Receive Signal Strength Indicator in dBm
    • Data Type: Signed Byte
    • Units: dBm
    • Range: -103.0 to -85.0
    • Notes:
      RSSI >= -85.0 → 5 bars
      -85.0 > RSSI >= -90.0 → 4 bars
      -90.0 > RSSI >= -95.0 → 3 bars
      -95.0 > RSSI >= -100.0 → 2 bars
      -100.0 > RSSI >= -103.0 → 1 bar
      -103.0 > RSSI → 0 bar
  • Field Name: Ignition
    • Description: Ignition State
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes:
  • Field Name: DigitalInput1
    • Description: State of Digital Input 1 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: DigitalInput2
    • Description: State of Digital Input 2 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: DigitalInput3
    • Description: State of Digital Input 3 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: DigitalInput4
    • Description: State of Digital Input 4 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: AnalogInput1
    • Description: Value received on Analog Input 1 on the back of the Field Hub
    • Data Type: Double
    • Units: N/A
    • Range: 0.0 to 15.0
    • Notes: Interpretation is application specific
  • Field Name: AnalogInput2
    • Description: Value received on Analog Input 2 on the back of the Field Hub
    • Data Type: Double
    • Units: N/A
    • Range: 0.0 to 15.0
    • Notes: Interpretation is application specific
  • Field Name: AnalogInput3
    • Description: Value received on Analog Input 3 on the back of the Field Hub
    • Data Type: Double
    • Units: N/A
    • Range: 0.0 to 15.0
    • Notes: Interpretation is application specific
  • Field Name: AnalogInput4
    • Description: Value received on Analog Input 4 on the back of the Field Hub
    • Data Type: Double
    • Units: N/A
    • Range: 0.0 to 15.0
    • Notes: Interpretation is application specific
  • Field Name: BatteryVoltage
    • Description: Value of the voltage as measured on the Field Hub power input connection
    • Data Type: Double
    • Units: volts
    • Range: 0.0 to 30.0
    • Notes:
  • Field Name: DigitalOutput1
    • Description: State of Digital Output 1 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: DigitalOutput2
    • Description: State of Digital Output 2 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: DigitalOutput3
    • Description: State of Digital Output 3 on the back of the Field Hub
    • Data Type: Boolean
    • Units: N/A
    • Range: true or false
    • Notes: Interpretation is application specific
  • Field Name: ServerDateTime
    • Description: The UTC Date and Time of when the record was written to the Slingshot system.
    • Data Type: DateTime
    • Units: N/A
    • Range: '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC
    • Notes: Practical values will be in recent time periods; can be null. Formatted as 'YYYY-MM-DDTHH:mm:ssZ'. This value is in UTC.
  • Field Name: Odometer
    • Description: Distance the Field Hub has traveled in hectometers.
    • Data Type: Unsigned 32 bit Integer
    • Units: hectometers
    • Range: 0 to 4294967295
    • Notes: This is calculated from the distance the Field Hub has traveled between fixed GPS locations.
  • Field Name: Service
    • Description: The name of the service the Field Hub is currently using.
    • Data Type: String
    • Units: N/A
    • Range: N/A
    • Notes: This value comes directly from the Field Hub. Some values we've seen are: "", "NONE", "1xRTT", "EVDO", "EVDO.A", "GPRS", "EDGE", "UMTS", and "HSPA".
  • Field Name: Carrier
    • Description: The name of the wireless carrier the Field Hub is currently using.
    • Data Type: String
    • Units: N/A
    • Range: N/A
    • Notes: This value comes directly from the Field Hub. Some values we've seen are: "AT&T", "Bell", and "Verizon".
  • Field Name: Roam
    • Description: An indicator that the Field Hub is in 'Roaming' mode, as determined by the Field Hub.
    • Data Type: String
    • Units: N/A
    • Range: N/A
    • Notes:

"" - Roaming status cannot be determined. "00" - Field Hub is not roaming. Any other value - Field Hub is roaming.

Top

Field Computer - Summary

When accessing /FieldComputers URI via GET, the Slingshot API Server will return an XML document that contains the summary data of all Field Computers that are assigned to the API Key and Access Key contained in the request headers. This data will contain URI values that point to the details for each Field Computer in the list.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



    6
    1000
    false
    false
    0
    1
    
        6565
        30Nov2012
        https://api.ravenslingshot.com/fieldcomputers/6565
    
    
        6056
        3-7-0-73
        https://api.ravenslingshot.com/fieldcomputers/6056
    
    
        5886
        9-12-12
        https://api.ravenslingshot.com/fieldcomputers/5886
    
    
        5780
        30Aug2012
        https://api.ravenslingshot.com/fieldcomputers/5780
    
    
        5718
        24Aug2912
        https://api.ravenslingshot.com/fieldcomputers/5718
    
    
        5075
        5057-3
        https://api.ravenslingshot.com/fieldcomputers/5075
    
            

JSON

{
    "FieldComputer" : [
        {
            "ID" : 6565,
            "Name" : "30Nov2012",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/6565"
        },
        {
            "ID" : 6056,
            "Name" : "3-7-0-73",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/6056"
        },
        {
            "ID" : 5886,
            "Name" : "9-12-12",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/5886"
        },
        {
            "ID" : 5780,
            "Name" : "30Aug2012",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/5780"
        },
        {
            "ID" : 5718,
            "Name" : "24Aug2912",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/5718"
        },
        {
            "ID" : 5075,
            "Name" : "5057-3",
            "Uri" : "https://api.ravenslingshot.com/fieldcomputers/5075"
        }
    ],
    "TotalCount" : 6,
    "PageSize" : 20,
    "IsPreviousPage" : false,
    "IsNextPage" : false,
    "PageIndex" : 0,
    "TotalPages" : 1
}            
Top

Field Computer - Detail

When accessing /FieldComputers/{id} via GET, the Slingshot API Server will respond with a Field Computer Details XML document that describes the details of the Field Computer identified by {id}. The FieldHubID is only available on Viper version 3.4.0.26 and newer and EPro version 3.2.0.24 and newer. FieldHubID identifies the ID of the last field hub that was connected to that field computer.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/{id}
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldComputers URI.
HTTP Query Parameters
None
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



    6565
    30Nov2012
    Viper Pro
    Not In Job
    false
    false
    09613471299
    2012-11-30T19:59:57Z
            

JSON

{
    "ID" : 6565,
    "Name" : "30Nov2012",
    "DeviceType" : "Viper Pro",
    "Status" : "Not In Job",
    "RemoteAccess" : false,
    "WebAccess" : false,
    "FieldHubID" : "09613471299",
    "LastReportDate" : "2012-11-30T19:59:57Z"
}            
Top

Field Computer - Prescription Maps

Each Field Computer can have many files associated with it. Some of these files come from the Field Computer itself such as As Applied Files and Yield Data (referred to as Job Data by the API). Others are sent to the Field Computer, such as Prescription Maps, AgX recommendations and work orders. The Slingshot API provides methods for manipulating the Field Computer associations of these files.

When accessing /FieldComputers/{id}/PrescriptionMaps via GET, the Slingshot API Server will return an XML document that contains the URIs of the files that were sent to this Field Computer. Additional details regarding these files can be retrieved by issuing a GET request on any of these returned URIs. Files that are queued for delivery but not yet delivered will not be displayed by default. Note that maps will remain queued in Slingshot until the Field Computer is powered up and online at which time Slingshot will deliver the queued files to the Field Computer. To view queued information, include state=queued query parameter
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/{id}/prescriptionmaps
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldComputers URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
state [Optional] queued or validated (default)
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  3
  20
  false
  false
  0
  1
  
    8131950
    carrier1.zip
    https://api.ravenslingshot.com/PrescriptionMaps/8131950
    Prescription Map
  
            

JSON

{
	"TotalCount" : 3,
	"PageSize" : 20,
	"IsPreviousPage" : false,
	"IsNextPage" : false,
	"PageIndex" : 0,
	"TotalPages" : 1,
	"PrescriptionMap" : [
		{
			"ID" : 8131950,
			"Name" : "carrier1.zip",
			"Uri" : "https://api.ravenslingshot.com/PrescriptionMaps/8131950",
			"SubType" : "Prescription Map"
		}
	]
}            
Top

Field Computer - Job Data

Each Field Computer can have many files associated with it. Some of these files come from the Field Computer itself such as As Applied Files and Yield Data (referred to as Job Data by the API). Others are sent to the Field Computer, such as Prescription Maps. The Slingshot API provides methods for manipulating the Field Computer associations of these files.

When accessing /FieldComputers/{id}/JobData via GET, the Slingshot API Server will return an XML document that contains the URIs of the Job Data Files that are associated with this Field Computer. Additional details regarding these Job Data Files can be retrieved by issuing a GET request on any of these returned URIs.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/{id}/jobdata
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldComputers URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
minid [Optional] Minimum file ID in results.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  8
  20
  false
  false
  0
  1
  
    7923138
    Boom Switches.jdp.zip
    https://api.ravenslingshot.com/JobData/7923138
    As Applied
  
  
    7922473
    Boom Switches.jdp.zip
    https://api.ravenslingshot.com/JobData/7922473
    As Applied
  
            

JSON

{
	"JobData" : [
		{
			"ID" : 7923138,
			"Name" : "Boom Switches.jdp.zip",
			"Uri" : "https://api.ravenslingshot.com/JobData/7923138",
			"SubType" : "As Applied"
		},
		{
			"ID" : 7922473,
			"Name" : "Boom Switches.jdp.zip",
			"Uri" : "https://api.ravenslingshot.com/JobData/7922473",
			"SubType" : "As Applied"
		}
	],
	"TotalCount" : 8,
	"PageSize" : 20,
	"IsPreviousPage" : false,
	"IsNextPage" : false,
	"PageIndex" : 0,
	"TotalPages" : 1
}            
Top

Field Computer - Current Location for All

A Field Computer registers its GPS location every five minutes.
When accessing /FieldComputers/all/CurrentLocation via GET, the Slingshot API Server will return an XML document that contains the most recent location of all the field computers that are assigned to the API Key and Access Key contained in the request headers.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/all/currentlocation
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    114871
    9940
    Field Computer
    0
    0
    0
    0
    0
    false
    0000-00-00 00:00:00
  
            

JSON

{
    "DeviceLocation": [
        {
            "ID": "114871",
            "DeviceId": "9940",
            "SubType": "Field Computer",
            "Lat": 0,
            "Lon": 0,
            "Alt": 0,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "0000-00-00 00:00:00"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Computer - Current Location for One

A Field Computer registers its GPS location every five minutes.
When accessing /FieldComputers/:id/CurrentLocation via GET, the Slingshot API Server will return an XML document that contains the most recent location of the Field Computer identified by {id}.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/{id}/currentlocation
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldComputers URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    114871
    9940
    Field Computer
    0
    0
    0
    0
    0
    false
    0000-00-00 00:00:00
  
            

JSON

{
    "DeviceLocation": [
        {
            "ID": "114871",
            "DeviceId": "9940",
            "SubType": "Field Computer",
            "Lat": 0,
            "Lon": 0,
            "Alt": 0,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "0000-00-00 00:00:00"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Computer - All Locations for One

A Field Computer registers its GPS location every five minutes.
When accessing /FieldComputers/:id/Locations via GET, the Slingshot API Server will return an XML document that contains all the locations that have been registered for the Field Computer identified by {id}.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldcomputers/{id}/locations
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldComputers URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML


  8
  20
  false
  false
  0
  1
  
    114871
    9940
    Field Computer
    0
    0
    0
    0
    0
    false
    0000-00-00 00:00:00
  
  
    114870
    9940
    Field Computer
    0
    0
    0
    0
    0
    false
    0000-00-00 00:00:00
  
            

JSON

{
    "DeviceLocation": [
        {
            "ID": "114871",
            "DeviceId": "9940",
            "SubType": "Field Computer",
            "Lat": 0,
            "Lon": 0,
            "Alt": 0,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "0000-00-00 00:00:00"
        },
        {
            "ID": "114870",
            "DeviceId": "9940",
            "SubType": "Field Computer",
            "Lat": 0,
            "Lon": 0,
            "Alt": 0,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "0000-00-00 00:00:00"
        }
    ],
    "TotalCount": 8,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Prescription Maps - Summary

HTTP Method and URL
GET https://api.ravenslingshot.com/prescriptionmaps
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  24
  2
  false
  true
  0
  12
  
    7804749
    PrescriptionMap.zip
    https://api.ravenslingshot.com/PrescriptionMaps/7804749
    Prescription Map
  
            

JSON

{
	"TotalCount" : 24,
	"PageSize" : 2,
	"IsPreviousPage" : false,
	"IsNextPage" : true,
	"PageIndex" : 0,
	"TotalPages" : 12,
	"PrescriptionMap" : [
		{
			"ID" : 7804749,
			"Name" : "PrescriptionMap.zip",
			"Uri" : "https://api.ravenslingshot.com/PrescriptionMaps/7804749",
			"SubType" : "Prescription Map"
		},
		{
			"ID" : 7798049,
			"Name" : "PrescriptionMap.zip",
			"Uri" : "https://api.ravenslingshot.com/PrescriptionMaps/7798049",
			"SubType" : "Prescription Map"
		}
	]
}            
Top

Prescription Maps - Detail

When accessing /PrescriptionMaps/{id} via GET, the Slingshot API Server will respond with a XML/json document that contains the details of the file.
If the request has a query parameter 'format' for example /PrescriptionMaps/{id}?format=bin then the API will respond with a zip file that contains the details of the Prescription Map identified by {id} and the format indicated by the format query string parameter. The AgX format is not supported and the RAD format cannot be downloaded any more.

The {id} portion of the URI is taken from the XML Document returned by a GET request to the /PrescriptionMaps URI.

HTTP Method and URL
GET https://api.ravenslingshot.com/prescriptionmaps/:id
URL Parameters
None
HTTP Query Parameters
None
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  Roundup.zip
  2013-04-30T19:54:01.873Z
  2013-04-30T19:54:39.057Z
  SENT_TO_DEVICE
  PrescriptionMap
  
    
      Roundup.zip
      https://api.ravenslingshot.com/PrescriptionMaps/8750738?format=bin
      bin
    
  
            

JSON

{
	"DeviceFileName" : "Roundup.zip",
	"CreateDate" : "2013-04-30T19:54:01.873Z",
	"UpdateDate" : "2013-04-30T19:54:39.057Z",
	"Status" : "SENT_TO_DEVICE",
	"JobType" : "PrescriptionMap",
	"AvailableFiles" : [
		{
			"FileName" : "Roundup.zip",
			"Uri" : "https://api.ravenslingshot.com/PrescriptionMaps/8750738?format=bin",
			"FileType" : "bin"
		}
	]
}            
Top

Prescription Maps - Upload

When accessing /PrescriptionMaps via POST, if the FileType is 'RX' the Slingshot API Server will expect the request body to consist of a compressed container (a ZIP file) that contains a single shape file presented as *.shp, *.shx, *.dbf. Complex file with multiple shape files zipped into a single archive is not supported by the API. If the FileType is AGX then the file can either be a simple or complex file and must have .rdp.zip extension.

Queuing prescription maps or recommendations with the same name to a legacy device (Envizio Pro or Viper Pro) will fail and only the first file will transfer. Sending a file to a legacy device that already contains a file with the same name will cause the file to be overwritten.

The request body should be encoded using multipart/form-data standards with the following entry defined:

  • FileName: this entry will contain the file contents as well as the name of the file
  • FileType: this entry will indicate the type of data contained in the ZIP file, e.g. "AGX" or "RX"

If successful, the Slingshot API Server will respond with a HTTP 201 Created message and the URI of the newly created Prescription Map. The returned URI can be used to retrieve the details of the Prescription Map.
Sample POST Request

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------12217651423230
Content-Length: 40351

-----------------------------12217651423230
Content-Disposition: form-data; name="FileName"; filename="SampleRxMap.zip"
Content-Type: application/zip

PK(rest of ZIP file contents)

HTTP Method and URL
POST https://api.ravenslingshot.com/prescriptionmaps
URL Parameters
None
HTTP Query Parameters
None
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Job Data - Summary

When accessing /JobData via GET, the Slingshot API Server will return an XML document that contains the summary data of all As Applied Files that are assigned to the Access Key contained in the request headers. This data will contain URI values that point to the details for each As Applied File in the list.
HTTP Method and URL
GET https://api.ravenslingshot.com/jobdata
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  177
  20
  false
  true
  0
  9
  
    11
    Large file2.zip
    https://api.ravenslingshot.com/JobData/11
    Sprayer
    2017-01-11T20:53:49Z
    2017-01-11T20:54:01Z
  
  
    12
    Large file3.zip
    https://api.ravenslingshot.com/JobData/12
    Sprayer
    2017-01-11T21:55:49Z
    2017-01-11T21:55:01Z
  
            

JSON

{
    "JobData": [
        {
            "ID": "11",
            "Name": "Large file2.zip",
            "Uri": "https:\/\/api.ravenslingshot.com\/JobData\/11",
            "SubType": "Sprayer",
            "CreateDate": "2017-01-11T20:53:49Z",
            "UpdateDate": "2017-01-11T20:54:01Z"
        },
        {
            "ID": "12",
            "Name": "Large file3.zip",
            "Uri": "https:\/\/api.ravenslingshot.com\/JobData\/12",
            "SubType": "Sprayer",
            "CreateDate": "2017-01-11T20:55:49Z",
            "UpdateDate": "2017-01-11T20:55:01Z"
        }
    ],
    "TotalCount": 177,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": true,
    "PageIndex": 0,
    "TotalPages": 9
}            
Top

Job Data - Detail

When accessing /JobData/{id} via GET, the Slingshot API Server will respond with the Job Data details in XML/JSON format. This same call will respond with binary a file if the query string has 'format' parameter like /JobData/{id}?fomat=bin. The value of the format parameter controls the format of the returned data. The available formats are -

BIN: The original As Applied zip file as the Field Computer produced it
SHP: A zip file containing the shape files representing the As Applied data
FMIS: A zip file containing extended XML and TAB suitable for Farm Manage Information Systems software

If the job did not contain any coverage the server will respond with 200 OK response containing the following:
                    
                    
                      NO_COVERAGE
                      No coverage available.
                      nil
                    
                    
If the conversion failed the errorInfo tag will contain a description of why the conversion failed.
If the file format requested is not yet available, the server will respond with 200 OK response containing the following:
                    
                    
                      MORE_TIME_NEEDED
                      00:00:30
                      
                    
                    
The value in the tag is a time span value that the API client should wait before attempting to re-request the file.
HTTP Method and URL
GET https://api.ravenslingshot.com/jobdata/{id}
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /JobData URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Job Data - Prescription Maps

When accessing /JobData/{id}/PrescriptionMaps via GET, the Slingshot API Server will return an XML document that contains a list of Prescription Map summaries that were used to generate the Job Data file referenced by {id}. Additional details regarding these Prescription Maps can be retrieved by issuing a GET request on any of these returned URIs.
HTTP Method and URL
GET https://api.ravenslingshot.com/jobdata/{id}/prescriptionmaps
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /JobData URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Job Data - Upload

When accessing /JobData via POST, the Slingshot API Server will expect the request body to consist of a compressed container (a ZIP file) that contains Job Data from a Field Computer. Complex file with multiple directories zipped into a single archive is not supported by the API. The request body should be encoded using multipart/form-data standards with the following entry defined:

  • FileName: this entry will contain the file contents as well as the name of the file

If successful, the Slingshot API Server will respond with a HTTP 201 Created message and the URI of the newly created Job Data. The returned URI can be used to retrieve the details of the Job Data.
Sample POST Request

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------12217651423230
Content-Length: 40351

-----------------------------12217651423230
Content-Disposition: form-data; name="FileName"; filename="SampleJobData.jdp.zip"
Content-Type: application/zip

PK(rest of ZIP file contents)

HTTP Method and URL
POST https://api.ravenslingshot.com/jobdata
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Field Hub - Reports

A Field Hub reports its GPS location to the server every 30 seconds. When accessing /FieldHubs/:id/Reports via GET, the Slingshot API Server will return an XML document that contains all the locations that have been registered for the Field Hub identified by {id}
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/{id}/reports
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  15810
  20
  false
  true
  0
  791
  
    true
    -68
    true
    1
    10
    false
    false
    false
    false
    false
    false
    false
    0
    0
    0
    0
    12.5677
    AT&T
    15
    0
    HSPA
    2013-05-06T16:54:33Z
    249329267
    352974026203117
    43.5508935
    -96.724845
    454
    0
    0
    true
    2013-05-06T16:54:31Z
  
              

JSON

{
    "DeviceLocationReport": [
        {
            "Active": true,
            "RSSI": -68,
            "Ignition": true,
            "GPSFix": 1,
            "GPSSat": 10,
            "DigitalInput1": false,
            "DigitalInput2": false,
            "DigitalInput3": false,
            "DigitalInput4": false,
            "DigitalOutput1": false,
            "DigitalOutput2": false,
            "DigitalOutput3": false,
            "AnalogInput1": 0,
            "AnalogInput2": 0,
            "AnalogInput3": 0,
            "AnalogInput4": 0,
            "BatteryVoltage": 12.5677,
            "Carrier": "AT&T",
            "Odometer": 15,
            "Roam": "0",
            "Service": "HSPA",
            "ServerDateTime": "2013-05-06T16:54:33Z",
            "ID": "249329267",
            "DeviceId": "352974026203117",
            "Lat": 43.5508935,
            "Lon": -96.724845,
            "Alt": 454,
            "Speed": 0,
            "Direction": 0,
            "Valid": true,
            "GPSDateTime": "2013-05-06T16:54:31Z"
        }
    ],
    "TotalCount": 15810,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": true,
    "PageIndex": 0,
    "TotalPages": 791
}            
Top

Field Hub - Current Location for All

A Field Hub registers its GPS location every 30 seconds. When accessing /FieldHubs/all/CurrentLocation via GET, the Slingshot API Server will return an XML document that contains the most recent location of all the Field Hubs that are assigned to the API Key and Access Key contained in the request headers.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/all/currentlocation
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    249329618
    352974026203117
    Field Hub
    43.550893833333
    -96.7248445
    454
    0
    0
    false
    2013-05-06T17:10:31Z
  
            

JSON

{
    "DeviceLocation": [
        {
            "ID": "249329618",
            "DeviceId": "352974026203117",
            "SubType": "Field Hub",
            "Lat": 43.550893833333,
            "Lon": -96.7248445,
            "Alt": 454,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "2013-05-06T17:10:31Z"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Hub - Current Location

A Field Hub reports its GPS location to the server every 30 seconds. When accessing /FieldHubs/:id/Reports via GET, the Slingshot API Server will return an XML document that contains the current most recent location registered for the Field Hub identified by {id}
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/{id}/currentlocation
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    249329823
    352974026203117
    Field Hub
    43.550893333333
    -96.724844333333
    454
    0
    0
    false
    2013-05-06T17:20:01Z
  
            

JSON

{
    "DeviceLocation": [
        {
            "ID": "249329823",
            "DeviceId": "352974026203117",
            "SubType": "Field Hub",
            "Lat": 43.550893333333,
            "Lon": -96.724844333333,
            "Alt": 454,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "2013-05-06T17:20:01Z"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Hub - Location History

A Field Hub reports its GPS location to the server every 30 seconds. When accessing /FieldHubs/:id/Locations via GET, the Slingshot API Server will return an XML document that contains all the locations that have been registered for the Field Hub identified by {id}
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/{id}/locations
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML

{
    "DeviceLocation": [
        {
            "ID": "249329823",
            "DeviceId": "352974026203117",
            "SubType": "Field Hub",
            "Lat": 43.550893333333,
            "Lon": -96.724844333333,
            "Alt": 454,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "2013-05-06T17:20:01Z"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            

JSON

{
    "DeviceLocation": [
        {
            "ID": "249329823",
            "DeviceId": "352974026203117",
            "SubType": "Field Hub",
            "Lat": 43.550893333333,
            "Lon": -96.724844333333,
            "Alt": 454,
            "Speed": 0,
            "Direction": 0,
            "Valid": false,
            "GPSDateTime": "2013-05-06T17:20:01Z"
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Hub - Last Report for All

When accessing /FieldHubs/all via GET, the Slingshot API Server will return an XML document that contains all the last report for all Field Hubs that have been registered for the Field Hubs that are assigned to the API Key and Access Key contained in the request headers.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/all
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    12345678910
    Jack ICE ATT
    BlueTree Wireless-Sixnet
    BT-5800v2
    54321
    
      249330172
      12345678910
      Field Hub
      43.550889833333
      -96.724843166667
      454
      0
      0
      false
      2013-05-06T17:37:32Z
      true
      30
      -69
      true
      1
      8
      false
      false
      false
      false
      false
      false
      false
      0
      0
      0
      0
      12.6032
      AT&T
      15
      0
      HSPA
      2013-05-06 17:37:34
    
  
            

JSON

{
    "FieldHubDetail": [
        {
            "ID": "12345678910",
            "Name": "Robert Potter 1",
            "Model": "BT-5630v2",
            "FieldComputer": "54321",
            "Report": {
                "ID": "252400163",
                "DeviceId": "12345678910",
                "SubType": "Field Hub",
                "Lat": 0,
                "Lon": 0,
                "Alt": 0,
                "Speed": 0,
                "Direction": 0,
                "Valid": true,
                "GPSDateTime": "0000-00-00T00:00:00Z",
                "Active": false,
                "Event": "30",
                "RSSI": -68,
                "Ignition": true,
                "GPSFix": 0,
                "GPSSat": 0,
                "DigitalInput1": false,
                "DigitalInput2": false,
                "DigitalInput3": false,
                "DigitalInput4": false,
                "DigitalOutput1": false,
                "DigitalOutput2": false,
                "DigitalOutput3": false,
                "AnalogInput1": 0,
                "AnalogInput2": 0,
                "AnalogInput3": 0,
                "AnalogInput4": 0,
                "BatteryVoltage": 12.5677,
                "Carrier": "Verizon",
                "Odometer": 0,
                "Roam": "0",
                "Service": "EVDO.A",
                "ServerDateTime": "2013-07-18T20:59:26Z"
            }
        },
        {
            "ID": "12345678910",
            "Name": "Robert Potter 2",
            "Model": "BT-5630v2",
            "Report": {
                "ID": "252399618",
                "DeviceId": "12345678910",
                "SubType": "Field Hub",
                "Lat": 0,
                "Lon": 0,
                "Alt": 0,
                "Speed": 0,
                "Direction": 0,
                "Valid": true,
                "GPSDateTime": "0000-00-00T00:00:00Z",
                "Active": false,
                "Event": "30",
                "RSSI": -55,
                "Ignition": true,
                "GPSFix": 0,
                "GPSSat": 0,
                "DigitalInput1": false,
                "DigitalInput2": false,
                "DigitalInput3": false,
                "DigitalInput4": false,
                "DigitalOutput1": false,
                "DigitalOutput2": false,
                "DigitalOutput3": false,
                "AnalogInput1": 0,
                "AnalogInput2": 0,
                "AnalogInput3": 0,
                "AnalogInput4": 0,
                "BatteryVoltage": 12.6032,
                "Carrier": "Verizon",
                "Odometer": 0,
                "Roam": "0",
                "Service": "EVDO.A",
                "ServerDateTime": "2013-07-18T20:44:56Z"
            }
        }
    ],
    "TotalCount": 16,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Hub - Details

When accessing /FieldHubs/{id} via GET, the Slingshot API Server will respond with a Slingshot Index document that describes the details of the Field Hub identified by {id}.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/{id}
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI.
HTTP Query Parameters
None
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



  1
  20
  false
  false
  0
  1
  
    12345678910
    18March2013
    BlueTree Wireless-Sixnet
    BT-5600v2
    54321
    
      197969991
      12345678910
      Field Hub
      43.550506666667
      -96.7248855
      447
      0
      46
      true
      2013-04-09T21:57:43ZZ
      false
      30
      -55
      true
      1
      10
      false
      false
      false
      false
      false
      false
      false
      0
      0
      0
      0
      13.8065
      Verizon
      0
      00
      1xRTT
      2012-11-09T09:59:24Z
    
  
            

JSON

{
    "FieldHubDetail": [
        {
            "ID": "12345678910",
            "Name": "18March2013",
            "Make": "BlueTree Wireless-Sixnet",
            "Model": "BT-5600v2",
            "FieldComputer": "54321",
            "Report": {
                "ID": "197969991",
                "DeviceId": "12345678910",
                "SubType": "Field Hub",
                "Lat": 43.550506666667,
                "Lon": -96.7248855,
                "Alt": 447,
                "Speed": 0,
                "Direction": 46,
                "Valid": true,
                "GPSDateTime": "2013-04-09T21:57:43ZZ",
                "Active": false,
                "Event": "30",
                "RSSI": -55,
                "Ignition": true,
                "GPSFix": 1,
                "GPSSat": 10,
                "DigitalInput1": false,
                "DigitalInput2": false,
                "DigitalInput3": false,
                "DigitalInput4": false,
                "DigitalOutput1": false,
                "DigitalOutput2": false,
                "DigitalOutput3": false,
                "AnalogInput1": 0,
                "AnalogInput2": 0,
                "AnalogInput3": 0,
                "AnalogInput4": 0,
                "BatteryVoltage": 13.8065,
                "Carrier": "Verizon",
                "Odometer": 0,
                "Roam": "00",
                "Service": "1xRTT",
                "ServerDateTime": "2012-11-09T09:59:24Z"
            }
        }
    ],
    "TotalCount": 1,
    "PageSize": 20,
    "IsPreviousPage": false,
    "IsNextPage": false,
    "PageIndex": 0,
    "TotalPages": 1
}            
Top

Field Hub - Summary

When accessing /FieldHubs URI via GET, the Slingshot API Server will return a Slingshot Index document that contains the summary data of all Field Hubs that are assigned to the Access Key contained in the request headers. This data will contain URI values that point to the details for each Field Hub in the list.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML



	
		09613471299
		18March2013
		https://api.ravenslingshot.com/FieldHubs/09613471299
	
	
		352974026203117
		Jack ICE ATT
		https://api.ravenslingshot.com/FieldHubs/352974026203117
	
	2
	20
	0
	1
	false
	false
            

JSON

{
	"FieldHub":[
		{
			"ID":"09613471299",
			"Name":"18March2013",
			"Uri":"https://api.ravenslingshot.com/FieldHubs/09613471299"
		},
		{
			"ID":"352974026203117",
			"Name":"Jack ICE ATT",
			"Uri":"https://api.ravenslingshot.com/FieldHubs/352974026203117"
		}
	],
	"TotalCount":2,
	"PageSize":20,
	"PageIndex":0,
	"TotalPages":1,
	"IsPreviousPage":false,
	"IsNextPage":false
}            
Top

Access Key - Summary

When accessing /AccessKey via GET, the Slingshot API Server will return an XML document that contains the summary data of the Access Key contained in the request headers. This data can be used to determine the cause of any 'Invalid Access Key' messages from the server.
HTTP Method and URL
GET https://api.ravenslingshot.com/accesskey
URL Parameters
None
HTTP Query Parameters
None
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Sample Responses

XML


    B3A3B66E-413E-4018-8782-D297F4950F12
    10
    John's access key
    Key given to John to manage my data
    true
    RavenCustomer@gmail.com
    2010-11-17T06:00:00Z
            

JSON

{
    "AccessKey":"B3A3B66E-413E-4018-8782-D297F4950F12",
    "ID":"10",
    "FriendlyName":"John's access key",
    "Description":"Key given to John to manage my data",
    "IsActive":true,
    "Contact":"RavenCustomer@gmail.com",
    "ExpirationDateTime":"2010-11-17T06:00:00Z"
}            
Top

Grain Cart - Summary

HTTP Method and URL
GET https://api.ravenslingshot.com/graincart
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

GrainCart - Detail

When accessing /GrainCart/{id} via GET, the Slingshot API Server will respond with the GrainCart details in XML/JSON format. This same call will respond with file data if the query string has 'format' parameter like /GrainCart/{id}?fomat=bin. The value of the format parameter controls the format of the returned data. The available formats are -

BIN: The original GRC file
HTTP Method and URL
GET https://api.ravenslingshot.com/graincart/{id}
URL Parameters
{id} The {id} portion of the URI is taken from the XML Document returned by a GET request to the /GrainCart URI.
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Grain Cart - Upload

When accessing /GrainCart via POST, the Slingshot API Server will expect the request body to consist of a file with GRC extension that contains Grain Cart data from a bridge device. The request body should be encoded using multipart/form-data standards with the following entry defined:

  • FileName: this entry will contain the file contents as well as the name of the file

If successful, the Slingshot API Server will respond with a HTTP 201 Created message and the URI of the newly created Grain Cart data. The returned URI can be used to retrieve the details of the Job Data.
Sample POST Request

User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------12217651423230
Content-Length: 40351

-----------------------------12217651423230
Content-Disposition: form-data; name="FileName"; filename="uHarvest-2f23.GRC"
Content-Type: text/plain

(rest of plain text contents)

-----------------------------12217651423230--
HTTP Method and URL
POST https://api.ravenslingshot.com/graincart
URL Parameters
None
HTTP Query Parameters
pagesize [Optional] Number of rows to return for a result page. More.
page [Optional] Specific result page to return. More.
HTTP Headers
X-SS-AccessKey [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. More.
X-SS-APIKey [Required] Token issued to the Slingshot developer from Raven. More
X-SS-Signature [Required] The signature generated for a specific request. More.
X-SS-TimeStamp [Required] The timestamp of when the request was generated. More.
Top

Determine Field Computer Location

Getting the GPS Location of a Field Computer consists of 2 steps:

  1. Determining the ID of the Field Computer to be located
  2. Asking the Slingshot API Server for the GPS Location(s) of the chosen Field Computer
Step 1: Determining the ID of the Field Computer to be located

To determine the ID of the Field Computer to be located, the API Client needs to issue a GET request to the /FieldComputers URI and allow the user to choose the Field Computer from their list of Field Computers. The response to a GET request to the /FieldComputers URI will be:


    2
    20
    false
    false
    0
    1
    
        2058
        VPRO4 T380
        https://api.ravenslingshot.com/FieldComputers/2058
    
    
        2558
        E-Pro II B2
        https://api.ravenslingshot.com/FieldComputers/2558
    

    

This response can be parsed using the SlingshotIndex.xsd schema. Once the user picks a Field Computer, the API Client will need to save the Uri value of the chosen Field Computer to use in Step 2.

Step 2: Asking the Slingshot API Server for the GPS Location(s) of the chosen Field Computer

There are two calls that an API Client can make to determine the GPS Location of the chosen Field Computer.

A GET call to /FieldComputers/{fcID}/CurrentLocation will return a Slingshot Index response containing a single record that contains the most recent GPS location reported into the Slingshot system by the Field Computer represented by {fcID}. This record will contain the Latitude, Longitude, Altitude, Speed, Direction, and a DateTime stamp of when the record was created:


    1
    20
    false
    false
    0
    1
    
        253006
        1092
        Field Computer
        0.00000000
        0.00000000
        0
        0
        0
        2010-10-05T18:03:20Z
    

    

A GET call to /FieldComputers/{fcID}/Locations will return a Slingshot Index response containing multiple records that contain the GPS Location reported into the Slingshot system by the Field Computer represented by {fcID} over time. By default, the Slingshot API Server will return 20 records per request, but this value can be controlled by adding the query string parameter pageSize to the GET call.


    1990
    20
    false
    true
    0
    100
    
        253006
        1092
        Field Computer
        0.00000000
        0.00000000
        0
        0
        0
        2010-10-05T18:03:20Z
    
    
        253005
        1092
        Field Computer
        0.00000000
        0.00000000
        0
        0
        0
        2010-10-05T17:58:10Z
    

    

Both of these responses can be parsed using the SlingshotIndex.xsd schema file. The data types and units are also documented in the SlingshotIndex.xsd schema file.

If the Slingshot API Server can determine which Field Hub a specific Field Computer is using, the API server will return the GPS Location records of the Field Hub and the SubType element of these records will be 'Field Hub'. If the Slingshot API Server cannot determine which Field Hub a Field Computer is using, it will return the GPS Location records of the Field Computer and the SubType of these records will be 'Field Computer'. Currently, GPS Location records come in from Field Hubs every 30 seconds and GPS Location records come in from Field Computers ever 5 minutes.

Getting the GPS Location of more than one Field Computer in a single API call.

Both of these calls support the special value of 'all' for {fcID}. When this value is used for {fcID}, the Slingshot API Server will return the a Slingshot Index response containing the most recent GPS Location for each Field Computer that the user has access to. A call to /FieldComputers/all/CurrentLocation will return a single GPS Location for each Field Computer. In contrast, a call to /FieldComputers/all/Locations will return multiple GPS Locations for each Field Computer and this result set could be quite large. At this time, however, the call to /FieldComputers/all/Locations is not implemented.

Top

Send an Rx Map to Field Computer

Uploading a Rx Map and sending it to a Field Computer consists of 3 steps:

  1. Determining the ID of the Field Computer that should receive the Rx Map
  2. Uploading the Rx Map to the Slingshot API Server (this will provide contains the URI of the newly POSTed file)
  3. Directing the Slingshot API Server to send the Rx Map to the chosen Field Computer
Step 1: Determining the ID of the Field Computer that should receive the Rx Map

To determine the ID of the Field Computer that should receive the Rx Map, the API Client needs to issue a GET request to the /FieldComputers URI and allow the user to choose the Field Computer from their list of Field Computers. The response to a GET request to the /FieldComputers URI will be:


    2
    20
    false
    false
    0
    1
    
        2058
        VPRO4 T380
        https://api.ravenslingshot.com/FieldComputers/2058
    
    
        2558
        E-Pro II B2
        https://api.ravenslingshot.com/FieldComputers/2558
    

    

Once the user picks a Field Computer, the API Client will need to save the Uri value of the chosen Field Computer to use in Step 3.

Step 2: Uploading the Rx Map to the Slingshot API Server

To upload the Rx Map to the Slingshot API Server, the API Client will issue a POST request to the /PrescriptionMaps URI. The POST request body will need to be in the multipart/form-data format. Please see the code sample for more information on the exact format. The POST request body will consist of two parts: a text parameter named FileType and the binary contents parameter named FileName. The FileType parameter should have either the value "RX" or "AGX", which tells the Slingshot API Server which type of file you are uploading. The FileName parameter will be a byte stream of the zipped file along with the name the file should be saved with. Again, more details are in the code sample.

If the POST request is successful, the Slingshot API Server will return a "201 Created" response to the API client along with an XML document that contains the URI of the newly POSTed file. The API Client will need to save this URI path for use in Step 3.

Step 3: Directing the Slingshot API Server to send the Rx Map to the chosen Field Computer

To direct the Slingshot API Server to send the Rx Map to the chosen Field Computer the API Client will issue a PUT request to /PrescriptionMaps/{rxID}/FieldComputers/{fcID} where {rxID} is the ID returned by the POST request in Step 2 and {fcID} is the ID of the chosen field computer from Step 1.

If successful, the Slingshot API Server will respond with "200 OK". If the request fails, the Slingshot API Server will return the appropriate error code.

If a file with the same {rxID} is already queued for the field computer {fcID}, an appropriate message to wait will be returned and the file will NOT be queued.

If a file with the same file-name as {rxID} is already queued for the field computer {fcID}, an appropriate message indicating name conflict will be returned and the file will NOT be queued.

If all of the calls were successful, the Slingshot API Server will ensure that the POSTed file is made available for the Field Computer to download. The Field Computers currently have a timer which they use to check with the Slingshot system for files to be downloaded, so the file will not arrive at the Field Computer immediately, but will arrive after the timer fires and the Field Computer requests the file from Slingshot. The actual download time will vary depending on the speed of the Field Computer's connection to the Internet.

Sample Php for File upload

    $method = "POST";
    //initialize curl
    $curl = curl_init();

    curl_setopt($curl, CURLOPT_URL, "https://api.ravenslingshot.com/PrescriptionMaps");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    //create header for authentication
    $header = getHeaders($method, "api.ravenslingshot.com", strtolower ("/PrescriptionMaps"));
    array_push($header, 'Accept: application/xml');
    curl_setopt($curl, CURLOPT_HTTPHEADER, $header);

    //handle file upload
    if($method == "POST")
    {
        //it is a post
        curl_setopt($curl, CURLOPT_POST, true);
        $filePath = 'C:\PrescriptionMap.zip'; //file location
        //array for file information
        $postData = array(
                "FileType" => "RX",//or AGX
                "FileName" => "@".realpath($filePath)
                );
        //attach filetype and filename
        curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
    }
    //handle file ends here

    //make the call
    $curl_response = curl_exec($curl);
    //pretty print
    echo "
".htmlentities($curl_response)."
"; curl_close($curl);
Top