The "importwelltables" web service imports a well table into the specified datasource.
A typical URL is http://myserver.mycompany.com:8080/INTGeoServer/api/ds/{datasourcetype}/v1/sources/{datasource}/welltables/import with the POST method.
where
datasourcetype: type of a datasource, i.e. mongo, s3, etc.
datasource: unique id of a datasource
The following parameters are available:
importoptions : a JSON array representing import options. The following parameters are available:
wellName: is the name of well to import a table into (can be either existing well or new well).
tableName is the name of a well table. This is an optional parameter. The default is the name of the file.
overwrite indicates whether to override an existing well table. If overwrite is false and a well table already exists then an error will be thrown. This is an optional parameter. The default is false.
dataValuesRow is the 1 based index of row where data first appears
headerNameRow is the 1 based index of row where header first appears. This is an optional parameter.
headerTypeRow is the 1 based index of row where data types first appears. This is an optional parameter.
headerUnitRow is the 1 based index of row where data units first appears. This is an optional parameter.
delimiter is the character delimiter, if not specified then "," will be used (does not work with 'whitespace and tab' option)
timeZone is the time zone used for dates formatting. This is an optional parameter.
nullValue specifies what value will be treated as null
headerDictionary is a JSON object representing column mappings. For each column mapping:
updatedHeader is the name of a column in a CSV file
index is the 1 based index of a column
type is the data typed of a column value: double, datetime, long, integer, etc. This is an optional parameter.
unit is a unit of measurement of a column. This is an optional parameter.
dateFormat is a format used to transform dates. This is an optional parameter.
timeFormat is a format used to transform time. This is an optional parameter.
dateTimeFormatSeparator is the character delimiter, if not specified then " " will be used
timeFirst indicates whether the time precedes the date
file: a file containing a being imported well table. This is required parameter.
An example import is shown below (pass multipart/form-data as Content-Type):
importoptions:
{
"wellName": "DemoWell01",
"overwrite": true,
"dataValuesRow": 3,
"delimiter": ",",
"tableName":"Monthly Production 15_9F-1C",
"headerNameRow": 1,
"headerUnitRow": 2,
"headerDictionary": [
{
"updatedHeader": "Date",
"index": 1,
"type": "datetime"
},
{
"updatedHeader": "On Stream",
"index": 2,
"type": "datetime",
"unit": "hrs"
},
{
"updatedHeader": "Oil",
"index": 3,
"type": "double",
"unit": "Sm3"
},
{
"updatedHeader": "Gas",
"index": 4,
"type": "double",
"unit": "Sm3"
},
{
"updatedHeader": "Water",
"index": 5,
"type": "double",
"unit": "Sm3"
}
]
}
Here is an example response. This response has been formatted to improve readability.
"data": {
"files": [
{
"fileName": "Monthly Production 15_9F-1C .csv",
"id": "1d8af245-8da9-4ece-86cd-e115e9c88a3e",
"isOverriden": false,
"links": [
{
"rel": "Well",
"name": "Well",
"relEntity": "v1/schema/int/well",
"href": "/ivaap/api/ds/mongo/v1/sources/c9db3458-6698-49d9-ae8f-f407ce26ae2e/wells/1d8af245-8da9-4ece-86cd-e115e9c88a3e",
"children": true,
"hasProjectEntityChildren": false,
"isProjectEntity": true
}
]
}
]
}
The fileName entry is the name of a being imported well table file.
The id entry is a unique id of a well a table has been imported to.
The links sections provides a HATEOAS link to the "Well Data Web Service (v3)" service.