Back to top

iWell API v1 Documentation

Introduction


The iWell API provides access to our customers to read and write iWell data, enabling in-house developers to write innovative applications and utilities.

https://api.iwell.info/v1


HTTP Request Methods


Where possible, we use appropriate HTTP verbs for each action. For a more detailed explanation, check out the full list of HTTP Request Methods.

Method Description
GET Retrieve a specific resource.
POST Create a new resource.
PATCH Update to a resource, only changing the provided attributes.
DELETE Delete a resource.

HTTP Response Codes


We use HTTP status codes to notify about any problems that occured during the request. Each response includes a status code which will tell you if the request succeeded or failed and why.

Code Description
200 OK General status code. Most common code used to indicate success.
201 CREATED Successful creation occurred (via either POST or PUT). Set the Location header to contain a link to the newly-created resource (on POST). Response body content may or may not be present.
204 NO CONTENT Indicates success but nothing is in the response body, often used for DELETE and UPDATE operations.
400 BAD REQUEST General error when fulfilling the request would cause an invalid state. Domain validation errors, missing data, etc. are some examples.
401 UNAUTHORIZED Error code response for missing or invalid authentication token.
403 FORBIDDEN Error code for user not authorized to perform the operation or the resource is unavailable for some reason (e.g. time constraints, etc.).
404 NOT FOUND Used when the requested resource is not found, whether it does not exist or if there was a 401 or 403 that, for security reasons, the service wants to mask.
405 METHOD NOT ALLOWED Used to indicate that the requested URL exists, but the requested HTTP method is not applicable. For example, POST /users/12345 where the API does not support creation of resources this way (with a provided ID). The Allow HTTP header must be set when returning a 405 to indicate the HTTP methods that are supported. In the previous case, the header would look like “Allow: GET, PUT, DELETE”
429 TOO MANY REQUESTS Indicates that the API rate limit has been exceeded
500 INTERNAL SERVER ERROR The general catch-all error when the server-side throws an exception. Use this only for errors that the consumer cannot address from their end.

Rate Limits


There is a default rate limit of 24 requests per minute per account. If you need more than this, please contact customer support.

Date Range Limit


The API will allow you to make data requests with a maximum date range of 31 days between the start and end date to get historic data.


Date & Time Format


All dates are represented in UNIX time format.

1437562945


Authorization

Access Tokens & Authorization

The iWell API uses OAuth 2.0 as the authorization framework that enables our customers to obtain limited access to their data from their own in-house or third-party applications.

All API endpoints are protected and require that a valid access token is sent as an Authorization HTTP header:

Authorization: Bearer <access_token>

Failing to do so will cause the following error:

{
  "error": {
    "code": "GEN-FUBARGS",
    "http_code": 400,
    "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the access_token parameter.",
    "description": "",
    "link": ""
  }
}

Generate Access Token
POST/oauth2/access-token

Generate the access token. In order to request an access token you need to first authenticate with the following credentials:

  • Client id and secret - These OAuth 2.0 credentials are provided for you in your iWell account settings page.

  • Username and password - This is the email and password you use to login to iWell. In order to use the API, an iWell account with administrator privileges is required.

Example URI

POST https://api.iwell.info/v1/oauth2/access-token
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "grant_type": "password",
  "client_id": "Fr47JHag98Era6Gh",
  "client_secret": "c8ab0247ef772aab34509d3d49de50a1",
  "username": "email@your-company.com",
  "password": "************"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "JN72rypTMwk2OzZ4TzJiwzoqfHi0T8kWPHqMPgCU",
  "token_type": "Bearer",
  "expires_in": 604800
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-FUBARGS",
    "http_code": 400,
    "message": "Client authentication failed.",
    "description": "",
    "link": ""
  }
}

Account

Account Information

Account Information
GET/me

Get some account information of the authenticated user.

Example URI

GET https://api.iwell.info/v1/me
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 1234,
    "name": "John Doe",
    "email": "john.doe@domain.com",
    "phone": "(123) 456-7890",
    "company": {
      "data": {
        "name": "ACME Oil",
        "address1": "7694 College Street",
        "address2": "",
        "city": "Sugar Land",
        "state": "TX",
        "zip": "77478"
      }
    }
  }
}

Users

Users

List Users
GET/users

List all company users.

Example URI

GET https://api.iwell.info/v1/users
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "data":[
      {
          "id":1234,
          "name":"John Doe",
          "email":"john.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":ADMIN,
          "status":ACTIVE
      },
      {
          "id":1235,
          "name":"John Smith",
          "email":"john.smith@domain.com",
          "phone":"(123) 456-7890",
          "type":PUMPER_SUPERVISOR,
          "status":ACTIVE
      },
      {
          "id":1236,
          "name":"Jane Doe",
          "email":"jane.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":USER,
          "status":ACTIVE
      }
   ]
}

Create User
POST/users

Create a new user.

Example URI

POST https://api.iwell.info/v1/users
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Michael Richards",
  "email": "michael.richards@domain.com",
  "password": "password-here",
  "phone": "(123) 456-7890",
  "type": "ADMIN"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
   "data":{
       "id":1237,
       "name":"Michael Richards",
       "email":"michael.richards@domain.com",
       "phone":"(123) 456-7890",
       "type":"ADMIN",
       "status":ACTIVE
   }
}

User

Get User
GET/users/{user_id}

Get single user.

Example URI

GET https://api.iwell.info/v1/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "data":{
       "id":1237,
       "name":"Michael Richards",
       "email":"michael.richards@domain.com",
       "phone":"(123) 456-7890",
       "type":"ADMIN",
       "status":ACTIVE
   }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not exist",
    "description": "",
    "link": ""
  }
}

Update User
PATCH/users/{user_id}

Update user.

Example URI

PATCH https://api.iwell.info/v1/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Michael Richards",
  "email": "michael.richards@domain.com",
  "password": "password-here",
  "phone": "(123) 456-7890",
  "type": "ADMIN"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "data":{
       "id":1237,
       "name":"Michael Richards",
       "email":"michael.richards@domain.com",
       "phone":"(123) 456-7890",
       "type":"ADMIN",
       "status":ACTIVE
   }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not exist",
    "description": "",
    "link": ""
  }
}

Delete User
DELETE/users/{user_id}

Delete a single user.

Example URI

DELETE https://api.iwell.info/v1/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not exist",
    "description": "",
    "link": ""
  }
}

User Wells

User Wells
GET/users/{user_id}/wells{?since}

Retrieve list of wells that can be accessed by the user.

Example URI

GET https://api.iwell.info/v1/users/user_id/wells?since=1420107010
URI Parameters
HideShow
user_id
number (required) 

ID of user.

since
UNIX time (optional) Example: 1420107010

Only wells with access granted at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 7332,
      "name": "Eastmark #1",
      "alias": "Eastmark #1",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:45-05:00",
      "created_at": "2013-11-13T11:07:18-06:00",
      "updated_at": "2015-04-05T14:41:05-05:00"
    },
    {
      "id": 7333,
      "name": "Lienz #3",
      "alias": "Lienz #3",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:39:22-05:00",
      "created_at": "2013-11-13T11:07:46-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    },
    {
      "id": 7334,
      "name": "Holland Gas #1",
      "alias": "Holland Gas #1",
      "type": "GAS",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:16-05:00",
      "created_at": "2013-11-13T11:08:06-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    }
  ]
}

Manage User Wells

Verify Well Access
GET/users/{user_id}/wells/{well_id}

Verify if the well can be accessed by the user.

Example URI

GET https://api.iwell.info/v1/users/user_id/wells/well_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

well_id
number (required) 

ID of well.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7332,
    "name": "Eastmark #1",
    "alias": "Eastmark #1",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well cannot be accessed by user.",
    "description": "",
    "link": ""
  }
}

