Rig API (1.0.0)

Download OpenAPI specification:Download

This area contains the API definition for the AGR Software application Rig. If anything is unclear or if there are any questions please contact, support@iqx.no

Datamodel overview

Datamodel overview

Authentication

ApiKeyInHeader

Authentication is done though an API key sent in header or query. API keys have to be provided to you by AGR Software.

Security Scheme Type API Key
Header parameter name: x-access-token

ApiKeyInQuery

Security Scheme Type API Key
Query parameter name: token

Schedule

Get current schedule

Request
Responses
200

OK

401

Unauthorized

get/schedule/current
Request samples
curl -i -X GET \
  https://api.demo.rig.digital/api/v1/schedule/current \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": 123,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Master October 2020",
  • "status": "active",
  • "is_master": true,
  • "readonly": true,
  • "is_main_draft": false,
  • "master_from_date": "2021-10-19T08:20:06.277Z",
  • "master_to_date": null,
  • "creator": "2310293102938",
  • "firstActiveDate": "2020-01-01T00:00:00.000Z",
  • "start_date": "2019-03-10T00:00:00.000Z",
  • "end_date": "2037-12-31T22:59:59.999Z",
  • "access_by_sharing": true,
  • "rigs": [
    ]
}

Get schedule by ID

Request
query Parameters
id
required
integer

The ID of the schedule to get

Responses
200

OK

401

Unauthorized

get/schedule/get
Request samples
curl -i -X GET \
  'https://api.demo.rig.digital/api/v1/schedule/get?id=0' \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": 123,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Master October 2020",
  • "status": "active",
  • "is_master": true,
  • "readonly": true,
  • "is_main_draft": false,
  • "master_from_date": "2021-10-19T08:20:06.277Z",
  • "master_to_date": null,
  • "creator": "2310293102938",
  • "firstActiveDate": "2020-01-01T00:00:00.000Z",
  • "start_date": "2019-03-10T00:00:00.000Z",
  • "end_date": "2037-12-31T22:59:59.999Z",
  • "access_by_sharing": true,
  • "rigs": [
    ]
}

Get list of masters by year

Request
path Parameters
year
required
integer

The year to get masters for

Responses
200

OK

401

Unauthorized

get/schedule/mastersList/{year}
Request samples
curl -i -X GET \
  'https://api.demo.rig.digital/api/v1/schedule/mastersList/{year}' \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Area

Get list of areas

Request
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/area/list
Request samples
curl -i -X GET \
  https://api.demo.rig.digital/api/v1/area/list \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Archive areas

Request
Request Body schema: application/json

array of asset IDS to be archived

Array
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/area/archive
Request samples
application/json
[
  • 1,
  • 2,
  • 3
]
Response samples
application/json
[
  • {
    }
]

Create an area

Request
Request Body schema: application/json

New area to be updated/created.

id
integer
name
required
string
required
object
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/area/save
Request samples
application/json
{
  • "id": 0,
  • "name": "string",
  • "country": {
    }
}
Response samples
application/json
[
  • {
    }
]

Asset

Get list of assets

Request
query Parameters
onlyVisible
boolean

Decides if all or just active assets are returned

Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/asset/list
Request samples
curl -i -X GET \
  'https://api.demo.rig.digital/api/v1/asset/list?onlyVisible=true' \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Archive assets

Request
Request Body schema: application/json

array of asset IDS to be archived

Array
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/asset/archive
Request samples
application/json
[
  • 1,
  • 2,
  • 3
]
Response samples
application/json
[
  • {
    }
]

Create an asset

Request
Request Body schema: application/json

New asset to be updated/created.

id
integer
name
required
string
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/asset/save
Request samples
application/json
{
  • "id": 0,
  • "name": "string"
}
Response samples
application/json
[
  • {
    }
]

Block

Get list of blocks

Request
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/block/list
Request samples
curl -i -X GET \
  https://api.demo.rig.digital/api/v1/block/list \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Archive blocks

Request
Request Body schema: application/json

array of block IDs to be archived

Array
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/block/archive
Request samples
application/json
[
  • 1,
  • 2,
  • 3
]
Response samples
application/json
[
  • {
    }
]

Create/update a block

Request
Request Body schema: application/json

New block to be updated/created.

id
integer
name
required
string
license_id
integer
required
object
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/block/save
Request samples
application/json
{
  • "id": 0,
  • "name": "string",
  • "license_id": 0,
  • "coordinates": {
    }
}
Response samples
application/json
[
  • {
    }
]

Country

Get list of countries

Request
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/country/list
Request samples
curl -i -X GET \
  https://api.demo.rig.digital/api/v1/country/list \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Archive countries

