Skip to main content

ping@1.0.0

This adaptor exports the following namespaced functions:

http.post(path, body, options)

This adaptor exports the following from common:

as()
combine()
cursor()
dataPath()
dataValue()
dateFns
each()
field()
fields()
fn()
fnIf()
group()
lastReferenceValue()
map()
merge()
scrubEmojis()
sourceValue()
util

http

These functions belong to the http namespace.

http.post

post(path, body, options) ⇒ Operation

Make a POST request

ParamTypeDescription
pathstringPath to resource
bodyobjectObject which will be attached to the POST body
optionsRequestOptionsOptional request options

This operation writes the following keys to state:

State KeyDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

Example: Update intervention records in PING

post('/api/ingestion/v2/PNR-1363/data', {
"ShippingProcessId": "SHP-2345",
"InteropId": "INT-1234",
"Data": [{
"ExternalId": "id55",
"Fields": [{
"Name": "progres_lpinterventionid",
"Value": "12345-5u3i43f3-3r3f34f-34f34f"
}]
}]
});

Interfaces

HttpState

State object

Properties

NameDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

RequestOptions

Options provided to the HTTP request

Properties

NameTypeDescription
bodyobject | stringbody data to append to the request. JSON will be converted to a string.
queryobjectAn object of query parameters to be encoded into the URL.
headersobjectAn object of headers to append to the request.