Grant Well Access
POST/users/{user_id}/wells/{well_id}

Grant well access to the user.

Example URI

POST https://api.iwell.info/v1/users/user_id/wells/well_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

well_id
number (required) 

ID of well.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7339,
    "name": "Young 1-2",
    "alias": "Young 1-2",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}

Revoke Well Access
DELETE/users/{user_id}/wells/{well_id}

Revoke well access to the user.

Example URI

DELETE https://api.iwell.info/v1/users/user_id/wells/well_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

well_id
number (required) 

ID of well.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well cannot be accessed by user.",
    "description": "",
    "link": ""
  }
}

User Well Groups

User Well Groups
GET/users/{user_id}/well-groups{?since}

Retrieve list of well groups that can be accessed by the user.

Example URI

GET https://api.iwell.info/v1/users/user_id/well-groups?since=1420107010
URI Parameters
HideShow
user_id
number (required) 

ID of user.

since
UNIX time (optional) Example: 1420107010

Only well groups with access granted at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 223,
      "name": "Route A",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7768,
          7770,
          7772
        ]
      }
    },
    {
      "id": 224,
      "name": "Route B",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7773,
          7774,
          7775
        ]
      }
    },
    {
      "id": 225,
      "name": "Route C",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7776,
          7777,
          7778
        ]
      }
    }
  ]
}

Manage User Well Groups

Verify Well Group Access
GET/users/{user_id}/well-groups/{group_id}

Verify if the well group can be accessed by the user.

Example URI

GET https://api.iwell.info/v1/users/user_id/well-groups/group_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

group_id
number (required) 

ID of well group.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 223,
    "name": "Route A",
    "is_active": true,
    "latest_production_time": 1430937145,
    "created_at": 1420388725,
    "updated_at": 1420388725,
    "wells": {
      "data": [
        7768,
        7770,
        7772
      ]
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well group cannot be accessed by user.",
    "description": "",
    "link": ""
  }
}

Grant Well Group Access
POST/users/{user_id}/well-groups/{group_id}

Grant well group access to the user.

Example URI

POST https://api.iwell.info/v1/users/user_id/well-groups/group_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

group_id
number (required) 

ID of well group.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 223,
    "name": "Route A",
    "is_active": true,
    "latest_production_time": 1430937145,
    "created_at": 1420388725,
    "updated_at": 1420388725,
    "wells": {
      "data": [
        7768,
        7770,
        7772
      ]
    }
  }
}

Revoke Well Group Access
DELETE/users/{user_id}/well-groups/{group_id}

Revoke well group access to the user.

Example URI

DELETE https://api.iwell.info/v1/users/user_id/well-groups/group_id
URI Parameters
HideShow
user_id
number (required) 

ID of user.

group_id
number (required) 

ID of well group.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well group cannot be accessed by user.",
    "description": "",
    "link": ""
  }
}

Wells

Wells

List Wells
GET/wells{?since}

Get the list of wells in the company.

Example URI

GET https://api.iwell.info/v1/wells?since=1420107010
URI Parameters
HideShow
since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 7332,
      "name": "Eastmark #1",
      "alias": "Eastmark #1",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:45-05:00",
      "created_at": "2013-11-13T11:07:18-06:00",
      "updated_at": "2015-04-05T14:41:05-05:00"
    },
    {
      "id": 7333,
      "name": "Lienz #3",
      "alias": "Lienz #3",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:39:22-05:00",
      "created_at": "2013-11-13T11:07:46-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    },
    {
      "id": 7334,
      "name": "Holland Gas #1",
      "alias": "Holland Gas #1",
      "type": "GAS",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:16-05:00",
      "created_at": "2013-11-13T11:08:06-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    }
  ]
}

Create Well
POST/wells

Create a new well.

Example URI

POST https://api.iwell.info/v1/wells
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Young 1-2",
  "alias": "Young 1-2",
  "type": "OIL"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7339,
    "name": "Young 1-2",
    "alias": "Young 1-2",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}

Well

Get Single Well
GET/wells/{well_id}

Get information of a single well.

Example URI

GET https://api.iwell.info/v1/wells/well_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7332,
    "name": "Eastmark #1",
    "alias": "Eastmark #1",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Update Well
PATCH/wells/{well_id}

Update an existing well.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Young 1-2",
  "alias": "Young 1-2",
  "type": "OIL"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7339,
    "name": "Young 1-2",
    "alias": "Young 1-2",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Delete Well
DELETE/wells/{well_id}

Delete an existing well.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Users

Well Users
GET/wells/{well_id}/users{?since}

Retrieve list of users with access to this well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/users?since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

since
UNIX time (optional) Example: 1420107010

Only users with access granted at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "data":[
      {
          "id":1234,
          "name":"John Doe",
          "email":"john.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":ADMIN,
          "status":ACTIVE
      },
      {
          "id":1235,
          "name":"John Smith",
          "email":"john.smith@domain.com",
          "phone":"(123) 456-7890",
          "type":PUMPER_SUPERVISOR,
          "status":ACTIVE
      },
      {
          "id":1236,
          "name":"Jane Doe",
          "email":"jane.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":USER,
          "status":ACTIVE
      }
   ]
}

Manage Well Users

Verify Well Access
GET/wells/{well_id}/users/{user_id}

Verify if the user have access to the well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/users/user_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

user_id
number (required) 

ID of user.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "data":{
        "id":1236,
        "name":"Jane Doe",
        "email":"jane.doe@domain.com",
        "phone":"(123) 456-7890",
        "type":USER,
        "status":ACTIVE
    }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not have access to the well.",
    "description": "",
    "link": ""
  }
}

Grant Well Access
POST/wells/{well_id}/users/{user_id}

Grant well access to the user.

Example URI

POST https://api.iwell.info/v1/wells/well_id/users/user_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

user_id
number (required) 

ID of user.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "data":{
        "id":1236,
        "name":"Jane Doe",
        "email":"jane.doe@domain.com",
        "phone":"(123) 456-7890",
        "type":USER,
        "status":ACTIVE
    }
}

Revoke Well Access
DELETE/wells/{well_id}/users/{user_id}

Revoke well access to the user.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/users/user_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

user_id
number (required) 

ID of user.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not have access to the well.",
    "description": "",
    "link": ""
  }
}

Well Tanks

Well Tanks
GET/wells/{well_id}/tanks{?since}

Retrieve list of the tanks allocated to this well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/tanks?since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

since
UNIX time (optional) Example: 1420107010

Only tanks allocated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 4606,
      "name": "Eastmark Oil 1",
      "type": "OIL",
      "capacity": 200,
      "multiplier": 1.67,
      "created_at": 1420388725,
      "updated_at": 1420388725
    },
    {
      "id": 9320,
      "name": "Eastmark Water 1",
      "type": "WATER",
      "capacity": 200,
      "multiplier": 1.67,
      "created_at": 1420388725,
      "updated_at": 1420388725
    },
    {
      "id": 9324,
      "name": "Eastmark OW 1",
      "type": "OIL/WATER",
      "capacity": 400,
      "multiplier": 3.34,
      "created_at": 1420388725,
      "updated_at": 1420388725
    }
  ]
}

Manage Well Tanks

Verify Well Tank
GET/wells/{well_id}/tanks/{tank_id}

Verify if the tank is allocated to the well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/tanks/tank_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

tank_id
number (required) 

ID of tank.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 4606,
    "name": "Eastmark Oil 1",
    "type": "OIL",
    "capacity": 200,
    "multiplier": 1.67,
    "created_at": 1420388725,
    "updated_at": 1420388725
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "The tank is not currently allocated to the specified well.",
    "description": "",
    "link": ""
  }
}

Allocate Tank to Well
POST/wells/{well_id}/tanks/{tank_id}

Allocate the tank to the well.

Example URI

POST https://api.iwell.info/v1/wells/well_id/tanks/tank_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

tank_id
number (required) 

ID of tank.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 4606,
    "name": "Eastmark Oil 1",
    "type": "OIL",
    "capacity": 200,
    "multiplier": 1.67,
    "created_at": 1420388725,
    "updated_at": 1420388725
  }
}

Deallocate Tank from Well
DELETE/wells/{well_id}/tanks/{tank_id}

Deallocate the tank from the well.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/tanks/tank_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

tank_id
number (required) 

ID of tank.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "The tank is not currently allocated to the specified well.",
    "description": "",
    "link": ""
  }
}

Tanks

Tanks

List Tanks
GET/tanks{?since}

Get all tanks.

Example URI

GET https://api.iwell.info/v1/tanks?since=1420107010
URI Parameters
HideShow
since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 4606,
      "name": "Eastmark Oil 1",
      "type": "OIL",
      "capacity": 200,
      "multiplier": 1.67,
      "created_at": 1420388725,
      "updated_at": 1420388725
    },
    {
      "id": 9320,
      "name": "Eastmark Water 1",
      "type": "WATER",
      "capacity": 200,
      "multiplier": 1.67,
      "created_at": 1420388725,
      "updated_at": 1420388725
    },
    {
      "id": 9324,
      "name": "Eastmark OW 1",
      "type": "OIL/WATER",
      "capacity": 400,
      "multiplier": 3.34,
      "created_at": 1420388725,
      "updated_at": 1420388725
    }
  ]
}

Create Tank
POST/tanks

Create new tank

Example URI

POST https://api.iwell.info/v1/tanks
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "type": "OIL",
  "name": "Eastmark Oil 2",
  "capacity": 200,
  "multiplier": 1.67
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 9325,
    "name": "Eastmark Oil 2",
    "type": "OIL",
    "capacity": 200,
    "multiplier": 1.67,
    "created_at": 1420388725,
    "updated_at": 1420388725
  }
}

Tank

Get Tank
GET/tanks/{tank_id}

Get a single tank

Example URI

GET https://api.iwell.info/v1/tanks/tank_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 9325,
    "name": "Eastmark Oil 2",
    "type": "OIL",
    "capacity": 200,
    "multiplier": 1.67,
    "created_at": 1420388725,
    "updated_at": 1420388725
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank does not exist",
    "description": "",
    "link": ""
  }
}

Update Tank
PATCH/tanks/{tank_id}

Update tank

Example URI

PATCH https://api.iwell.info/v1/tanks/tank_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "type": "OIL",
  "name": "Eastmark Oil 2",
  "capacity": 200,
  "multiplier": 1.67
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 9325,
    "name": "Eastmark Oil 2",
    "type": "OIL",
    "capacity": 200,
    "multiplier": 1.67,
    "created_at": 1420388725,
    "updated_at": 1420388725
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank does not exist",
    "description": "",
    "link": ""
  }
}

Delete Tank
DELETE/tanks/{tank_id}

Delete a single tank.

Example URI

DELETE https://api.iwell.info/v1/tanks/tank_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank does not exist",
    "description": "",
    "link": ""
  }
}

Tank Readings

List Tank Readings
GET/tanks/{tank_id}/readings{?start,end,since,hourly}

Retrieve a list of tank readings.

Example URI

GET https://api.iwell.info/v1/tanks/tank_id/readings?start=2015-01-01&end=2015-01-31&since=1420107010&hourly=true
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

start
date (optional) Default: 31 days before the present date. Example: 2015-01-01

The date on which the requested production period starts. Check the Date Range Limit.

end
date (optional) Default: the present date. Example: 2015-01-31

The date on which the requested production period ends.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago. Using this, start and end date will be ignored.

hourly
boolean (optional) Example: true

When set to true, retrieve hourly monitoring data instead of daily readings. Hourly data includes additional fields like sensor_reading and gravity and excludes previous_* fields and updated_by information. Note: When using hourly=true, the start_date and end_date must be the same day. If no dates are provided, only the most recent day will be returned.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 100245,
      "reading_time": 1420388725,
      "top_feet": 10,
      "top_inches": 4,
      "cut_feet": 9,
      "cut_inches": 0,
      "previous_top_feet": 10,
      "previous_top_inches": 4,
      "previous_cut_feet": 9,
      "previous_cut_inches": 0,
      "updated_at": 1420389523,
      "updated_by": 462
    },
    {
      "id": 101432,
      "reading_time": 1420449392,
      "top_feet": 10,
      "top_inches": 9,
      "cut_feet": 9,
      "cut_inches": 2,
      "previous_top_feet": 10,
      "previous_top_inches": 4,
      "previous_cut_feet": 9,
      "previous_cut_inches": 0,
      "updated_at": 1420452342,
      "updated_by": 462
    },
    {
      "id": 103681,
      "reading_time": 1420530851,
      "top_feet": 11,
      "top_inches": 4,
      "cut_feet": 9,
      "cut_inches": 6,
      "previous_top_feet": 10,
      "previous_top_inches": 9,
      "previous_cut_feet": 9,
      "previous_cut_inches": 2,
      "updated_at": 1420533924,
      "updated_by": 462
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank does not exist",
    "description": "",
    "link": ""
  }
}

Create Tank Reading
POST/tanks/{tank_id}/readings

Create tank reading. The previous portion of the reading is optional.

Example URI

POST https://api.iwell.info/v1/tanks/tank_id/readings
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "reading_time": 1420530851,
  "top_feet": 11,
  "top_inches": 4,
  "cut_feet": 9,
  "cut_inches": 6,
  "previous_top_feet": 10,
  "previous_top_inches": 9,
  "previous_cut_feet": 9,
  "previous_cut_inches": 2
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 103681,
    "reading_time": 1420530851,
    "top_feet": 11,
    "top_inches": 4,
    "cut_feet": 9,
    "cut_inches": 6,
    "previous_top_feet": 10,
    "previous_top_inches": 9,
    "previous_cut_feet": 9,
    "previous_cut_inches": 2,
    "updated_at": 1420533924,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank does not exist",
    "description": "",
    "link": ""
  }
}

Tank Reading

Get Tank Reading
GET/tanks/{tank_id}/readings/{reading_id}{?hourly}

Get single tank reading.

Example URI

GET https://api.iwell.info/v1/tanks/tank_id/readings/reading_id?hourly=true
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of tank reading.

hourly
boolean (optional) Example: true

When set to true, retrieve hourly monitoring data instead of daily reading. Hourly data includes additional fields like sensor_reading and gravity, but excludes previous_* fields and updated_by information.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 103681,
    "reading_time": 1420530851,
    "top_feet": 11,
    "top_inches": 4,
    "cut_feet": 9,
    "cut_inches": 6,
    "previous_top_feet": 10,
    "previous_top_inches": 9,
    "previous_cut_feet": 9,
    "previous_cut_inches": 2,
    "updated_at": 1420533924,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank reading does not exist",
    "description": "",
    "link": ""
  }
}

Update Tank Reading
PATCH/tanks/{tank_id}/readings/{reading_id}

Update tank reading. The previous portion of the reading is optional.

Example URI