Request
Request Body schema: application/json

array of country IDS to be archived

Array
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/country/archive
Request samples
application/json
[
  • 1,
  • 2,
  • 3
]
Response samples
application/json
[
  • {
    }
]

Create a country

Request
Request Body schema: application/json

New country to be created.

name
required
string
code
required
string 2 characters
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/country/save
Request samples
application/json
{
  • "name": "string",
  • "code": "st"
}
Response samples
application/json
[
  • {
    }
]

Export

Export to excel

Only the current master is available for export.

Request
path Parameters
filename
required
string

The name of the generated file

Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/export/exportScheduleToExcel/{filename}.xlsx
Request samples
curl -i -X GET \
  'https://api.demo.rig.digital/api/v1/export/exportScheduleToExcel/{filename}.xlsx' \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "message": "You're not allowed to perform this operation",
  • "title": "Invalid Token Failure",
  • "statusCode": 401
}

License

Get list of licenses

Request
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

get/license/list
Request samples
curl -i -X GET \
  https://api.demo.rig.digital/api/v1/license/list \
  -H 'x-access-token: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Archive licenses

Request
Request Body schema: application/json

array of license IDs to be archived

Array
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/license/archive
Request samples
application/json
[
  • 1,
  • 2,
  • 3
]
Response samples
application/json
[
  • {
    }
]

Create/update a license

Request
Request Body schema: application/json

New license to be updated/created.

id
integer
name
required
string
npdid
string
asset_id
required
integer
area_id
required
integer
Responses
200

OK

401

Unauthorized or not allowed to perform this operation

post/license/save
Request samples
application/json
{
  • "id": 0,
  • "name": "string",
  • "npdid": "string",
  • "asset_id": 0,
  • "area_id": 0
}
Response samples
application/json
[
  • {
    }
]

Area

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
object (Country-2)
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Area 123",
  • "country": {
    }
}

Asset

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
archived
boolean
Default: false
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Asset 123",
  • "archived": false
}

Block

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
archived
boolean
Default: false
coordinates
string
object (License-2)
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Block 123",
  • "archived": false,
  • "coordinates": "(58.926111111111112,2.1797222222222219)",
  • "license": {
    }
}

Country

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
code
string
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Germany 1",
  • "code": "no"
}

License

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
archived
boolean
Default: false
npdid
string
object (Asset-2)
object (Area-2)
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "License 123",
  • "archived": false,
  • "npdid": "string",
  • "asset": {
    },
  • "area": {
    }
}

Rig

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
day_rate
string
is_confidential
boolean
is_draft_rig
boolean
type
string
Enum: "jack-up" "semi-sub" "platform" "land_rig" "drillship" "none"
pressure
string
Enum: "5000" "10000" "15000"
generation
string
Enum: "single" "dual"
weight
string
Deprecated
move_speed
integer

Move speed of rig, in km/h

start_of_contract
string <date>

If the Rig is bound by contract

end_of_contract
string <date>

If the Rig is bound by contract

option_from
string <date>

If the Rig is bound by contract, this indicates the option for the contract

option_to
string <date>

If the Rig is bound by contract, this indicates the option for the contract

ocean_depth_from
integer

Min ocean depth of the rig

ocean_depth_to
integer

Max ocean depth of the rig

archived
boolean

If Rig is archived and hidden in the UI

is_partner_rig
boolean

Indicates if the rig is a Partner Rig

{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Rig 1",
  • "day_rate": 100000,
  • "is_confidential": true,
  • "is_draft_rig": true,
  • "type": "jack-up",
  • "pressure": 5000,
  • "generation": "single",
  • "weight": "string",
  • "move_speed": 4,
  • "start_of_contract": "2021-10-19T08:20:06.277Z",
  • "end_of_contract": "2021-10-19T08:20:06.277Z",
  • "option_from": "2021-10-19T08:20:06.277Z",
  • "option_to": "2021-10-19T08:20:06.277Z",
  • "ocean_depth_from": 5000,
  • "ocean_depth_to": 15000,
  • "archived": false,
  • "is_partner_rig": false
}

RigInstance

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

schedule_id
integer
object (Rig-2)

The meta-data of a Rig, references by RigInstance

Array of objects (RigBooking-2)
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "schedule_id": 123,
  • "rigData": {
    },
  • "entries": [
    ]
}

RigBooking

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

rig_instance_id
integer
booking_type
string
Enum: "wells" "free_time" "buffer_time"
object

Summarized estimates and start dates for all wells in this RigBooking. Estimates is also found under each of the WellInstances

