How to get device acknowledge time from modifyCloudToDeviceConfig in google iot core - google-cloud-messaging

I am using google iot core with firebase function.
When i request client.projects.locations.registries.devices.modifyCloudToDeviceConfig
i get response as :-
{ status: 200,
statusText: 'OK',
headers:
{ 'content-type': 'application/json; charset=UTF-8',
vary: 'X-Origin, Referer, Origin,Accept-Encoding',
date: 'Sat, 10 Feb 2018 20:18:19 GMT',
server: 'ESF',
'cache-control': 'private',
'x-xss-protection': '1; mode=block',
'x-frame-options': 'SAMEORIGIN',
'x-content-type-options': 'nosniff',
'alt-svc': 'hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"',
'accept-ranges': 'none',
connection: 'close' },
config:
{ adapter: [Function: httpAdapter],
transformRequest: { '0': [Function: transformRequest] },
transformResponse: { '0': [Function: transformResponse] },
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
headers:
{ Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: 'Bearer ya29.c.ElxeBWp21IRsyESzVRbsSxiuArT6fpTZSfrgSI1RCk6DiHlU2GaLyTmOUd-4tZHOFCl2aAQJ5ZN4bQP3cBlzZ2AFl2Op8iArxnlcFv8l1OF-YZLdfom0hqnVcsH7OA',
'User-Agent': 'google-api-nodejs-client/1.2.1' },
method: 'post',
url: 'https://cloudiot.googleapis.com/v1/projects/nodemcuiot-76b3f/locations/us-central1/registries/asset-tracker-registry/devices/esp32_21DF30:modifyCloudToDeviceConfig',
paramsSerializer: [Function],
data: undefined,
params:
{ version_to_update: 0,
binary_data: 'eyJ0ZXN0IjoicXFzczExIn0=' } },
request:
ClientRequest {
domain: null,
_events:
{ socket: [Function],
abort: [Function],
aborted: [Function],
error: [Function],
timeout: [Function],
prefinish: [Function: requestOnPrefinish] },
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedHeader: {},
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 10,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'cloudiot.googleapis.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 571,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
read: [Function],
_consuming: true,
write: [Function: writeAfterFIN],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 10,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'cloudiot.googleapis.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 571,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
read: [Function],
_consuming: true,
write: [Function: writeAfterFIN],
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
_header: 'POST /v1/projects/nodemcuiot-76b3f/locations/u
How to get deviceacktime from the above response as it is mentioned in docs
https://cloud.google.com/iot/docs/reference/rest/v1/projects.locations.registries.devices/modifyCloudToDeviceConfig
that it will respond with deviceconfig but i am unable to debug the response with the data.

The lastConfigAckTime is from the device metadata not the API call to the modifyCloudToDeviceConfig.
Use the API explorer to experiment with retrieving your device. Just put in your device ID, e.g. projects/<your-project-id>/locations/<your-cloud-region>/registries/<your-registry-id>/devices/<your-device-id>
Additional examples in various programming languages
can be found in the documentation.

Related

Calling an API on Heroku, How to clear Error 403?

I run in some trouble loading my API call in my Heroku backend. I receive an error saying that:
"Bad response! Please check your url. Status Code: 403"
My Heroku log says that:.........................................................................................................................................................................................................................................................................................................
13.441731+00:00 : _events: [Object: null prototype],
13.441734+00:00 : _eventsCount: 2,
13.441734+00:00 : _maxListeners: undefined,
13.441734+00:00 : defaultPort: 80,
13.441734+00:00 : protocol: 'http:',
13.441735+00:00 : options: [Object: null prototype],
13.441735+00:00 : requests: [Object: null prototype] {},
13.441735+00:00 : sockets: [Object: null prototype],
13.441735+00:00 : freeSockets: [Object: null prototype] {},
13.441735+00:00 : keepAliveMsecs: 1000,
13.441735+00:00 : keepAlive: false,
13.441736+00:00 : maxSockets: Infinity,
13.441736+00:00 : maxFreeSockets: 256,
13.441736+00:00 : scheduling: 'lifo',
13.441736+00:00 : maxTotalSockets: Infinity,
13.441736+00:00 : totalSocketCount: 1,
13.441736+00:00 : [Symbol(kCapture)]: false
13.441737+00:00 : },
13.441737+00:00 : socketPath: undefined,
13.441737+00:00 : method: 'GET',
13.441737+00:00 : maxHeaderSize: undefined,
13.441737+00:00 : insecureHTTPParser: undefined,
13.441737+00:00 : path: '/api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost',
13.441738+00:00 : _ended: false,
13.441738+00:00 : res: [Circular *2],
13.441738+00:00 : aborted: false,
13.441738+00:00 : timeoutCb: null,
13.441738+00:00 : upgradeOrConnect: false,
13.441739+00:00 : parser: HTTPParser {
13.441739+00:00 : '0': null,
13.441739+00:00 : '1': [Function: parserOnHeaders],
13.441739+00:00 : '2': [Function: parserOnHeadersComplete],
13.441739+00:00 : '3': [Function: parserOnBody],
13.441739+00:00 : '4': [Function: parserOnMessageComplete],
13.441740+00:00 : '5': null,
13.441740+00:00 : '6': null,
13.441740+00:00 : _headers: [],
13.441740+00:00 : _url: '',
13.441741+00:00 : socket: [Socket],
13.441741+00:00 : incoming: [Circular *2],
13.441741+00:00 : outgoing: [Circular *3],
13.441741+00:00 : maxHeaderPairs: 2000,
13.441741+00:00 : _consumed: false,
13.441742+00:00 : onIncoming: [Function: parserOnIncomingClient],
13.441742+00:00 : [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
13.441742+00:00 : },
13.441742+00:00 : maxHeadersCount: null,
13.441742+00:00 : reusedSocket: false,
13.441743+00:00 : host: 'skiplagged.com',
13.441743+00:00 : protocol: 'http:',
13.441743+00:00 : [Symbol(kCapture)]: false,
13.441743+00:00 : [Symbol(kNeedDrain)]: false,
13.441743+00:00 : [Symbol(corked)]: 0,
13.441744+00:00 : [Symbol(kOutHeaders)]: [Object: null prototype] { host: [Array] }
13.441744+00:00 : },
13.441744+00:00 : [Symbol(kCapture)]: false,
13.441744+00:00 : [Symbol(kHeaders)]: null,
13.441744+00:00 : [Symbol(kHeadersCount)]: 24,
13.441744+00:00 : [Symbol(kTrailers)]: null,
13.441745+00:00 : [Symbol(kTrailersCount)]: 0,
13.441745+00:00 : [Symbol(RequestTimeout)]: undefined
13.441745+00:00 : }
13.441524+00:00 : <ref *2> IncomingMessage {
13.441546+00:00 : _readableState: ReadableState {
13.441546+00:00 : objectMode: false,
13.441546+00:00 : highWaterMark: 16384,
13.441546+00:00 : buffer: BufferList { head: null, tail: null, length: 0 },
13.441547+00:00 : length: 0,
13.441548+00:00 : pipes: [],
13.441548+00:00 : flowing: null,
13.441548+00:00 : ended: false,
13.441548+00:00 : endEmitted: false,
13.441549+00:00 : reading: false,
13.441549+00:00 : constructed: true,
13.441549+00:00 : sync: true,
13.441549+00:00 : needReadable: false,
13.441549+00:00 : emittedReadable: false,
13.441550+00:00 : readableListening: false,
13.441550+00:00 : resumeScheduled: false,
13.441550+00:00 : errorEmitted: false,
13.441550+00:00 : emitClose: true,
13.441551+00:00 : autoDestroy: true,
13.441551+00:00 : destroyed: false,
13.441551+00:00 : errored: null,
13.441551+00:00 : closed: false,
13.441551+00:00 : closeEmitted: false,
13.441552+00:00 : defaultEncoding: 'utf8',
13.441552+00:00 : awaitDrainWriters: null,
13.441552+00:00 : multiAwaitDrain: false,
13.441552+00:00 : readingMore: true,
13.441552+00:00 : dataEmitted: false,
13.441553+00:00 : decoder: null,
13.441553+00:00 : encoding: null,
13.441553+00:00 : [Symbol(kPaused)]: null
13.441553+00:00 : },
13.441554+00:00 : _events: [Object: null prototype] { end: [Function: responseOnEnd] },
13.441554+00:00 : _eventsCount: 1,
13.441554+00:00 : _maxListeners: undefined,
13.441555+00:00 : socket: <ref *1> Socket {
13.441555+00:00 : connecting: false,
13.441555+00:00 : _hadError: false,
13.441555+00:00 : _parent: null,
13.441556+00:00 : _host: 'skiplagged.com',
13.441556+00:00 : _readableState: ReadableState {
13.441556+00:00 : objectMode: false,
13.441556+00:00 : highWaterMark: 16384,
13.441556+00:00 : buffer: BufferList { head: null, tail: null, length: 0 },
13.441557+00:00 : length: 0,
13.441557+00:00 : pipes: [],
13.441557+00:00 : flowing: true,
13.441557+00:00 : ended: false,
13.441558+00:00 : endEmitted: false,
13.441558+00:00 : reading: false,
13.441558+00:00 : constructed: true,
13.441558+00:00 : sync: false,
13.441558+00:00 : needReadable: true,
13.441559+00:00 : emittedReadable: false,
13.441559+00:00 : readableListening: false,
13.441559+00:00 : resumeScheduled: false,
13.441559+00:00 : errorEmitted: false,
13.441559+00:00 : emitClose: false,
13.441560+00:00 : autoDestroy: true,
13.441560+00:00 : destroyed: false,
13.441560+00:00 : errored: null,
13.441560+00:00 : closed: false,
13.441560+00:00 : closeEmitted: false,
13.441561+00:00 : defaultEncoding: 'utf8',
13.441561+00:00 : awaitDrainWriters: null,
13.441561+00:00 : multiAwaitDrain: false,
13.441561+00:00 : readingMore: false,
13.441561+00:00 : dataEmitted: true,
13.441561+00:00 : decoder: null,
13.441562+00:00 : encoding: null,
13.441562+00:00 : [Symbol(kPaused)]: false
13.441562+00:00 : },
13.441562+00:00 : _events: [Object: null prototype] {
13.441562+00:00 : end: [Array],
13.441563+00:00 : free: [Function: onFree],
13.441565+00:00 : close: [Array],
13.441565+00:00 : timeout: [Array],
13.441566+00:00 : agentRemove: [Function: onRemove],
13.441566+00:00 : error: [Function: socketErrorListener],
13.441566+00:00 : data: [Function: socketOnData],
13.441566+00:00 : drain: [Function: ondrain]
13.441567+00:00 : },
13.441567+00:00 : _eventsCount: 8,
13.441567+00:00 : _maxListeners: undefined,
13.441567+00:00 : _writableState: WritableState {
13.441570+00:00 : objectMode: false,
13.441570+00:00 : highWaterMark: 16384,
13.441570+00:00 : finalCalled: false,
13.441570+00:00 : needDrain: false,
13.441570+00:00 : ending: false,
13.441570+00:00 : ended: false,
13.441571+00:00 : finished: false,
13.441571+00:00 : destroyed: false,
13.441571+00:00 : decodeStrings: false,
13.441571+00:00 : defaultEncoding: 'utf8',
13.441571+00:00 : length: 0,
13.441571+00:00 : writing: false,
13.441572+00:00 : corked: 0,
13.441572+00:00 : sync: false,
13.441572+00:00 : bufferProcessing: false,
13.441572+00:00 : onwrite: [Function: bound onwrite],
13.441572+00:00 : writecb: null,
13.441573+00:00 : writelen: 0,
13.441573+00:00 : afterWriteTickInfo: null,
13.441573+00:00 : buffered: [],
13.441573+00:00 : bufferedIndex: 0,
13.441573+00:00 : allBuffers: true,
13.441573+00:00 : allNoop: true,
13.441574+00:00 : pendingcb: 0,
13.441574+00:00 : constructed: true,
13.441574+00:00 : prefinished: false,
13.441574+00:00 : errorEmitted: false,
13.441574+00:00 : emitClose: false,
13.441574+00:00 : autoDestroy: true,
13.441575+00:00 : errored: null,
13.441575+00:00 : closed: false,
13.441575+00:00 : closeEmitted: false,
13.441575+00:00 : [Symbol(kOnFinished)]: []
13.441575+00:00 : },
13.441575+00:00 : allowHalfOpen: false,
13.441576+00:00 : _sockname: null,
13.441576+00:00 : _pendingData: null,
13.441576+00:00 : _pendingEncoding: '',
13.441576+00:00 : server: null,
13.441576+00:00 : _server: null,
13.441577+00:00 : parser: HTTPParser {
13.441577+00:00 : '0': null,
13.441577+00:00 : '1': [Function: parserOnHeaders],
13.441577+00:00 : '2': [Function: parserOnHeadersComplete],
13.441577+00:00 : '3': [Function: parserOnBody],
13.441578+00:00 : '4': [Function: parserOnMessageComplete],
13.441578+00:00 : '5': null,
13.441578+00:00 : '6': null,
13.441578+00:00 : _headers: [],
13.441578+00:00 : _url: '',
13.441579+00:00 : socket: [Circular *1],
13.441579+00:00 : incoming: [Circular *2],
13.441579+00:00 : outgoing: [ClientRequest],
13.441579+00:00 : maxHeaderPairs: 2000,
13.441579+00:00 : _consumed: false,
13.441580+00:00 : onIncoming: [Function: parserOnIncomingClient],
13.441580+00:00 : [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
13.441580+00:00 : },
13.441580+00:00 : _httpMessage: ClientRequest {
13.441581+00:00 : _events: [Object: null prototype],
13.441581+00:00 : _eventsCount: 2,
13.441581+00:00 : _maxListeners: undefined,
13.441581+00:00 : outputData: [],
13.441581+00:00 : outputSize: 0,
13.441582+00:00 : writable: true,
13.441582+00:00 : destroyed: false,
13.441582+00:00 : _last: true,
13.441582+00:00 : chunkedEncoding: false,
13.441582+00:00 : shouldKeepAlive: false,
13.441582+00:00 : maxRequestsOnConnectionReached: false,
13.441588+00:00 : _defaultKeepAlive: true,
13.441588+00:00 : useChunkedEncodingByDefault: false,
13.441588+00:00 : sendDate: false,
13.441589+00:00 : _removedConnection: false,
13.441589+00:00 : _removedContLen: false,
13.441589+00:00 : _removedTE: false,
13.441589+00:00 : _contentLength: 0,
13.441589+00:00 : _hasBody: true,
13.441590+00:00 : _trailer: '',
13.441590+00:00 : finished: true,
13.441590+00:00 : _headerSent: true,
13.441590+00:00 : _closed: false,
13.441590+00:00 : socket: [Circular *1],
13.441598+00:00 : _header: 'GET /api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost HTTP/1.1\r\n' +
13.441598+00:00 : 'Host: skiplagged.com\r\n' +
13.441601+00:00 : 'Connection: close\r\n' +
13.441601+00:00 : '\r\n',
13.441601+00:00 : _keepAliveTimeout: 0,
13.441601+00:00 : _onPendingData: [Function: nop],
13.441601+00:00 : agent: [Agent],
13.441602+00:00 : socketPath: undefined,
13.441602+00:00 : method: 'GET',
13.441602+00:00 : maxHeaderSize: undefined,
13.441602+00:00 : insecureHTTPParser: undefined,
13.441602+00:00 : path: '/api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost',
13.441603+00:00 : _ended: false,
13.441603+00:00 : res: [Circular *2],
13.441603+00:00 : aborted: false,
13.441603+00:00 : timeoutCb: null,
13.441603+00:00 : upgradeOrConnect: false,
13.441603+00:00 : parser: [HTTPParser],
13.441604+00:00 : maxHeadersCount: null,
13.441604+00:00 : reusedSocket: false,
13.441604+00:00 : host: 'skiplagged.com',
13.441604+00:00 : protocol: 'http:',
13.441604+00:00 : [Symbol(kCapture)]: false,
13.441605+00:00 : [Symbol(kNeedDrain)]: false,
13.441605+00:00 : [Symbol(corked)]: 0,
13.441605+00:00 : [Symbol(kOutHeaders)]: [Object: null prototype]
13.441605+00:00 : },
13.441605+00:00 : [Symbol(async_id_symbol)]: 89,
13.441606+00:00 : [Symbol(kHandle)]: TCP {
13.441606+00:00 : reading: true,
13.441606+00:00 : onconnection: null,
13.441606+00:00 : [Symbol(owner_symbol)]: [Circular *1]
13.441606+00:00 : },
13.441607+00:00 : [Symbol(lastWriteQueueSize)]: 0,
13.441607+00:00 : [Symbol(timeout)]: null,
13.441607+00:00 : [Symbol(kBuffer)]: null,
13.441607+00:00 : [Symbol(kBufferCb)]: null,
13.441607+00:00 : [Symbol(kBufferGen)]: null,
13.441607+00:00 : [Symbol(kCapture)]: false,
13.441608+00:00 : [Symbol(kSetNoDelay)]: false,
13.441608+00:00 : [Symbol(kSetKeepAlive)]: false,
13.441608+00:00 : [Symbol(kSetKeepAliveInitialDelay)]: 0,
13.441608+00:00 : [Symbol(kBytesRead)]: 0,
13.441608+00:00 : [Symbol(kBytesWritten)]: 0,
13.441609+00:00 : [Symbol(RequestTimeout)]: undefined
13.441609+00:00 : },
13.441609+00:00 : httpVersionMajor: 1,
13.441609+00:00 : httpVersionMinor: 1,
13.441609+00:00 : httpVersion: '1.1',
13.441610+00:00 : complete: false,
13.441610+00:00 : rawHeaders: [
13.441610+00:00 : 'Date',
13.441610+00:00 : 'Mon, 15 Aug 2022 19:18:13 GMT',
13.441610+00:00 : 'Content-Type',
13.441611+00:00 : 'text/html; charset=UTF-8',
13.441611+00:00 : 'Transfer-Encoding',
13.441611+00:00 : 'chunked',
13.441611+00:00 : 'Connection',
13.441611+00:00 : 'close',
13.441611+00:00 : 'CF-Chl-Bypass',
13.441612+00:00 : '1',
13.441612+00:00 : 'Permissions-Policy',
13.441616+00:00 : 'accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()',
13.441616+00:00 : 'Cache-Control',
13.441616+00:00 : 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0',
13.441616+00:00 : 'Expires',
13.441616+00:00 : 'Thu, 01 Jan 1970 00:00:01 GMT',
13.441617+00:00 : 'X-Frame-Options',
13.441617+00:00 : 'SAMEORIGIN',
13.441617+00:00 : 'Server',
13.441617+00:00 : 'cloudflare',
13.441617+00:00 : 'CF-RAY',
13.441618+00:00 : '73b4465dbec59c84-IAD',
13.441618+00:00 : 'alt-svc',
13.441618+00:00 : 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'
13.441618+00:00 : ],
13.441619+00:00 : rawTrailers: [],
13.441619+00:00 : aborted: false,
13.441619+00:00 : upgrade: false,
13.441619+00:00 : url: '',
13.441619+00:00 : method: null,
13.441619+00:00 : statusCode: 403,
13.441620+00:00 : statusMessage: 'Forbidden',
13.441620+00:00 : client: <ref *1> Socket {
13.441620+00:00 : connecting: false,
13.441620+00:00 : _hadError: false,
13.441620+00:00 : _parent: null,
13.441620+00:00 : _host: 'skiplagged.com',
13.441623+00:00 : _readableState: ReadableState {
13.441623+00:00 : objectMode: false,
13.441623+00:00 : highWaterMark: 16384,
13.441623+00:00 : buffer: BufferList { head: null, tail: null, length: 0 },
13.441624+00:00 : length: 0,
13.441624+00:00 : pipes: [],
13.441624+00:00 : flowing: true,
13.441624+00:00 : ended: false,
13.441627+00:00 : endEmitted: false,
13.441628+00:00 : reading: false,
13.441628+00:00 : constructed: true,
13.441628+00:00 : sync: false,
13.441628+00:00 : needReadable: true,
13.441628+00:00 : emittedReadable: false,
13.441629+00:00 : readableListening: false,
13.441629+00:00 : resumeScheduled: false,
13.441629+00:00 : errorEmitted: false,
13.441629+00:00 : emitClose: false,
13.441629+00:00 : autoDestroy: true,
13.441629+00:00 : destroyed: false,
13.441630+00:00 : errored: null,
13.441630+00:00 : closed: false,
13.441630+00:00 : closeEmitted: false,
13.441630+00:00 : defaultEncoding: 'utf8',
13.441630+00:00 : awaitDrainWriters: null,
13.441631+00:00 : multiAwaitDrain: false,
13.441631+00:00 : readingMore: false,
13.441631+00:00 : dataEmitted: true,
13.441631+00:00 : decoder: null,
13.441631+00:00 : encoding: null,
13.441632+00:00 : [Symbol(kPaused)]: false
13.441632+00:00 : },
13.441632+00:00 : _events: [Object: null prototype] {
13.441632+00:00 : end: [Array],
13.441632+00:00 : free: [Function: onFree],
13.441633+00:00 : close: [Array],
13.441633+00:00 : timeout: [Array],
13.441633+00:00 : agentRemove: [Function: onRemove],
13.441633+00:00 : error: [Function: socketErrorListener],
13.441637+00:00 : data: [Function: socketOnData],
13.441637+00:00 : drain: [Function: ondrain]
13.441637+00:00 : },
13.441638+00:00 : _eventsCount: 8,
13.441638+00:00 : _maxListeners: undefined,
13.441638+00:00 : _writableState: WritableState {
13.441638+00:00 : objectMode: false,
13.441638+00:00 : highWaterMark: 16384,
13.441638+00:00 : finalCalled: false,
13.441639+00:00 : needDrain: false,
13.441639+00:00 : ending: false,
13.441639+00:00 : ended: false,
13.441639+00:00 : finished: false,
13.441639+00:00 : destroyed: false,
13.441639+00:00 : decodeStrings: false,
13.441640+00:00 : defaultEncoding: 'utf8',
13.441640+00:00 : length: 0,
13.441640+00:00 : writing: false,
13.441640+00:00 : corked: 0,
13.441640+00:00 : sync: false,
13.441640+00:00 : bufferProcessing: false,
13.441641+00:00 : onwrite: [Function: bound onwrite],
13.441641+00:00 : writecb: null,
13.441641+00:00 : writelen: 0,
13.441641+00:00 : afterWriteTickInfo: null,
13.441641+00:00 : buffered: [],
13.441642+00:00 : bufferedIndex: 0,
13.441642+00:00 : allBuffers: true,
13.441642+00:00 : allNoop: true,
13.441642+00:00 : pendingcb: 0,
13.441642+00:00 : constructed: true,
13.441642+00:00 : prefinished: false,
13.441642+00:00 : errorEmitted: false,
13.441643+00:00 : emitClose: false,
13.441643+00:00 : autoDestroy: true,
13.441643+00:00 : errored: null,
13.441643+00:00 : closed: false,
13.441643+00:00 : closeEmitted: false,
13.441643+00:00 : [Symbol(kOnFinished)]: []
13.441644+00:00 : },
13.441644+00:00 : allowHalfOpen: false,
13.441644+00:00 : _sockname: null,
13.441644+00:00 : _pendingData: null,
13.441644+00:00 : _pendingEncoding: '',
13.441644+00:00 : server: null,
13.441645+00:00 : _server: null,
13.441647+00:00 : parser: HTTPParser {
13.441647+00:00 : '0': null,
13.441647+00:00 : '1': [Function: parserOnHeaders],
13.441648+00:00 : '2': [Function: parserOnHeadersComplete],
13.441648+00:00 : '3': [Function: parserOnBody],
13.441648+00:00 : '4': [Function: parserOnMessageComplete],
13.441648+00:00 : '5': null,
13.441649+00:00 : '6': null,
13.441649+00:00 : _headers: [],
13.441649+00:00 : _url: '',
13.441649+00:00 : socket: [Circular *1],
13.441649+00:00 : incoming: [Circular *2],
13.441649+00:00 : outgoing: [ClientRequest],
13.441650+00:00 : maxHeaderPairs: 2000,
13.441650+00:00 : _consumed: false,
13.441650+00:00 : onIncoming: [Function: parserOnIncomingClient],
13.441650+00:00 : [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
13.441651+00:00 : },
13.441651+00:00 : _httpMessage: ClientRequest {
13.441651+00:00 : _events: [Object: null prototype],
13.441651+00:00 : _eventsCount: 2,
13.441651+00:00 : _maxListeners: undefined,
13.441652+00:00 : outputData: [],
13.441652+00:00 : outputSize: 0,
13.441652+00:00 : writable: true,
13.441652+00:00 : destroyed: false,
13.441652+00:00 : _last: true,
13.441652+00:00 : chunkedEncoding: false,
13.441653+00:00 : shouldKeepAlive: false,
13.441653+00:00 : maxRequestsOnConnectionReached: false,
13.441653+00:00 : _defaultKeepAlive: true,
13.441653+00:00 : useChunkedEncodingByDefault: false,
13.441654+00:00 : sendDate: false,
13.441654+00:00 : _removedConnection: false,
13.441654+00:00 : _removedContLen: false,
13.441654+00:00 : _removedTE: false,
13.441654+00:00 : _contentLength: 0,
13.441655+00:00 : _hasBody: true,
13.441655+00:00 : _trailer: '',
13.441655+00:00 : finished: true,
13.441655+00:00 : _headerSent: true,
13.441655+00:00 : _closed: false,
13.441655+00:00 : socket: [Circular *1],
13.441656+00:00 : _header: 'GET /api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost HTTP/1.1\r\n' +
13.441656+00:00 : 'Host: skiplagged.com\r\n' +
13.441656+00:00 : 'Connection: close\r\n' +
13.441656+00:00 : '\r\n',
13.441656+00:00 : _keepAliveTimeout: 0,
13.441657+00:00 : _onPendingData: [Function: nop],
13.441657+00:00 : agent: [Agent],
13.441657+00:00 : socketPath: undefined,
13.441657+00:00 : method: 'GET',
13.441657+00:00 : maxHeaderSize: undefined,
13.441658+00:00 : insecureHTTPParser: undefined,
13.441658+00:00 : path: '/api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost',
13.441658+00:00 : _ended: false,
13.441658+00:00 : res: [Circular *2],
13.441659+00:00 : aborted: false,
13.441659+00:00 : timeoutCb: null,
13.441659+00:00 : upgradeOrConnect: false,
13.441659+00:00 : parser: [HTTPParser],
13.441659+00:00 : maxHeadersCount: null,
13.441659+00:00 : reusedSocket: false,
13.441660+00:00 : host: 'skiplagged.com',
13.441660+00:00 : protocol: 'http:',
13.441660+00:00 : [Symbol(kCapture)]: false,
13.441660+00:00 : [Symbol(kNeedDrain)]: false,
13.441660+00:00 : [Symbol(corked)]: 0,
13.441660+00:00 : [Symbol(kOutHeaders)]: [Object: null prototype]
13.441661+00:00 : },
13.441663+00:00 : [Symbol(async_id_symbol)]: 89,
13.441663+00:00 : [Symbol(kHandle)]: TCP {
13.441663+00:00 : reading: true,
13.441664+00:00 : onconnection: null,
13.441664+00:00 : [Symbol(owner_symbol)]: [Circular *1]
13.441664+00:00 : },
13.441664+00:00 : [Symbol(lastWriteQueueSize)]: 0,
13.441664+00:00 : [Symbol(timeout)]: null,
13.441665+00:00 : [Symbol(kBuffer)]: null,
13.441665+00:00 : [Symbol(kBufferCb)]: null,
13.441665+00:00 : [Symbol(kBufferGen)]: null,
13.441665+00:00 : [Symbol(kCapture)]: false,
13.441665+00:00 : [Symbol(kSetNoDelay)]: false,
13.441666+00:00 : [Symbol(kSetKeepAlive)]: false,
13.441666+00:00 : [Symbol(kSetKeepAliveInitialDelay)]: 0,
13.441668+00:00 : [Symbol(kBytesRead)]: 0,
13.441668+00:00 : [Symbol(kBytesWritten)]: 0,
13.441668+00:00 : [Symbol(RequestTimeout)]: undefined
13.441669+00:00 : },
13.441669+00:00 : _consuming: false,
13.441669+00:00 : _dumped: false,
13.441669+00:00 : req: <ref *3> ClientRequest {
13.441669+00:00 : _events: [Object: null prototype] {
13.441670+00:00 : error: [Function (anonymous)],
13.441670+00:00 : prefinish: [Function: requestOnPrefinish]
13.441670+00:00 : },
13.441670+00:00 : _eventsCount: 2,
13.441670+00:00 : _maxListeners: undefined,
13.441671+00:00 : outputData: [],
13.441676+00:00 : outputSize: 0,
13.441676+00:00 : writable: true,
13.441676+00:00 : destroyed: false,
13.441677+00:00 : _last: true,
13.441677+00:00 : chunkedEncoding: false,
13.441677+00:00 : shouldKeepAlive: false,
13.441677+00:00 : maxRequestsOnConnectionReached: false,
13.441677+00:00 : _defaultKeepAlive: true,
13.441678+00:00 : useChunkedEncodingByDefault: false,
13.441678+00:00 : sendDate: false,
13.441678+00:00 : _removedConnection: false,
13.441678+00:00 : _removedContLen: false,
13.441678+00:00 : _removedTE: false,
13.441678+00:00 : _contentLength: 0,
13.441679+00:00 : _hasBody: true,
13.441679+00:00 : _trailer: '',
13.441679+00:00 : finished: true,
13.441679+00:00 : _headerSent: true,
13.441679+00:00 : _closed: false,
13.441679+00:00 : socket: <ref *1> Socket {
13.441680+00:00 : connecting: false,
13.441680+00:00 : _hadError: false,
13.441680+00:00 : _parent: null,
13.441680+00:00 : _host: 'skiplagged.com',
13.441680+00:00 : _readableState: [ReadableState],
13.441681+00:00 : _events: [Object: null prototype],
13.441681+00:00 : _eventsCount: 8,
13.441681+00:00 : _maxListeners: undefined,
13.441681+00:00 : _writableState: [WritableState],
13.441681+00:00 : allowHalfOpen: false,
13.441681+00:00 : _sockname: null,
13.441682+00:00 : _pendingData: null,
13.441682+00:00 : _pendingEncoding: '',
13.441682+00:00 : server: null,
13.441682+00:00 : _server: null,
13.441682+00:00 : parser: [HTTPParser],
13.441682+00:00 : _httpMessage: [Circular *3],
13.441683+00:00 : [Symbol(async_id_symbol)]: 89,
13.441683+00:00 : [Symbol(kHandle)]: [TCP],
13.441683+00:00 : [Symbol(lastWriteQueueSize)]: 0,
13.441683+00:00 : [Symbol(timeout)]: null,
13.441683+00:00 : [Symbol(kBuffer)]: null,
13.441684+00:00 : [Symbol(kBufferCb)]: null,
13.441684+00:00 : [Symbol(kBufferGen)]: null,
13.441684+00:00 : [Symbol(kCapture)]: false,
13.441684+00:00 : [Symbol(kSetNoDelay)]: false,
13.441684+00:00 : [Symbol(kSetKeepAlive)]: false,
13.441685+00:00 : [Symbol(kSetKeepAliveInitialDelay)]: 0,
13.441685+00:00 : [Symbol(kBytesRead)]: 0,
13.441685+00:00 : [Symbol(kBytesWritten)]: 0,
13.441685+00:00 : [Symbol(RequestTimeout)]: undefined
13.441685+00:00 : },
13.441685+00:00 : _header: 'GET /api/search.php?from=LAX&to=SEA&depart=2022-10-08&sort=cost HTTP/1.1\r\n' +
13.441686+00:00 : 'Host: skiplagged.com\r\n' +
13.441686+00:00 : 'Connection: close\r\n' +
13.441686+00:00 : '\r\n',
13.441686+00:00 : _keepAliveTimeout: 0,
13.441686+00:00 : _onPendingData: [Function: nop],
13.441687+00:00 : agent: Agent {
16.846579+00:00 heroku[router]: at=info method=GET path="/" host=final-final-final-app.herokuapp.com request_id=3b3c5b45-1642-4469-9b71-6f85c298d012 fwd="98.59.250.254" dyno=web.1 connect=0ms service=2ms status=200 bytes=285 protocol=https2022-08-15T19:51:27.629650+00:00 heroku[router]: at=info method=GET path="/" host=final-final-final-app.herokuapp.com request_id=d6df16f4-3427-42f9-8ddf-88da1acc58a3 fwd="98.59.250.254" dyno=web.1 connect=0ms service=1ms status=304 bytes=182 protocol=https
2022-08-15T19:54:45.468162+00:00 heroku[router]: at=info method=GET path="/" host=final-final-final-app.herokuapp.com request_id=1f221520-43e8-407d-84be-daa4e45b7427 fwd="98.59.250.254" dyno=web.1 connect=0ms service=1ms status=304 bytes=182 protocol=https

patch request is ok with postman but return bad request in axios

I am using Axios to make patch requests from the express js server to Advantech wise-4050/Lan device
I can make get request
when I make a patch request from postman I return 200 so it is ok.
but when I make the same request from Axios it returns 400 bad requests.
if I console.log the returned error it gave me the following.
{
config: {
url: 'http://192.168.0.33/di_value/slot_0/ch_0',
method: 'patch',
data: '{"Ch":"0","ClrCnt":1}',
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json;charset=utf-8',
'User-Agent': 'axios/0.21.1',
'Content-Length': 21
},
auth: { username: 'admin', password: '000000' },
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus]
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 9,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Circular *1],
write: [Function: writeAfterFIN],
[Symbol(async_id_symbol)]: 19648,
[Symbol(kHandle)]: null,
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 137,
[Symbol(kBytesWritten)]: 274,
[Symbol(RequestTimeout)]: undefined
},
_header: 'PATCH /di_value/slot_0/ch_0 HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json;charset=utf-8\r\n' +
'User-Agent: axios/0.21.1\r\n' +
'Content-Length: 21\r\n' +
'Host: 192.168.0.33\r\n' +
'Authorization: Basic YWRtaW46dGhlc3B5\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'PATCH',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/di_value/slot_0/ch_0',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
socket: [Socket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [Socket],
_consuming: true,
_dumped: false,
req: [Circular *1],
responseUrl: 'http://admin:000000#192.168.0.33/di_value/slot_0/ch_0',
redirects: [],
[Symbol(kCapture)]: false,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.0.33',
protocol: 'http:',
_redirectable: Writable {
_writableState: [WritableState],
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 21,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: 'http://admin:000000#192.168.0.33/di_value/slot_0/ch_0',
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array],
authorization: [Array]
}
},
response: {
status: 400,
statusText: 'Bad Request',
headers: {
server: 'WISE-4000/LAN/8.1.0019',
connection: 'close',
'content-type': 'application/json'
},
config: {
url: 'http://192.168.0.33/di_value/slot_0/ch_0',
method: 'patch',
data: '{"Ch":"0","ClrCnt":1}',
headers: [Object],
auth: [Object],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus]
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Socket],
_header: 'PATCH /di_value/slot_0/ch_0 HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json;charset=utf-8\r\n' +
'User-Agent: axios/0.21.1\r\n' +
'Content-Length: 21\r\n' +
'Host: 192.168.0.33\r\n' +
'Authorization: Basic YWRtaW46dGhlc3B5\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'PATCH',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/di_value/slot_0/ch_0',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.0.33',
protocol: 'http:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
data: { Err: 2000, Msg: 'Ch' }
},
isAxiosError: true,
toJSON: [Function: toJSON]
}
I changed the method from patch to post and it worked out.