PATCH https://api.iwell.info/v1/tanks/tank_id/readings/reading_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of tank reading.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "reading_time": 1420530851,
  "top_feet": 11,
  "top_inches": 4,
  "cut_feet": 9,
  "cut_inches": 6,
  "previous_top_feet": 10,
  "previous_top_inches": 9,
  "previous_cut_feet": 9,
  "previous_cut_inches": 2
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 103681,
    "reading_time": 1420530851,
    "top_feet": 11,
    "top_inches": 4,
    "cut_feet": 9,
    "cut_inches": 6,
    "previous_top_feet": 10,
    "previous_top_inches": 9,
    "previous_cut_feet": 9,
    "previous_cut_inches": 2,
    "updated_at": 1420533924,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank reading does not exist",
    "description": "",
    "link": ""
  }
}

Tank Reading Run Tickets

List Run Tickets
GET/tanks/{tank_id}/readings/{reading_id}/run-tickets{?since}

Get run tickets recorded on a tank reading

Example URI

GET https://api.iwell.info/v1/tanks/tank_id/readings/reading_id/run-tickets?since=1420107010
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of tank reading.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Body
{
  "data": [
    {
      "id": 21769,
      "run_ticket_number": "12435",
      "date": "2015-01-05",
      "type": "OIL",
      "total": 170,
      "picture_url": "https://acme.iwell.info/uploads/images/runtickets/f1b3ba7c2bb923437a849fc24eb1381d.jpg",
      "comments": "",
      "updated_at": 1420533924,
      "updated_by": 462,
      "run_ticket_type": "Oil Sale",
      "transport": "Trucked",
      "hauling_company": "Hauling Company",
      "observed_temperature": 74,
      "observed_gravity": 42.6,
      "opening_temperature": 72,
      "closing_temperature": 74,
      "bsw": 0.2,
      "opening_gauge_inches": 132.5,
      "closing_gauge_inches": 23.25,
      "total_est_net": 169.12,
      "total_est_adjusted_net": 168.52,
      "seal_on": "1234",
      "seal_off": "1234"
    }
  ]
}

Create Run Ticket
POST/tanks/{tank_id}/readings/{reading_id}/run-tickets

Create run ticket.

Example URI

POST https://api.iwell.info/v1/tanks/tank_id/readings/reading_id/run-tickets
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of tank reading.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "run_ticket_number": "12435",
  "date": 1629298890,
  "type": "OIL",
  "total": 170,
  "comments": "",
  "observed_temperature": 74,
  "observed_gravity": 42.6,
  "opening_temperature": 72,
  "closing_temperature": 74,
  "bsw": 0.2,
  "opening_gauge_inches": 132.5,
  "closing_gauge_inches": 23.25,
  "total_est_net": 169.12,
  "total_est_adjusted_net": 168.52,
  "seal_on": "1234",
  "seal_off": "1234"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 21769,
    "run_ticket_number": "12435",
    "date": "2015-01-05",
    "type": "OIL",
    "total": 170,
    "picture_url": null,
    "comments": "",
    "updated_at": 1420533924,
    "updated_by": 462,
    "run_ticket_type": "Oil Sale",
    "transport": "Trucked",
    "hauling_company": "Hauling Company",
    "observed_temperature": 74,
    "observed_gravity": 42.6,
    "opening_temperature": 72,
    "closing_temperature": 74,
    "bsw": 0.2,
    "opening_gauge_inches": 132.5,
    "closing_gauge_inches": 23.25,
    "total_est_net": 169.12,
    "total_est_adjusted_net": 168.52,
    "seal_on": "1234",
    "seal_off": "1234"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Tank reading does not exist",
    "description": "",
    "link": ""
  }
}

Run Ticket

Get Run Ticket
GET/tanks/{tank_id}/readings/{reading_id}/run-tickets/{run_ticket_id}

Get single run ticket.

Example URI

GET https://api.iwell.info/v1/tanks/tank_id/readings/reading_id/run-tickets/run_ticket_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of reading.

run_ticket_id
number (required) 

ID of run ticket.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 21769,
    "run_ticket_number": "12435",
    "date": "2015-01-05",
    "type": "OIL",
    "total": 170,
    "picture_url": "https://acme.iwell.info/uploads/images/runtickets/f1b3ba7c2bb923437a849fc24eb1381d.jpg",
    "comments": "",
    "updated_at": 1420533924,
    "updated_by": 462,
    "run_ticket_type": "Oil Sale",
    "transport": "Trucked",
    "hauling_company": "Hauling Company",
    "observed_temperature": 74,
    "observed_gravity": 42.6,
    "opening_temperature": 72,
    "closing_temperature": 74,
    "bsw": 0.2,
    "opening_gauge_inches": 132.5,
    "closing_gauge_inches": 23.25,
    "total_est_net": 169.12,
    "total_est_adjusted_net": 168.52,
    "seal_on": "1234",
    "seal_off": "1234"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Run ticket does not exist",
    "description": "",
    "link": ""
  }
}

Update Run Ticket
PATCH/tanks/{tank_id}/readings/{reading_id}/run-tickets/{run_ticket_id}

Update run ticket.

Example URI

PATCH https://api.iwell.info/v1/tanks/tank_id/readings/reading_id/run-tickets/run_ticket_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of reading.

run_ticket_id
number (required) 

ID of run ticket.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "run_ticket_number": "12435",
  "date": 1629298890,
  "type": "OIL",
  "total": 170,
  "comments": "",
  "observed_temperature": 74,
  "observed_gravity": 42.6,
  "opening_temperature": 72,
  "closing_temperature": 74,
  "bsw": 0.2,
  "opening_gauge_inches": 132.5,
  "closing_gauge_inches": 23.25,
  "total_est_net": 169.12,
  "total_est_adjusted_net": 168.52,
  "seal_on": "1234",
  "seal_off": "1234"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 21769,
    "run_ticket_number": "12435",
    "date": "2015-01-05",
    "type": "OIL",
    "total": 170,
    "picture_url": "https://acme.iwell.info/uploads/images/runtickets/f1b3ba7c2bb923437a849fc24eb1381d.jpg",
    "comments": "",
    "updated_at": 1420533924,
    "updated_by": 462,
    "run_ticket_type": "Oil Sale",
    "transport": "Trucked",
    "hauling_company": "Hauling Company",
    "observed_temperature": 74,
    "observed_gravity": 42.6,
    "opening_temperature": 72,
    "closing_temperature": 74,
    "bsw": 0.2,
    "opening_gauge_inches": 132.5,
    "closing_gauge_inches": 23.25,
    "total_est_net": 169.12,
    "total_est_adjusted_net": 168.52,
    "seal_on": "1234",
    "seal_off": "1234"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Run Ticket does not exist",
    "description": "",
    "link": ""
  }
}

Delete Run Ticket
DELETE/tanks/{tank_id}/readings/{reading_id}/run-tickets/{run_ticket_id}

Delete a single run ticket.

Example URI

DELETE https://api.iwell.info/v1/tanks/tank_id/readings/reading_id/run-tickets/run_ticket_id
URI Parameters
HideShow
tank_id
number (required) 

ID of tank.

reading_id
number (required) 

ID of reading.

run_ticket_id
number (required) 

ID of run ticket.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Run Ticket does not exist",
    "description": "",
    "link": ""
  }
}

Meters

Well Meters

List Meters
GET/wells/{well_id}/meters{?since}

Get the meters for the well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/meters?since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 442,
      "name": "Eastmark #1 Oil Meter",
      "type": "OIL",
      "meter_type": "TOTAL CUMULATIVE",
      "behavior": "ADD",
      "order": 1,
      "created_at": 1420388725,
      "updated_at": 1420432544
    },
    {
      "id": 443,
      "name": "Eastmark #1 Gas Meter",
      "type": "GAS",
      "meter_type": "BARTON CHART",
      "behavior": "SUBTRACT",
      "order": 2,
      "created_at": 1420388725,
      "updated_at": 1420432544
    },
    {
      "id": 444,
      "name": "Eastmark #1 Water Meter",
      "type": "WATER",
      "meter_type": "DIGITAL",
      "behavior": "NONE",
      "order": 3,
      "created_at": 1420388725,
      "updated_at": 1420432544
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Create Meter
POST/wells/{well_id}/meters

Create new meter.

Example URI

POST https://api.iwell.info/v1/wells/well_id/meters
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Eastmark #1 Oil Meter 2",
  "type": "OIL",
  "order": 4
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 445,
  "name": "Eastmark #1 Oil Meter 2",
  "type": "OIL",
  "meter_type": "TOTAL CUMULATIVE",
  "behavior": "ADD",
  "order": 4,
  "created_at": 1420388725,
  "updated_at": 1420432544
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Meter

Get Meter
GET/wells/{well_id}/meters/{meter_id}

Get single meter.

Example URI

GET https://api.iwell.info/v1/wells/well_id/meters/meter_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 445,
    "name": "Eastmark #1 Oil Meter 2",
    "type": "OIL",
    "meter_type": "TOTAL CUMULATIVE",
    "behavior": "ADD",
    "order": 4,
    "created_at": 1420388725,
    "updated_at": 1420432544
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter does not exist",
    "description": "",
    "link": ""
  }
}

Update Meter
PATCH/wells/{well_id}/meters/{meter_id}

Update meter.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/meters/meter_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Eastmark #1 Oil Meter 2",
  "type": "OIL",
  "order": 4
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 445,
    "name": "Eastmark #1 Oil Meter 2",
    "type": "OIL",
    "meter_type": "TOTAL CUMULATIVE",
    "behavior": "ADD",
    "order": 4,
    "created_at": 1420388725,
    "updated_at": 1420432544
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter does not exist",
    "description": "",
    "link": ""
  }
}

Delete Meter
DELETE/wells/{well_id}/meters/{meter_id}

Delete a single meter.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/meters/meter_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter does not exist",
    "description": "",
    "link": ""
  }
}

Well Meter Readings

List Meter Readings
GET/wells/{well_id}/meters/{meter_id}/readings{?start,end,since}

Get the readings of the meter.

Example URI

GET https://api.iwell.info/v1/wells/well_id/meters/meter_id/readings?start=2015-01-01&end=2015-01-31&since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

start
date (optional) Default: 31 days before the present date. Example: 2015-01-01

The date on which the requested production period starts. Check the Date Range Limit.

end
date (optional) Default: the present date. Example: 2015-01-31

The date on which the requested production period ends.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 57767,
      "reading_time": 1420388725,
      "previous_reading": 331,
      "reading": 435,
      "updated_at": 1420388923,
      "updated_by": 462
    },
    {
      "id": 57768,
      "reading_time": 1420475394,
      "previous_reading": 435,
      "reading": 561,
      "updated_at": 1420478716,
      "updated_by": 462
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter does not exist",
    "description": "",
    "link": ""
  }
}

Create Meter Reading
POST/wells/{well_id}/meters/{meter_id}/readings

Create meter reading.

Example URI

POST https://api.iwell.info/v1/wells/well_id/meters/meter_id/readings
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "reading_time": 1420572741,
  "previous_reading": 561,
  "reading": 677
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 57769,
    "reading_time": 1420572741,
    "previous_reading": 561,
    "reading": 677,
    "updated_at": 1420573329,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter does not exist",
    "description": "",
    "link": ""
  }
}

Well Meter Reading

Get Meter Reading
GET/wells/{well_id}/meters/{meter_id}/readings/{reading_id}

Get single meter reading.

Example URI

GET https://api.iwell.info/v1/wells/well_id/meters/meter_id/readings/reading_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

reading_id
number (required) 

ID of meter reading.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 57769,
    "reading_time": 1420572741,
    "previous_reading": 561,
    "reading": 677,
    "updated_at": 1420573329,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter reading does not exist",
    "description": "",
    "link": ""
  }
}

Update Meter Reading
PATCH/wells/{well_id}/meters/{meter_id}/readings/{reading_id}

Update reading.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/meters/meter_id/readings/reading_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

meter_id
number (required) 

ID of meter.

reading_id
number (required) 

ID of meter reading.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "reading_time": 1420572741,
  "previous_reading": 561,
  "reading": 677
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 57769,
    "reading_time": 1420572741,
    "previous_reading": 561,
    "reading": 677,
    "updated_at": 1420573329,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Meter reading does not exist",
    "description": "",
    "link": ""
  }
}

Production

Well Production

List Production
GET/wells/{well_id}/production{?start,end,since}

Get production data of specific well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/production?start=2015-01-01&end=2015-01-31&since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

start
date (optional) Default: 31 days before the present date. Example: 2015-01-01

The date on which the requested production period starts. Check the Date Range Limit.

end
date (optional) Default: the present date. Example: 2015-01-31

The date on which the requested production period ends.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago. Using this, start and end date will be ignored.

Response  200
HideShow
Body
{
  "data": [
    {
      "id": 123456,
      "date": "2015-01-01",
      "oil": 3.34,
      "gas": 18,
      "water": 0,
      "gas_injection": 0,
      "gas_flare": 0,
      "water_injection": 0,
      "water_disposal": 0,
      "is_operating": true,
      "normal_hours_on": 24,
      "hours_on": 24,
      "production_time": 1420128727,
      "updated_at": 1420129142,
      "updated_by": 462
    },
    {
      "id": 123457,
      "date": "2015-01-02",
      "oil": 1.67,
      "gas": 28,
      "water": 0,
      "gas_injection": 0,
      "gas_flare": 0,
      "water_injection": 3,
      "water_disposal": 2,
      "is_operating": true,
      "normal_hours_on": 24,
      "hours_on": 24,
      "production_time": 1420229523,
      "updated_at": 1420229986,
      "updated_by": 462
    },
    {
      "id": 123458,
      "date": "2015-01-03",
      "oil": 5.01,
      "gas": 23,
      "water": 0,
      "gas_injection": 10,
      "gas_flare": 0,
      "water_injection": 1,
      "water_disposal": 0,
      "is_operating": true,
      "normal_hours_on": 24,
      "hours_on": 24,
      "production_time": 1420309325,
      "updated_at": 1420313124,
      "updated_by": 462
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Create Production
POST/wells/{well_id}/production

Create new production data

Example URI

POST https://api.iwell.info/v1/wells/well_id/production
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "date": "2015-01-04",
  "oil": 6.35,
  "gas": 52,
  "water": 0,
  "gas_injection": 0,
  "gas_flare": 0,
  "water_injection": 0,
  "water_disposal": 0,
  "is_operating": true,
  "normal_hours_on": 24,
  "hours_on": 24
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 2155363,
    "date": "2015-01-04",
    "oil": 6.35,
    "gas": 52,
    "water": 0,
    "gas_injection": 0,
    "gas_flare": 0,
    "water_injection": 0,
    "water_disposal": 0,
    "is_operating": true,
    "normal_hours_on": 24,
    "hours_on": 24,
    "production_time": 1420384501,
    "updated_at": 1420388725,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Production

Get Production
GET/wells/{well_id}/production/{production_id}

Get a single production.

Example URI

GET https://api.iwell.info/v1/wells/well_id/production/production_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

production_id
number (required) 

ID of production.

Response  200
HideShow
Body
{
  "data": {
    "id": 2155363,
    "date": "2015-01-04",
    "oil": 6.35,
    "gas": 52,
    "water": 0,
    "gas_injection": 0,
    "gas_flare": 0,
    "water_injection": 0,
    "water_disposal": 0,
    "is_operating": true,
    "normal_hours_on": 24,
    "hours_on": 24,
    "production_time": 1420384501,
    "updated_at": 1420388725,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Production does not exist",
    "description": "",
    "link": ""
  }
}

Update Production
PATCH/wells/{well_id}/production/{production_id}

Update production.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/production/production_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

production_id
number (required) 

ID of production.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "date": "2015-01-04",
  "oil": 6.35,
  "gas": 52,
  "water": 0,
  "gas_injection": 10,
  "gas_flare": 1,
  "water_injection": 0,
  "water_disposal": 0,
  "is_operating": true,
  "normal_hours_on": 24,
  "hours_on": 24
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 2155363,
    "date": "2015-01-04",
    "oil": 6.35,
    "gas": 52,
    "water": 0,
    "gas_injection": 10,
    "gas_flare": 1,
    "water_injection": 0,
    "water_disposal": 0,
    "is_operating": true,
    "normal_hours_on": 24,
    "hours_on": 24,
    "production_time": 1420384501,
    "updated_at": 1420388725,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Production does not exist",
    "description": "",
    "link": ""
  }
}

Delete Production
DELETE/wells/{well_id}/production/{production_id}

Delete a single production.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/production/production_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

production_id
number (required) 

ID of production.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Production does not exist",
    "description": "",
    "link": ""
  }
}

