PowerShell and ServiceNow REST API Dot-Walking Not Working -


i can specify value in body (ex: "sys_updated_by"="jsmith") , return specific record

$url = "https://domain.service-now.com/api/now/v1/table/sc_item_option_mtom"  $headers = @{"authorization"="basic 12345678900987654321"}  $body = @{  "sysparm_limit"="1"  "sys_updated_by"="jsmith"  }  (invoke-restmethod -headers $headers -method -uri $url -body $body).result  request_item   : @{link=https://domain.service-now.com/api/now/v1/table/sc_req_item/cc6f59d4c0779100925cad13165a7325; value=cc6f59d4c0779100925cad13165a7325} sc_item_option : @{link=https://domain.service-now.com/api/now/v1/table/sc_item_option/d37c591cc0779100925cad13165a7397; value=d37c591cc0779100925cad13165a7397} sys_updated_by : jsmith sys_tags       :  sys_updated_on : 2014-03-27 16:26:24 sys_id         : 006f555cc0779100925cad13165a7377 sys_mod_count  : 0 sys_created_on : 2014-03-27 16:26:24 sys_created_by : jsmith 

i cannot return correct record when dot-walk request_item.value (or request_item.link, haven't found works). used value returned above (cc6f59d4c0779100925cad13165a7325), query seems ignore whole line "request_item.value"="cc6f59d4c0779100925cad13165a7325" , returns first record in table instead

$url = "https://domain.service-now.com/api/now/v1/table/sc_item_option_mtom" $headers = @{"authorization"="basic 12345678900987654321"}  $body = @{  "sysparm_limit"="1"      "request_item.value"="cc6f59d4c0779100925cad13165a7325"  }  (invoke-restmethod -headers $headers -method -uri $url -body $body).result  request_item   : @{link=https://domain.service-now.com/api/now/v1/table/sc_req_item/00020bbc6892d900925cda2e3d5bf84a; value=00020bbc6892d900925cda2e3d5bf84a} sc_item_option : @{link=https://domain.service-now.com/api/now/v1/table/sc_item_option/f2f14bbc6892d900925cda2e3d5bf8d1; value=f2f14bbc6892d900925cda2e3d5bf8d1} sys_updated_by : cholmes sys_tags       :  sys_updated_on : 2014-01-13 23:20:06 sys_id         : 00020bbc6892d900925cda2e3d5bf84c sys_mod_count  : 0 sys_created_on : 2014-01-13 23:20:06 sys_created_by : cholmes 

this seems it: "https:// domain.service-now.com/sc_item_option_mtom.do?csv&sysparm_query=request_item=sy‌​s_id"


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -