Parse Data From Upload File

The following will take you step by step to use Parse API.

1. Request URL

/{PDM Server domain}/parse

Method: POST

2. Request headers

Name Value

Content-Type

form-data

3. Request body

Key Type Required Example value Description

uploadedFile

Excel File

yes

WELL VOL DAILY.xlsx

uploadedFile is pre-defined in metadata table BUSINESS_OBJECT and case insensitive

params

Json File

yes

import.json

language is required and it is case sensitive and only en value is supported for now

a. uploadedFile

Name Required Example value Description

Excel sheet name

yes

WELL VOL DAILY

sheet name corresponds to a table name

Columns

yes

UWI

each column corresponds to a field of table

Rows

yes

OPT-1-205

first row corresponds field name, the other data

b. params json

Name Type Required Default value Example value Description

boName

string

yes

``WELL VOL DAILY''

boName is pre-defined in metadata table BUSINESS_OBJECT and case insensitive.

language

string

yes

``en''

language is case sensitive and only en value is supported for now.

timezone

string

yes

``GMT+08:00''

timezone is case sensitive. Timezone value only supports specific format GMT+xx:xx, **GMT.

readback

bool

no

false

TRUE

Tell the service to return the data in same request.

offset

number

no

0

offset is based index of first record to be read.

limit

number

no

100

10000

limit is the total number of records to be read for a particular Business Object.

dspdmUnits

array

no

dspdmUnits list target unit for some of attribute

Example: params.json

bulk import postman
Figure 1. Bulk import in postman

c. Result

{
    "status": {
        "statusCode": 1,
        "statusLabel": "Success"
    },
    "messages": [
        {
            "message": "3 records updated successfully.",
            "status": {
                "statusCode": 1,
                "statusLabel": "Success"
            }
        },
        {
            "message": "1 records ignored from update because of no change in data.",
            "status": {
                "statusCode": 1,
                "statusLabel": "Success"
            }
        }
    ],
    "exception": {},
    "data": {
        "WELL": {
            "totalRecords": 4,
            "list": [
                {
                    "type": "WELL",
                    "id": 11160,
                    "WELL_ID": 11160,
                    "UWI": "HAL0845557402",
                    "WELL_NAME": "Well 08455574",
                    "WELL_ALIAS_NAME": "705 MMPG",
                    "AREA_ID": 111,
                    "AREA_NAME": "Asset Moldova",
                    "FIELD_ID": 125,
                    "FIELD_NAME": "PS 30 Zemes",
                    "PLATFORM_ID": 666,
                    "PLATFORM_NAME": "Facility 00035229",
                    "LEASE_NAME": "Zemes",
                    "OFFSHORE_IND": false,
                    "IS_ACTIVE": true,
                    "X_COORDINATE": 26.44349819,
                    "Y_COORDINATE": 46.54498868,
                    "CRS_ID": 3,
                    "CRS_NAME": "World Geodetic System 1984",
                    "PRODUCTION_METHOD_ID": 18,
                    "PRODUCTION_METHOD": "Artificial Lift Sys",
                    "WELL_TYPE_ID": 1,
                    "WELL_TYPE": "OIL",
                    "CURRENT_CLASS_ID": 114,
                    "WELL_CLASS": "Cat.22 Production",
                    "CURRENT_STATUS_ID": 265,
                    "R_WELL_STATUS_NAME": "Production",
                    "DEPTH_DATUM_ID": 4,
                    "DEPTH_DATUM": "KellyBushingElevation",
                    "DEPTH_DATUM_ELEV": 4.0,
                    "language": "en",
                    "limit": 10000,
                    "offset": 1,
                    "readBack": true,
                    "timezone": "GMT+08:00"
                },
                ...
            ]
        }
    },
    "version": "0.0.0.0A",
    "threadName": "buffalo_29340",
    "requestTime": "2021-04-21 17:21:20.404 +08:00",
    "responseTime": "2021-04-21 17:21:22.801 +08:00"
}

4. Response

Please see Responses