Well Groups

Well Groups

List Well Groups
GET/well-groups{?since}

List all company well groups.

Example URI

GET https://api.iwell.info/v1/well-groups?since=1420107010
URI Parameters
HideShow
since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 223,
      "name": "Route A",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7768,
          7770,
          7772
        ]
      }
    },
    {
      "id": 224,
      "name": "Route B",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7773,
          7774,
          7775
        ]
      }
    },
    {
      "id": 225,
      "name": "Route C",
      "is_active": true,
      "latest_production_time": 1430937145,
      "created_at": 1420388725,
      "updated_at": 1420388725,
      "wells": {
        "data": [
          7776,
          7777,
          7778
        ]
      }
    }
  ]
}

Create Well Group
POST/well-groups

Create a new group.

Example URI

POST https://api.iwell.info/v1/well-groups
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Route D"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 226,
    "name": "Route D",
    "is_active": true,
    "latest_production_time": null,
    "created_at": 1420388725,
    "updated_at": 1420388725,
    "wells": {
      "data": []
    }
  }
}

Well Group

Get Well Group
GET/well-groups/{group_id}

Get single group.

Example URI

GET https://api.iwell.info/v1/well-groups/group_id
URI Parameters
HideShow
group_id
number (required) 

ID of group.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 225,
    "name": "Route C",
    "is_active": true,
    "latest_production_time": 1430937145,
    "created_at": 1420388725,
    "updated_at": 1420388725,
    "wells": {
      "data": [
        7776,
        7777,
        7778
      ]
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well group does not exist",
    "description": "",
    "link": ""
  }
}

Update Well Group
PATCH/well-groups/{group_id}

Update well group.

Example URI

PATCH https://api.iwell.info/v1/well-groups/group_id
URI Parameters
HideShow
group_id
number (required) 

ID of group.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Route C"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 225,
    "name": "Route C",
    "is_active": true,
    "latest_production_time": 1430937145,
    "created_at": 1420388725,
    "updated_at": 1420388725,
    "wells": {
      "data": [
        7776,
        7777,
        7778
      ]
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well group does not exist",
    "description": "",
    "link": ""
  }
}

Delete Well Group
DELETE/well-groups/{group_id}

Delete a single well group.

Example URI

DELETE https://api.iwell.info/v1/well-groups/group_id
URI Parameters
HideShow
group_id
number (required) 

ID of group.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well group does not exist",
    "description": "",
    "link": ""
  }
}

Well Group Wells

Well Group Wells
GET/well-groups/{group_id}/wells

Retrieve list of wells in well group.

Example URI

GET https://api.iwell.info/v1/well-groups/group_id/wells
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 7332,
      "name": "Eastmark #1",
      "alias": "Eastmark #1",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:45-05:00",
      "created_at": "2013-11-13T11:07:18-06:00",
      "updated_at": "2015-04-05T14:41:05-05:00"
    },
    {
      "id": 7333,
      "name": "Lienz #3",
      "alias": "Lienz #3",
      "type": "OIL",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:39:22-05:00",
      "created_at": "2013-11-13T11:07:46-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    },
    {
      "id": 7334,
      "name": "Holland Gas #1",
      "alias": "Holland Gas #1",
      "type": "GAS",
      "is_active": true,
      "latest_production_time": "2015-04-05T14:38:16-05:00",
      "created_at": "2013-11-13T11:08:06-06:00",
      "updated_at": "2015-04-05T14:41:06-05:00"
    }
  ]
}

Manage Wells in Well Group

Verify Well in Well Group
GET/well-groups/{group_id}/wells/{well_id}

Verify if the well is part of the well group.

Example URI

GET https://api.iwell.info/v1/well-groups/group_id/wells/well_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

well_id
number (required) 

ID of well.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7332,
    "name": "Eastmark #1",
    "alias": "Eastmark #1",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well is not assigned to this well group.",
    "description": "",
    "link": ""
  }
}

Add Well to Well Group
POST/well-groups/{group_id}/wells/{well_id}

Add well to well group.

Example URI

POST https://api.iwell.info/v1/well-groups/group_id/wells/well_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

well_id
number (required) 

ID of well.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 7339,
    "name": "Young 1-2",
    "alias": "Young 1-2",
    "type": "OIL",
    "is_active": true,
    "latest_production_time": "2015-04-05T14:38:45-05:00",
    "created_at": "2013-11-13T11:07:18-06:00",
    "updated_at": "2015-04-05T14:41:05-05:00"
  }
}

Remove Well from Well Group
DELETE/well-groups/{group_id}/wells/{well_id}

Remove well from well group.

Example URI

DELETE https://api.iwell.info/v1/well-groups/group_id/wells/well_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

well_id
number (required) 

ID of well.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well is not assigned to this well group.",
    "description": "",
    "link": ""
  }
}

Well Group Users

Well Group Users
GET/well-groups/{group_id}/users{?since}

Retrieve list of users with access to the well group.

Example URI

GET https://api.iwell.info/v1/well-groups/group_id/users?since=1420107010
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

since
UNIX time (optional) Example: 1420107010

Only users with access granted at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
   "data":[
      {
          "id":1234,
          "name":"John Doe",
          "email":"john.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":ADMIN,
          "status":ACTIVE
      },
      {
          "id":1235,
          "name":"John Smith",
          "email":"john.smith@domain.com",
          "phone":"(123) 456-7890",
          "type":PUMPER_SUPERVISOR,
          "status":ACTIVE
      },
      {
          "id":1236,
          "name":"Jane Doe",
          "email":"jane.doe@domain.com",
          "phone":"(123) 456-7890",
          "type":USER,
          "status":ACTIVE
      }
   ]
}

Manage Well Group Users

Verify Well Group Access
GET/well-groups/{group_id}/users/{user_id}

Verify if the user have access to the well group.

Example URI

GET https://api.iwell.info/v1/well-groups/group_id/users/user_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

user_id
number (required) 

ID of user.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "data":{
        "id":1236,
        "name":"Jane Doe",
        "email":"jane.doe@domain.com",
        "phone":"(123) 456-7890",
        "type":USER,
        "status":ACTIVE
    }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not have access to the well group.",
    "description": "",
    "link": ""
  }
}

Grant Well Group Access
POST/well-groups/{group_id}/users/{user_id}

Grant well group access to the user.

Example URI

POST https://api.iwell.info/v1/well-groups/group_id/users/user_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

user_id
number (required) 

ID of user.

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "data":{
        "id":1236,
        "name":"Jane Doe",
        "email":"jane.doe@domain.com",
        "phone":"(123) 456-7890",
        "type":USER,
        "status":ACTIVE
    }
}