Axios .get() params are empty

Problem
So i'm working on trying to show all nearby markers from my current location. When trying to get the nearby markers from the backend i'm getting an error that says:
"data": Object {
"error": "Bad Request",
"message": Array [
"longitude should not be empty",
"longitude must be a string",
"latitude should not be empty",
"latitude must be a string",
"threshold should not be empty",
"threshold must be a string",
],
"statusCode": 400,
},
My problem is that i'm giving the .get() Request data but it looks like it won't recognize it.
My Axios apiInstance:
const serverUrl = "http://ip-address";
axios.defaults.baseURL = serverUrl;
const apiInstance = axios.create();
apiInstance.interceptors.request.use(
async (config: any) => {
const token = await AsyncStorage.getItem("#token");
if (token) {
config.headers.Authorization = token;
}
return config;
},
(error) => {
return Promise.reject(error);
}
);
Axios Request:
if (location !== undefined) {
const config = {
data: {
longitude: location?.coords.longitude.toString(),
latitude: location?.coords.latitude.toString(),
threshold: "0,1",
},
};
apiInstance
.get("/marker", config)
.then(function (response: any) {
console.log(response);
})
.catch(function (error: any) {
console.log(error.response);
});
}
Longitude, Latitude and threshold have to be a String.
Backend response:
<ref *2> IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: null,
ended: false,
endEmitted: false,
reading: false,
constructed: true,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: null
},
_events: [Object: null prototype] { end: [Function: clearRequestTimeout] },
_eventsCount: 1,
_maxListeners: undefined,
socket: <ref *1> Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
end: [Array],
timeout: [Function: socketOnTimeout],
data: [Function: bound socketOnData],
error: [Function: socketOnError],
close: [Array],
drain: [Function: bound socketOnDrain],
resume: [Function: onSocketResume],
pause: [Function: onSocketPause]
},
_eventsCount: 8,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: true,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: Server {
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_connections: 2,
_handle: [TCP],
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 0,
keepAliveTimeout: 5000,
maxHeadersCount: null,
headersTimeout: 60000,
requestTimeout: 0,
_connectionKey: '6::::5000',
[Symbol(IncomingMessage)]: [Function: IncomingMessage],
[Symbol(ServerResponse)]: [Function: ServerResponse],
[Symbol(kCapture)]: false,
[Symbol(async_id_symbol)]: 52
},
_server: Server {
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_connections: 2,
_handle: [TCP],
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 0,
keepAliveTimeout: 5000,
maxHeadersCount: null,
headersTimeout: 60000,
requestTimeout: 0,
_connectionKey: '6::::5000',
[Symbol(IncomingMessage)]: [Function: IncomingMessage],
[Symbol(ServerResponse)]: [Function: ServerResponse],
[Symbol(kCapture)]: false,
[Symbol(async_id_symbol)]: 52
},
parser: HTTPParser {
'0': [Function: bound setRequestTimeout],
'1': [Function: parserOnHeaders],
'2': [Function: parserOnHeadersComplete],
'3': [Function: parserOnBody],
'4': [Function: parserOnMessageComplete],
'5': [Function: bound onParserExecute],
'6': [Function: bound onParserTimeout],
_headers: [],
_url: '',
socket: [Circular *1],
incoming: [Circular *2],
outgoing: null,
maxHeaderPairs: 2000,
_consumed: true,
onIncoming: [Function: bound parserOnIncoming],
[Symbol(resource_symbol)]: [HTTPServerAsyncResource]
},
on: [Function: socketListenerWrap],
addListener: [Function: socketListenerWrap],
prependListener: [Function: socketListenerWrap],
setEncoding: [Function: socketSetEncoding],
_paused: false,
_httpMessage: ServerResponse {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: true,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: false,
_closed: false,
socket: [Circular *1],
_header: null,
_keepAliveTimeout: 5000,
_onPendingData: [Function: bound updateOutgoingData],
req: [Circular *2],
_sent100: false,
_expect_continue: false,
locals: [Object: null prototype] {},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
[Symbol(async_id_symbol)]: 91,
[Symbol(kHandle)]: TCP {
reading: true,
onconnection: null,
_consumed: true,
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(RequestTimeout)]: undefined
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: false,
rawHeaders: [
'accept',
'application/json, text/plain, */*',
'authorization',
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjo4LCJpYXQiOjE2NDMwMDk5OTV9.IaEPSG_YbfinK0WRwu_O6RpVURZk6vkaEtLuOGtC3WY',
'content-type',
'application/json',
'Host',
'192.168.1.10:5000',
'Connection',
'Keep-Alive',
'Accept-Encoding',
'gzip',
'User-Agent',
'okhttp/3.14.9'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '/marker',
method: 'GET',
statusCode: null,
statusMessage: null,
client: <ref *1> Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: false,
endEmitted: false,
reading: true,
constructed: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
end: [Array],
timeout: [Function: socketOnTimeout],
data: [Function: bound socketOnData],
error: [Function: socketOnError],
close: [Array],
drain: [Function: bound socketOnDrain],
resume: [Function: onSocketResume],
pause: [Function: onSocketPause]
},
_eventsCount: 8,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: false,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: true,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: Server {
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_connections: 2,
_handle: [TCP],
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 0,
keepAliveTimeout: 5000,
maxHeadersCount: null,
headersTimeout: 60000,
requestTimeout: 0,
_connectionKey: '6::::5000',
[Symbol(IncomingMessage)]: [Function: IncomingMessage],
[Symbol(ServerResponse)]: [Function: ServerResponse],
[Symbol(kCapture)]: false,
[Symbol(async_id_symbol)]: 52
},
_server: Server {
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_connections: 2,
_handle: [TCP],
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 0,
keepAliveTimeout: 5000,
maxHeadersCount: null,
headersTimeout: 60000,
requestTimeout: 0,
_connectionKey: '6::::5000',
[Symbol(IncomingMessage)]: [Function: IncomingMessage],
[Symbol(ServerResponse)]: [Function: ServerResponse],
[Symbol(kCapture)]: false,
[Symbol(async_id_symbol)]: 52
},
parser: HTTPParser {
'0': [Function: bound setRequestTimeout],
'1': [Function: parserOnHeaders],
'2': [Function: parserOnHeadersComplete],
'3': [Function: parserOnBody],
'4': [Function: parserOnMessageComplete],
'5': [Function: bound onParserExecute],
'6': [Function: bound onParserTimeout],
_headers: [],
_url: '',
socket: [Circular *1],
incoming: [Circular *2],
outgoing: null,
maxHeaderPairs: 2000,
_consumed: true,
onIncoming: [Function: bound parserOnIncoming],
[Symbol(resource_symbol)]: [HTTPServerAsyncResource]
},
on: [Function: socketListenerWrap],
addListener: [Function: socketListenerWrap],
prependListener: [Function: socketListenerWrap],
setEncoding: [Function: socketSetEncoding],
_paused: false,
_httpMessage: ServerResponse {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: true,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: false,
_closed: false,
socket: [Circular *1],
_header: null,
_keepAliveTimeout: 5000,
_onPendingData: [Function: bound updateOutgoingData],
req: [Circular *2],
_sent100: false,
_expect_continue: false,
locals: [Object: null prototype] {},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
[Symbol(async_id_symbol)]: 91,
[Symbol(kHandle)]: TCP {
reading: true,
onconnection: null,
_consumed: true,
[Symbol(owner_symbol)]: [Circular *1]
},
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(RequestTimeout)]: undefined
},
_consuming: false,
_dumped: false,
next: [Function: next],
baseUrl: '',
originalUrl: '/marker',
_parsedUrl: Url {
protocol: null,
slashes: null,
auth: null,
host: null,
port: null,
hostname: null,
hash: null,
search: null,
query: null,
pathname: '/marker',
path: '/marker',
href: '/marker',
_raw: '/marker'
},
params: {},
query: {},
res: <ref *3> ServerResponse {
_events: [Object: null prototype] { finish: [Function: bound resOnFinish] },
_eventsCount: 1,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: true,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: false,
_closed: false,
socket: <ref *1> Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 8,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: [Server],
_server: [Server],
parser: [HTTPParser],
on: [Function: socketListenerWrap],
addListener: [Function: socketListenerWrap],
prependListener: [Function: socketListenerWrap],
setEncoding: [Function: socketSetEncoding],
_paused: false,
_httpMessage: [Circular *3],
[Symbol(async_id_symbol)]: 91,
[Symbol(kHandle)]: [TCP],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(RequestTimeout)]: undefined
},
_header: null,
_keepAliveTimeout: 5000,
_onPendingData: [Function: bound updateOutgoingData],
req: [Circular *2],
_sent100: false,
_expect_continue: false,
locals: [Object: null prototype] {},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
'x-powered-by': [Array],
'access-control-allow-origin': [Array]
}
},
body: {},
route: Route { path: '/marker', stack: [ [Layer] ], methods: { get: true } },
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
accept: 'application/json, text/plain, */*',
authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjo4LCJpYXQiOjE2NDMwMDk5OTV9.IaEPSG_YbfinK0WRwu_O6RpVURZk6vkaEtLuOGtC3WY',
'content-type': 'application/json',
host: '192.168.1.10:5000',
connection: 'Keep-Alive',
'accept-encoding': 'gzip',
'user-agent': 'okhttp/3.14.9'
},
[Symbol(kHeadersCount)]: 14,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
}
I've tried to use "config.data" instead of "config", but then i get the following error:
If you need any further information, feel free to ask!
Thanks in advance!

Vuetify Data Table Slots with nested item properties

I'm having a hard time figuring out how to access item properties from within a v-data-table slot with a specific JSON format.
The items bound to the v-data-table have a nested property called "technicals" which also contains several nested properties for each interval like "5m", "15m" etc...
I generated the v-data-table headers with a computed property and everything is displaying fine but now I want to access the data with a slot inside the table to manipulate the boolean values of true/false with some additional styling etc. I just can't find out how to access the properties in the slot tag.
The values assigned to the headers are of this structure
Object.technicals.side.interval.value
Where "side" and "interval" are component props stored in the data object.
{
"market": {
"id": "xyx"
},
"technicals": {
"buy": {
"1m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"5m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"15m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"30m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"1h": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"4h": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
}
}
}
<v-data-table
:headers="headers"
:items="tickerStats"
:sort-by.sync="sortBy"
:sort-desc.sync="isDescending"
>
<template v-slot:item.technicals.side.interval.RSI_OVERSOLD="{ item }">
<v-chip>doSomething</v-chip>
</template>
</v-data-table>
I need to get access from this line but I can't access the props from the component (side and interval) and can't access the other things either by trying.
<template v-slot:item.technicals.side.interval.RSI_OVERSOLD="{ item }">
It only works accessing the market ID like so, but I don't need to modify the ID column.
<template v-slot:item.market.id="{ item }">
UPDATE
Here is how I generate the headers
headers() {
let fnc = this.functions.filter(f => {
return f.type == this.side;
});
let headers = [
{
text: "MARKET",
align: "start",
sortable: true,
value: "market.id",
type: String
}
];
let side = this.side;
for (let i = 0; i < fnc.length; i++) {
headers.push({
text: fnc[i].name,
align: "start",
sortable: true,
type: Boolean,
value:
"technicals[" +
this.side +
"]." +
this.interval +
"[" +
fnc[i].name +
"]"
});
}
return headers;
}
Function is an array of objects of this format
{
name: "RSI_OVERSOLD",
formatted_name: "RSI OVERSOD"
}
This is the structure of one item inside the items array used for: items from which I only want to display the market.id and the technicals for the given side and interval passed as a prop to the component.
{
"id": "ETHUSDT",
"ticker": {
"exchange": "Binance",
"base": "ETH",
"quote": "USDT",
"timestamp": 1613375545712,
"last": "1753.52000000",
"open": "1671.49000000",
"high": "1847.54000000",
"low": "1655.67000000",
"volume": "935312.43155000",
"quoteVolume": "1656379605.10542940",
"change": "-82.03000000",
"changePercent": "-4.469",
"bid": "1753.37000000",
"bidVolume": "5.70749000",
"ask": "1753.52000000",
"askVolume": "0.21402000"
},
"market": {
"limits": {
"amount": {
"min": 0.001,
"max": 10000
},
"price": {
"min": 0.01,
"max": 100000
},
"cost": {
"min": 1
},
"market": {
"min": 0.001,
"max": 10000
}
},
"precision": {
"base": 8,
"quote": 8,
"amount": 3,
"price": 2
},
"tierBased": false,
"percentage": true,
"taker": 0.001,
"maker": 0.001,
"id": "ETHUSDT",
"lowercaseId": "ethusdt",
"symbol": "ETH/USDT",
"base": "ETH",
"quote": "USDT",
"baseId": "ETH",
"quoteId": "USDT",
"info": {
"symbol": "ETHUSDT",
"pair": "ETHUSDT",
"contractType": "PERPETUAL",
"deliveryDate": 4133404800000,
"onboardDate": 1569398400000,
"status": "TRADING",
"maintMarginPercent": "2.5000",
"requiredMarginPercent": "5.0000",
"baseAsset": "ETH",
"quoteAsset": "USDT",
"marginAsset": "USDT",
"pricePrecision": 2,
"quantityPrecision": 3,
"baseAssetPrecision": 8,
"quotePrecision": 8,
"underlyingType": "COIN",
"underlyingSubType": [],
"settlePlan": 0,
"triggerProtect": "0.0500",
"filters": [
{
"minPrice": "0.01",
"maxPrice": "100000",
"filterType": "PRICE_FILTER",
"tickSize": "0.01"
},
{
"stepSize": "0.001",
"filterType": "LOT_SIZE",
"maxQty": "10000",
"minQty": "0.001"
},
{
"stepSize": "0.001",
"filterType": "MARKET_LOT_SIZE",
"maxQty": "10000",
"minQty": "0.001"
},
{
"limit": 200,
"filterType": "MAX_NUM_ORDERS"
},
{
"limit": 100,
"filterType": "MAX_NUM_ALGO_ORDERS"
},
{
"notional": "1",
"filterType": "MIN_NOTIONAL"
},
{
"multiplierDown": "0.8500",
"multiplierUp": "1.1500",
"multiplierDecimal": "4",
"filterType": "PERCENT_PRICE"
}
],
"orderTypes": [
"LIMIT",
"MARKET",
"STOP",
"STOP_MARKET",
"TAKE_PROFIT",
"TAKE_PROFIT_MARKET",
"TRAILING_STOP_MARKET"
],
"timeInForce": [
"GTC",
"IOC",
"FOK",
"GTX"
]
},
"type": "future",
"spot": false,
"margin": true,
"future": true,
"delivery": false,
"active": true
},
"technicals": {
"buy": {
"1m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"5m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"15m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"30m": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"1h": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": false,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
},
"4h": {
"RSI_OVERSOLD": false,
"LOWER_BBAND": false,
"UPTRENDING": true,
"MFI_OVERSOLD": false,
"BULLISH_MACD_CROSS": false
}
},
"sell": {
"1m": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": false,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
},
"5m": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": false,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
},
"15m": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": true,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
},
"30m": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": true,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
},
"1h": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": true,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
},
"4h": {
"RSI_OVERBOUGHT": false,
"UPPER_BBAND": false,
"DOWNTRENDING": false,
"MFI_OVERBOUGHT": false,
"BEARISH_MACD_CROSS": false
}
}
}
},

Is There Sample Test Plan Migration Config for Version 11.5?

Is There Sample Test Plan Migration Config for Version 11.5?
I was able to migrated all test cases, but now want to re-create the test plans.
For older version (like version 10), I was able to use below config to re-create the test plans after migrating all test cases:
"Processors": [
{
"ObjectType": "MigrationTools.Core.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": true,
"BasePaths": []
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestVariablesMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestConfigurationsMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"OnlyElementsWithTag": null,
"RemoveInvalidTestSuiteLinks": true
}
]
However, I am now getting an exception.
[22:32:54 INF] Config Found, creating engine host
[22:32:55 ERR] An Unhandled exception occured.
System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at MigrationTools.Configuration.ProcessorConfigJsonConverter.Create(Type objectType, JObject jObject) in D:\a\1\s\src\MigrationTools\Configuration\ProcessorConfigJsonConverter.cs:line 14
I migrated all test cases using below config:
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [System.WorkItemType] IN ('Test Case')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": true,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"NodeBasePaths": [],
"WorkItemIDs": null
}
Can someone please provide some insight?
Thanks,
Dennis
We are constantly making changes to the tool and when we bump the version number for major or minor it means we have changes something that impacts the configuration.json. In order to simplify the migration.exe init we reduced the output to just that necessary to migrate work items, the most common usage.
If you run migration.exe init --options Full it will give you the complete configuration options that are available.
For example here is the config from v11.6.
{
"Version": "11.6",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"ChangeSetMappingFile": null,
"Source": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"FieldMaps": [
{
"ObjectType": "MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
"ObjectType": "FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "TfsMigrationTool.ReflectedWorkItemId"
},
{
"ObjectType": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed",
"Removed": "Removed"
}
},
{
"ObjectType": "FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": null
},
{
"ObjectType": "FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
"ObjectType": "FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"ObjectType": "FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
"ObjectType": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \\d{4}.(\\d{1})",
"replacement": "$1"
},
{
"ObjectType": "FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"ObjectType": "TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"GitRepoMapping": null,
"LogLevel": "Information",
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": false,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\\temp\\WorkItemAttachmentWorkingFolder\\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": true,
"NodeBasePaths": [
"Product\\Area\\Path1",
"Product\\Area\\Path2"
],
"WorkItemIDs": null
},
{
"ObjectType": "TestVariablesMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestConfigurationsMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"OnlyElementsWithTag": null,
"TestPlanQueryBit": null,
"RemoveInvalidTestSuiteLinks": false,
"FilterCompleted": false
},
{
"ObjectType": "ImportProfilePictureConfig",
"Enabled": false
},
{
"ObjectType": "ExportProfilePictureFromADConfig",
"Domain": null,
"Username": null,
"Password": null,
"PictureEmpIDFormat": null,
"Enabled": false
},
{
"ObjectType": "FixGitCommitLinksConfig",
"TargetRepository": "targetProjectName",
"Enabled": false,
"QueryBit": null,
"OrderBit": null
},
{
"ObjectType": "WorkItemUpdateConfig",
"WhatIf": false,
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
"WIQLOrderBit": null,
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemPostProcessingConfig",
"WorkItemIDs": [
1,
2,
3
],
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' ",
"WIQLOrderBit": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemDeleteConfig",
"Enabled": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemQueryMigrationConfig",
"PrefixProjectToNodes": false,
"SharedFolderName": "Shared Queries",
"SourceToTargetFieldMappings": {
"SourceFieldRef": "TargetFieldRef"
},
"Enabled": false
},
{
"ObjectType": "TeamMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false,
"EnableTeamSettingsMigration": true
}
]
}