Array of objects (WellInstance-2)
{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "rig_instance_id": 123,
  • "booking_type": "wells",
  • "estimateData": {
    },
  • "wells": [
    ]
}

Schedule

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
status
string
Enum: "active" "archived"
is_master
boolean

If the schedule is the current master schedule

readonly
boolean

If the schedule is editable by current user

is_main_draft
boolean

If the schedule is the main-draft in the upcoming schedule-cycle

master_from_date
string <date>
master_to_date
string <date>
creator
string

External ID of the user, depending on the auth-scheme used

firstActiveDate
string <date>

The first date which has an active well

start_date
string <date>

Start of the scedule

end_date
string <date>

End of the schedule

access_by_sharing
boolean

If current user has access because someone shared this schedule with them.

Array of objects (RigInstance-2)
{
  • "id": 123,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Master October 2020",
  • "status": "active",
  • "is_master": true,
  • "readonly": true,
  • "is_main_draft": false,
  • "master_from_date": "2021-10-19T08:20:06.277Z",
  • "master_to_date": null,
  • "creator": "2310293102938",
  • "firstActiveDate": "2020-01-01T00:00:00.000Z",
  • "start_date": "2019-03-10T00:00:00.000Z",
  • "end_date": "2037-12-31T22:59:59.999Z",
  • "access_by_sharing": true,
  • "rigs": [
    ]
}

WellInstance

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

status
string
Enum: "conceptional" "completed" "plan_and_select" "engineering_and_design" "plan_for_execution" "execution" "occupied"
rig_booking_id
integer

References the RigBooking

well_id
integer

References the Well

sequence_priority
integer

If there is more than 1 well in a RigBooking, this field determines the order of them

start_date_is_hard
boolean

If true earliest_start_date determines when the earliest the well can be started

earliest_start_date
string <date>

If start_date_is_hard when is the earliest the well can be started

has_contract_with
integer

If set, bounds the well to a specific Rig

well_type
string
Enum: "development" "exploration" "appraisal" "injection" "multilateral" "plug_abandonment" "intervention" "geothermal" "water"
object

Estimates and start dates for this well instance

object (Well-2)

The meta-data of the well, references by WellInstance

{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "status": "conceptional",
  • "rig_booking_id": 123,
  • "well_id": 123,
  • "sequence_priority": 123,
  • "start_date_is_hard": false,
  • "earliest_start_date": "2021-10-19T08:20:06.277Z",
  • "has_contract_with": 1,
  • "well_type": "development",
  • "estimateData": {
    },
  • "well": {
    }
}

Well

id
integer
created_at
string <date-time>
updated_at
string <date-time>
revision
string

For internal use only

name
string
short_name
string
plno
string
uwi
string
pressure
string
Enum: "HPHT" ""
ocean_depth
string
comment
string
block_id
integer
asset_id
integer
license_id
integer
expected_bpd
integer
days_to_first_production
integer

Days to first production after well completion

environmental_constraints
string
start_up_constraints
string
dg1
boolean

Has passed DG1

dg2
boolean

Has passed DG2

dg3
boolean

Has passed DG3

work_order_issues
boolean

Work Order Issued

decision_to_drill
boolean

Decision To Drill

lli_ordered
boolean

LLI ordered

cpt_ordered
boolean

CPT ordered

cpt_conducted
boolean

CPT conducted

afc
boolean

Application For Concent

afd
boolean

Application For Discharge

well_test
boolean

Well Test

lwi_candidate
boolean

LWI Candidate

site_survey_ordered
boolean

Site Survey Ordered

site_survey_conducted
boolean

Site Survey Conducted

{
  • "id": 1,
  • "created_at": "2020-01-01T00:00:01",
  • "updated_at": "2020-01-01T00:00:01",
  • "revision": "1",
  • "name": "Full name of Well 123",
  • "short_name": "Well 123",
  • "plno": "0000 A",
  • "uwi": "321ABA",
  • "pressure": "HPHT",
  • "ocean_depth": 350,
  • "comment": "This is a comment for the well.",
  • "block_id": 1,
  • "asset_id": 1,
  • "license_id": 1,
  • "expected_bpd": 10000,
  • "days_to_first_production": 30,
  • "environmental_constraints": "These are the contraints...",
  • "start_up_constraints": "These are the contraints...",
  • "dg1": true,
  • "dg2": true,
  • "dg3": false,
  • "work_order_issues": false,
  • "decision_to_drill": false,
  • "lli_ordered": false,
  • "cpt_ordered": false,
  • "cpt_conducted": false,
  • "afc": false,
  • "afd": false,
  • "well_test": false,
  • "lwi_candidate": false,
  • "site_survey_ordered": false,
  • "site_survey_conducted": false
}