Revoke Well Group Access
DELETE/well-groups/{group_id}/users/{user_id}

Revoke well group access to the user.

Example URI

DELETE https://api.iwell.info/v1/well-groups/group_id/users/user_id
URI Parameters
HideShow
group_id
number (required) 

ID of well group.

user_id
number (required) 

ID of user.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "User does not have access to the well group.",
    "description": "",
    "link": ""
  }
}

Fields

Fields

List Fields
GET/fields{?since}

Get all custom fields.

Example URI

GET https://api.iwell.info/v1/fields?since=1420107010
URI Parameters
HideShow
since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 138,
      "name": "Hours",
      "type": "DECIMAL",
      "unit": "hrs",
      "is_required": false,
      "is_historic": true,
      "is_remembered": true,
      "order": 1,
      "updated_at": 1452272253
    },
    {
      "id": 139,
      "name": "Tubing Pressure",
      "type": "DECIMAL",
      "unit": "psi",
      "is_required": false,
      "is_historic": true,
      "is_remembered": true,
      "order": 2,
      "updated_at": 1452272253
    },
    {
      "id": 140,
      "name": "Casing Pressure",
      "type": "DECIMAL",
      "unit": "psi",
      "is_required": false,
      "is_historic": true,
      "is_remembered": true,
      "order": 3,
      "updated_at": 1452272253
    }
  ]
}

Create Field
POST/fields

Create field.

Example URI

POST https://api.iwell.info/v1/fields
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Temperature",
  "type": "DECIMAL",
  "unit": "",
  "is_required": false,
  "is_historic": true,
  "is_remembered": true,
  "order": 4
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 141,
    "name": "Temperature",
    "type": "DECIMAL",
    "unit": "",
    "is_required": false,
    "is_historic": true,
    "is_remembered": true,
    "order": 4,
    "updated_at": 1452272253
  }
}

Field

Get Field
GET/fields/{field_id}

Get single field.

Example URI

GET https://api.iwell.info/v1/fields/field_id
URI Parameters
HideShow
field_id
number (required) 

ID of field.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 140,
    "name": "Casing Pressure",
    "type": "DECIMAL",
    "unit": "psi",
    "is_required": false,
    "is_historic": true,
    "is_remembered": true,
    "order": 3,
    "updated_at": 1452272253
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field does not exist",
    "description": "",
    "link": ""
  }
}

Update Field
PATCH/fields/{field_id}

Update field.

Example URI

PATCH https://api.iwell.info/v1/fields/field_id
URI Parameters
HideShow
field_id
number (required) 

ID of field.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Temperature",
  "type": "DECIMAL",
  "unit": "",
  "is_required": false,
  "is_historic": true,
  "is_remembered": true,
  "order": 4
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 141,
    "name": "Temperature",
    "type": "DECIMAL",
    "unit": "",
    "is_required": false,
    "is_historic": true,
    "is_remembered": true,
    "order": 4,
    "updated_at": 1452272253
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field does not exist",
    "description": "",
    "link": ""
  }
}

Delete Field
DELETE/fields/{field_id}

Delete a single field.

Example URI

DELETE https://api.iwell.info/v1/fields/field_id
URI Parameters
HideShow
field_id
number (required) 

ID of field.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field does not exist",
    "description": "",
    "link": ""
  }
}

Well Fields

Well Fields
GET/wells/{well_id}/fields

Get all fields assigned for this well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/fields
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 138,
      "name": "Hours",
      "type": "DECIMAL",
      "unit": "hrs",
      "is_required": false,
      "is_historic": true,
      "is_remembered": true,
      "order": 1,
      "updated_at": "2015-01-12T10:24:10-06:00"
    },
    {
      "id": 141,
      "name": "Pumper Phone",
      "type": "TEXT",
      "unit": "",
      "is_required": false,
      "is_historic": false,
      "is_remembered": true,
      "order": 2,
      "updated_at": "2015-01-12T10:24:10-06:00"
    },
    {
      "id": 142,
      "key": "Casing PSI",
      "type": "DECIMAL",
      "unit": "psi",
      "required": false,
      "historic": true,
      "is_remembered": true,
      "order": 3,
      "updated_at": "2015-01-12T10:24:10-06:00"
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Field Values

List Values
GET/wells/{well_id}/fields/{field_id}/values{?start,end,since}

Get field values of specific well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/fields/field_id/values?start=2015-01-01&end=2015-01-31&since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

field_id
number (required) 

ID of field.

start
date (optional) Default: 31 days before the present date. Example: 2015-01-01

The date on which the requested production period starts. Check the Date Range Limit.

end
date (optional) Default: the present date. Example: 2015-01-31

The date on which the requested production period ends.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago. Using this, start and end date will be ignored.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 2544,
      "value": "350.00",
      "reading_time": 1420530851,
      "updated_at": 1452272120,
      "updated_by": 462
    },
    {
      "id": 2547,
      "value": "30.00",
      "reading_time": 1420619024,
      "updated_at": 1452272120,
      "updated_by": 462
    },
    {
      "id": 2550,
      "value": "120.34",
      "reading_time": 1420716553,
      "updated_at": 1452272120,
      "updated_by": 462
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field does not exist",
    "description": "",
    "link": ""
  }
}

Create Value
POST/wells/{well_id}/fields/{field_id}/values

Create a field value for a specific well.

Example URI

POST https://api.iwell.info/v1/wells/well_id/fields/field_id/values
URI Parameters
HideShow
well_id
number (required) 

ID of well.

field_id
number (required) 

ID of field.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "value": "175",
  "reading_time": 1452272253
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 485402,
    "value": "175",
    "reading_time": 1452272253,
    "updated_at": 1452272120,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field does not exist",
    "description": "",
    "link": ""
  }
}

Well Field Value

Get Value
GET/wells/{well_id}/fields/{field_id}/values/{value_id}

Get field value for a specific well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/fields/field_id/values/value_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

field_id
number (required) 

ID of field.

value_id
number (required) 

ID of field value.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 479402,
    "value": "175",
    "reading_time": 1452272253,
    "updated_at": 1452272120,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field value does not exist",
    "description": "",
    "link": ""
  }
}

Update Value
PATCH/wells/{well_id}/fields/{field_id}/values/{value_id}

Update field value for a specific well.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/fields/field_id/values/value_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

field_id
number (required) 

ID of field.

value_id
number (required) 

ID of field value.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "value": "180",
  "reading_time": 1452272253
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 479402,
    "value": "175",
    "reading_time": 1452272253,
    "updated_at": 1452272120,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field value does not exist",
    "description": "",
    "link": ""
  }
}

Delete Value
DELETE/wells/{well_id}/fields/{field_id}/values/{value_id}

Delete field value for a specific well.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/fields/field_id/values/value_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

field_id
number (required) 

ID of field.

value_id
number (required) 

ID of field value.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Field value does not exist",
    "description": "",
    "link": ""
  }
}

Validation Rules

Well Validation Rules

List Validation Rules
GET/wells/{well_id}/validation-rules{?since}

