The "importwelltubingset" web service imports a well tubing set into the specified datasource.
A typical URL is http://myserver.mycompany.com:8080/INTGeoServer/api/ds/{datasourcetype}/v1/sources/{datasource}/tubingsets/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 tubing set into (can be either existing well or new well).
tubingSetName is the name of tubing set. This is an optional parameter. The default is the name of the file.
assemblyType is the type of a tubing set. This is an optional paramater. The default is "tubing".
overwrite indicates whether to override an existing well tubung set. If overwrite is false and a tubiung set already exists then an error will be thrown. This is an optional parameter. The default is false.
mdBottom is the depth of this well tubing set. This is an optional paramter. The default is 0.
mdBottomUnit is the unit symbol associated with this well tubing set. This is an optional parameter.
dataValuesRow: is the 1 based index of row where data first appears
delimiter is the character delimiter, if not specified then "," will be used (does not work with 'whitespace and tab' option)
columnmappings : a JSON array representing pumping data curves. The following parameters are available:
columnIndex is the 1 based index of column
mappingID is the column mappings id. See "Mapping ids" section below for required values
type is the data type of field: string, double, long or date. This is an optional paramter. Only matters for property columns. The default is string.
unit: depending on mappingID, see below for which mappingIDs require unit
file: a file containing a being imported well pumping. This is required parameter.
Below are the different mappingIDs supported if a mappingID is not found, the column will be treated as a property with the mappingID being the name of the property. A mappingID cannot be specified twice.
Mapping ids:
sequenceNumber: required if topDepth and baseDepth are not specified
length: required if topDepth and baseDepth are not specified
description: optional
componentType: required
topDepth: required if sequenceNumber and length are not specified
baseDepth: required if sequenceNumber and length are not specified
innerDiameter: required
outerDiameter: required
maxOuterDiamter: optional
The following mappingID fields require a unit to be specified:
length
topDepth
baseDepth
innerDiameter
outerDiameter
maxOuterDiameter
An example import is shown below (pass multipart/form-data as Content-Type):
importoptions:
{
"wellName": "tubingsetwell",
"overwrite": true,
"dataValuesRow": 3,
"delimiter": ",",
"tubingSetName":"ImportedTubingSet",
"assemblyType":"tubing"
}
columnmappings:
[
{
"mappingID": "componentType",
"columnIndex": 1,
"type": "double"
},
{
"mappingID": "description",
"columnIndex": 3,
"type": "string"
},
{
"mappingID": "innerDiameter",
"columnIndex": 4,
"type": "double",
"unit": "in"
},
{
"mappingID": "outerDiameter",
"columnIndex": 5,
"type": "double",
"unit": "in"
},
{
"mappingID": "topDepth",
"columnIndex": 7,
"type": "double",
"unit": "ft"
},
{
"mappingID": "baseDepth",
"columnIndex": 8,
"type": "double",
"unit": "ft"
},
{
"mappingID": "Torque",
"columnIndex": 9,
"type": "double"
},
{
"mappingID": "Tubing Grade",
"columnIndex": 10,
"type": "string"
},
{
"mappingID": "Tubing Strength",
"columnIndex": 11,
"type": "double"
},
{
"mappingID": "Source",
"columnIndex": 12,
"type": "string"
}
]
Here is an example response. This response has been formatted to improve readability.
{
"from": {
"actor": "akka://DefaultActorSystemControllerActorSystem:ImportWellTubingSetsJsonActor:ImportWellTubingSetsResponse for ImportWellTubingSetsRequest:ImportWellTubingSetsRequest{klass=AbstractWellTubingSetImporter, sourceType=mongo, sourceName=c9db3458-6698-49d9-ae8f-f407ce26ae2e, uploadedFiles=numberOfUploadedFiles=1, file #0=UploadedFile{file=tubingset.csv, directory=UPLOADDIR2105a3a7-4190-49c6-b22e-5baf13ba0b1313037829531077215593, fileSize=1826, checksum=5a5c857f9e127c7a5de01052a6cbc26f, mimeType=text/csv, originalFileName=tubingset.csv, parameterName=file}, parameters=WellTubingSetImportParameters{wellName=tubingsetwell, tubingSetName=ImportedTubingSet, assemblyType=tubing, columnParameters=[WellTubingSetImportColumnMappings{columnIndex=0, mappingName=componentType, mappingType=componentType, dataType=double, unit=null}, WellTubingSetImportColumnMappings{columnIndex=2, mappingName=description, mappingType=description, dataType=string, unit=null}, WellTubingSetImportColumnMappings{columnIndex=3, mappingName=innerDiameter, mappingType=innerDiamter, dataType=double, unit=in}, WellTubingSetImportColumnMappings{columnIndex=4, mappingName=outerDiameter, mappingType=outerDiameter, dataType=double, unit=in}, WellTubingSetImportColumnMappings{columnIndex=6, mappingName=topDepth, mappingType=topDepth, dataType=double, unit=ft}, WellTubingSetImportColumnMappings{columnIndex=7, mappingName=baseDepth, mappingType=baseDepth, dataType=double, unit=ft}, WellTubingSetImportColumnMappings{columnIndex=8, mappingName=Torque, mappingType=property, dataType=double, unit=null}, WellTubingSetImportColumnMappings{columnIndex=9, mappingName=Tubing Grade, mappingType=property, dataType=string, unit=null}, WellTubingSetImportColumnMappings{columnIndex=10, mappingName=Tubing Strength, mappingType=property, dataType=double, unit=null}, WellTubingSetImportColumnMappings{columnIndex=11, mappingName=Source, mappingType=property, dataType=string, unit=null}], overwrite=true, delimiter=,}, pathInfo=/ds/mongo/v1/sources/c9db3458-6698-49d9-ae8f-f407ce26ae2e/tubingsets/import}"
},
"data": {
"files": [
{
"fileName": "tubingset.csv",
"id": "a9c04cc1-cd55-407d-a80a-9c7e5289b953",
"links": [
{
"rel": "Well",
"name": "Well",
"relEntity": "v1/schema/int/well",
"href": "/ivaap/api/ds/mongo/v1/sources/c9db3458-6698-49d9-ae8f-f407ce26ae2e/wells/a9c04cc1-cd55-407d-a80a-9c7e5289b953",
"children": true,
"hasProjectEntityChildren": false,
"isProjectEntity": true
}
]
}
]
}
}
The fileName entry is the name of a being imported tubing set file.
The id entry is a unique id of a well a tubing set has been imported to.
The links sections provides aHATEOAS link to the "Well Data Web Service (v3)" service.