https://api.welldatalabs.com/customflags

CustomFlag Object

Here is the shape of the CustomFlag object.

{
    "itemUid": <Well Data Labs unique id for the individual flag>
    "jobId": <Well Data Labs unique id for this job>
    "jobTime": <job time the custom flag was entered at>
    "stageName": <stage name the custom flag was entered at>
    "stageNumber": <stage number the custom flag was entered at>
    "type": <Comments or the name of the custom flag>
    "commentText": <comment text entered in the custom flag>
    "associatedValues": [ array of AssociatedValues included with the custom flag ]
}

Here is a fully populated CustomFlag object.

{
    "itemUid": "da487a53-f111-4f6c-a184-075953e88879",
    "jobId": "5000e906-9c4e-47bc-87a2-128d278e5ae9",
    "jobTime": "2016-08-12T14:39:10",
    "stageName": "Stage 8",
    "stageNumber": 8,
    "type": "Comment",
    "commentText": "blender issue",
    "associatedValues": null
},
{
    "itemUid": "2c41b18b-4eae-4ec9-b438-63e1a719fb44",
    "jobId": "5000e906-9c4e-47bc-87a2-128d278e5ae9",
    "jobTime": "2016-08-08T17:56:35",
    "stageName": "Stage 1",
    "stageNumber": 1,
    "type": "Acid",
    "commentText": "",
    "associatedValues": [
        {
            "name": "Treating Pressure",
            "unitText": "psi",
            "dataType": "numeric",
            "value": 7816.891493
        }
    ]
},
{
    "itemUid": "82e4b195-ced6-4900-9842-778879e25b62",
    "jobId": "5000e906-9c4e-47bc-87a2-128d278e5ae9",
    "jobTime": "2016-08-12T14:39:09",
    "stageName": "Stage 8",
    "stageNumber": 8,
    "type": "Acid",
    "commentText": "",
    "associatedValues": [
        {
            "name": "Treating Pressure",
            "unitText": "psi",
            "dataType": "numeric",
            "value": 9257.022569
        }
    ]
},
{
    "itemUid": "f0ed31c4-4d17-4e30-82b8-d9b1c84e6236",
    "jobId": "5000e906-9c4e-47bc-87a2-128d278e5ae9",
    "jobTime": "2016-08-19T09:36:03",
    "stageName": "Stage 27",
    "stageNumber": 27,
    "type": "Proppant 1",
    "commentText": "Switched to x prop",
    "associatedValues": null
}

AssociatedValues Object

The associatedValues property contains an array of AssociatedValue objects. AssociatedValue provides information about data associated with a custom flag such as the column name, the unit, and the data value at the jobTime the flag was added.

{
    "name": "Treating Pressure",
    "unitText": "psi",
    "dataType": "numeric",
    "value": 9553.78
}

HTTP Response Status Codes

Status Code Description
200 Successful request and data was returned in the body
400 JobId or APINumber not valid or missing.
404 No results found. Note that the endpoint was found, we just didn't find any data matching the criteria.
500 Unexpected error

GET https://api.welldatalabs.com/customflags

A GET request to the base endpoint with no Id parameter will return an array of CustomFlag objects for the 1000 most recently created or modified.

curl https://api.welldatalabs.com/customflags --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="

GET https://api.welldatalabs.com/customflags/{Id},{Id},{Id}

A GET request that includes a list of one or more Id parameters will return an array of CustomFlag objects for all jobs that match the given Ids. Each Id can be either a well API Number or a Well Data Labs Job Id or Well Id. If any of the Ids represent the same job, only one instance of the CustomFlags object is returned.

Multiple CustomFlag objects might be returned for a single well API Number if multiple jobs exist for that well. It's possible to have more than one job (multiple fracs or a refrac) for a single well.

curl https://api.welldatalabs.com/customflags/00-012-00000-10- --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="
Id Parameters

Id Description
API Number Well API Number; e.g. 00-012-00000-10-
JobId Well Data Labs assigned Job Id; e.g. 5000e906-9c4e-47bc-87a2-128d278e5ae9
WellId Well Data Labs assigned Well Id; e.g. cc5a8ef6-9275-4b75-9a5f-270510f090c1

GET https://api.welldatalabs.com/customflags?fromChangeUtc={datetime}&toChangeUtc={datetime}

A GET request to the base endpoint with optional fromChangeUtc and toChangeUtc parameters will return an array of CustomFlag objects for the 1000 most recently created or modified in the given timeframe.

curl https://api.welldatalabs.com/customflags?fromChangeUtc=2017-11-15T21:19:34&toChangeUtc=2018-11-17T21:19:34 --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="
Change Date Parameters*

Parameter Description
fromChangeUtc={datetime} Returns results for all jobs with changes greater than or equal to this parameter value.
toChangeUtc={datetime} Returns results for all jobs with changes less than or equal to this parameter value.
fromChangeUtc={datetime}&toChangeUtc={datetime} Returns results for all jobs with changes between and including the fromChangeUtc and toChangeUtc.
*The ChangeUtc parameters include milliseconds. Parameter values will be matched to the millisecond. If not all expected results are returned, increase or decrease the parameter value by one second.

GET https://api.welldatalabs.com/customflags?fromStageNumber={number}&toStageNumber={number}

A GET request to the base endpoint with optional fromStageNumber and toStageNumber parameters will return an array of CustomFlag objects for the 1000 most recently created or modified and match the given stage numbers.

curl https://api.welldatalabs.com/customflags?fromStageNumber=1&toStageNumber=2 --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="
curl https://api.welldatalabs.com/customflags/00-012-00000-10-?fromStageNumber=1&toStageNumber=2 --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="
curl https://api.welldatalabs.com/customflags?fromChangeUtc=2017-11-15T21:19:34&toChangeUtc=2018-11-17T21:19:34&fromStageNumber=1&toStageNumber=2 --header "Authorization: Bearer b+S15uKWEK0lFU+NomEmvekn8yk/ALTTBAYOJalVKrI="
Stage Number Parameters

Parameter Description
fromStageNumber={number} Returns results for all stages greater than or equal to this parameter value.
toStageNumber={number} Returns results for all stages less than or equal to this parameter value.
fromStageNumber={number}&toStageNumber={number} Returns results for all stages between and including the stages fromStageNumber and toStageNumber.