Get validation rules for well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/validation-rules?since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 134,
      "level": "ERROR",
      "production_type": "OIL",
      "field_id": null,
      "condition": "BELOW",
      "argument": 0,
      "argument_2": null,
      "created_at": 1448715908,
      "updated_at": 1448715908,
      "updated_by": 462
    },
    {
      "id": 135,
      "level": "WARNING",
      "production_type": "WATER",
      "field_id": null,
      "condition": "ABOVE",
      "argument": 200,
      "argument_2": null,
      "created_at": 1448715908,
      "updated_at": 1448715908,
      "updated_by": 462
    },
    {
      "id": 136,
      "level": "WARNING",
      "production_type": null,
      "field_id": 45,
      "condition": "BETWEEN",
      "argument": 50,
      "argument_2": 75,
      "created_at": 1448715908,
      "updated_at": 1448715908,
      "updated_by": 462
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
    "error": {
        "code": "GEN-LIKETHEWIND",
        "http_code": 404,
        "message": "Well does not exist",
        "description": "",
        "link": ""

Create Validation Rule
POST/wells/{well_id}/validation-rules

Create a new validation rule for well.

Example URI

POST https://api.iwell.info/v1/wells/well_id/validation-rules
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "level": "ERROR",
  "production_type": "OIL",
  "field_id": 55,
  "condition": "EXACT",
  "argument": 0,
  "argument_2": null
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 137,
    "level": "ERROR",
    "production_type": null,
    "field_id": 55,
    "condition": "EXACT",
    "argument": 0,
    "argument_2": null,
    "created_at": 1448715908,
    "updated_at": 1448715908,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Validation Rule

Get Validation Rule
GET/wells/{well_id}/validation-rules/{rule_id}

Get single validation rule.

Example URI

GET https://api.iwell.info/v1/wells/well_id/validation-rules/rule_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

rule_id
number (required) 

ID of validation rule.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 134,
    "level": "ERROR",
    "production_type": "OIL",
    "field_id": null,
    "condition": "BELOW",
    "argument": 0,
    "argument_2": null,
    "created_at": 1448715908,
    "updated_at": 1448715908,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Validation rule does not exist",
    "description": "",
    "link": ""
  }
}

Update Validation Rule
PATCH/wells/{well_id}/validation-rules/{rule_id}

Update validation rule.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/validation-rules/rule_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

rule_id
number (required) 

ID of validation rule.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "level": "ERROR",
  "production_type": "OIL",
  "field_id": 50,
  "condition": "EXACT",
  "argument": 0,
  "argument_2": null
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 137,
    "level": "ERROR",
    "production_type": "OIL",
    "field_id": 50,
    "condition": "EXACT",
    "argument": 0,
    "argument_2": null,
    "created_at": 1448715908,
    "updated_at": 1448715908,
    "updated_by": 462
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Validation rule does not exist",
    "description": "",
    "link": ""
  }
}

Delete Validation Rule
DELETE/wells/{well_id}/validation-rules/{rule_id}

Delete a single validation rule.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/validation-rules/rule_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

rule_id
number (required) 

ID of validation rule.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Validation rule does not exist",
    "description": "",
    "link": ""
  }
}

Notes

Well Notes

List Notes
GET/wells/{well_id}/notes{?since}

Get notes made on the well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/notes?since=1420107010
URI Parameters
HideShow
well_id
number (required) 

ID of well.

since
UNIX time (optional) Example: 1420107010

Only items updated at or after this time will be listed. It is limited to 31 days ago.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 294,
      "note_time": 1448715908,
      "message": "Dump valve had trash in it. Cleared out",
      "author": 462,
      "is_pumper_comment": true,
      "created_at": 1448715908,
      "updated_at": 1448715908
    },
    {
      "id": 178,
      "note_time": 1448715908,
      "message": "Shut in for pipeline repairs.",
      "author": 462,
      "is_pumper_comment": true,
      "created_at": 1448715908,
      "updated_at": 1448715908
    },
    {
      "id": 912,
      "note_time": 1448715908,
      "message": "Unit ran 13% yesterday",
      "author": 462,
      "is_pumper_comment": true,
      "created_at": 1448715908,
      "updated_at": 1448715908
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
    "error": {
        "code": "GEN-LIKETHEWIND",
        "http_code": 404,
        "message": "Well does not exist",
        "description": "",
        "link": ""

Create Note
POST/wells/{well_id}/notes

Create a new note.

Example URI

POST https://api.iwell.info/v1/wells/well_id/notes
URI Parameters
HideShow
well_id
number (required) 

ID of well.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "note_time": 1448715908,
  "message": "Dump valve had trash in it. Cleared out",
  "is_pumper_comment": true
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 294,
    "note_time": 1448715908,
    "message": "Dump valve had trash in it. Cleared out",
    "author": 462,
    "is_pumper_comment": true,
    "created_at": 1448715908,
    "updated_at": 1448715908
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Note

Get Note
GET/wells/{well_id}/notes/{note_id}

Get single note.

Example URI

GET https://api.iwell.info/v1/wells/well_id/notes/note_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

note_id
number (required) 

ID of note.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 294,
    "note_time": 1448715908,
    "message": "Dump valve had trash in it. Cleared out",
    "author": 462,
    "is_pumper_comment": true,
    "created_at": 1448715908,
    "updated_at": 1448715908
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Note does not exist",
    "description": "",
    "link": ""
  }
}

Update Note
PATCH/wells/{well_id}/notes/{note_id}

Update note.

Example URI

PATCH https://api.iwell.info/v1/wells/well_id/notes/note_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

note_id
number (required) 

ID of note.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "note_time": 1448715908,
  "message": "Dump valve had trash in it. Cleared out",
  "is_pumper_comment": true
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": 294,
    "note_time": 1448715908,
    "message": "Dump valve had trash in it. Cleared out",
    "author": 462,
    "is_pumper_comment": true,
    "created_at": 1448715908,
    "updated_at": 1448715908
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Note does not exist",
    "description": "",
    "link": ""
  }
}

Delete Note
DELETE/wells/{well_id}/notes/{note_id}

Delete a single note.

Example URI

DELETE https://api.iwell.info/v1/wells/well_id/notes/note_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

note_id
number (required) 

ID of note.

Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Note does not exist",
    "description": "",
    "link": ""
  }
}

Well Tests

Well Tests

List Well Tests
GET/wells/{well_id}/well-tests{?start,end,since}

Get a list of well tests of a specific well.

Example URI

GET https://api.iwell.info/v1/wells/well_id/well-tests?start=2023-02-01&end=2023-03-01&since=1682956330
URI Parameters
HideShow
well_id
number (required) 

ID of well.

start
date (optional) Default: 31 days before the present date. Example: 2023-02-01

The date on which the requested production period starts. Check the Date Range Limit.

end
date (optional) Default: the present date. Example: 2023-03-01

The date on which the requested production period ends.

since
UNIX time (optional) Example: 1682956330

Only items updated at or after this time will be listed. It is limited to 31 days ago. Using this, start and end date will be ignored.

Response  200
HideShow
Body
{
  "data": [
    {
      "id": 3295,
      "date": "2023-02-03",
      "duration": 10,
      "oil": 20,
      "gas": null,
      "water": null
    },
    {
      "id": 3304,
      "date": "2023-02-17",
      "duration": 48,
      "oil": 20,
      "gas": null,
      "water": null
    },
    {
      "id": 3305,
      "date": "2023-02-21",
      "duration": 24,
      "oil": 20,
      "gas": null,
      "water": null
    }
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Well Test

Get Well Test
GET/wells/{well_id}/well-tests/{well_test_id}

Get a single well test.

Example URI

GET https://api.iwell.info/v1/wells/well_id/well-tests/well_test_id
URI Parameters
HideShow
well_id
number (required) 

ID of well.

well_test_id
number (required) 

ID of well test.

Response  200
HideShow
Body
{
  "data": {
    "id": 3295,
    "date": "2023-02-03",
    "duration": 10,
    "oil": 20,
    "gas": null,
    "water": null,
    "updated_by": 1659,
    "updated_at": 1675439474
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": {
    "code": "GEN-LIKETHEWIND",
    "http_code": 404,
    "message": "Well does not exist",
    "description": "",
    "link": ""
  }
}

Generated by aglio on 12 Nov 2025