如何使用下面显示的cURL代码从智能表中显示“title”和“displayvalue”?

时间:2016-07-07 18:51:59

标签: api curl smartsheet-api smartsheet-api-1.1

curl https://api.smartsheet.com/2.0/sheets/5848567060424580/columns/4140686686611332 -H "Authorization: Bearer 21txb6n2ajlf6dhsil8g3jxtdu"

^^^^这是我放入终端的卷曲命令,当我这样做时,我会在下面得到这个信息海报。访问令牌:21txb6n2ajlf6dhsil8g3jxtdu&表ID:5848567060424580。我想得到一个curl命令,它只显示某些值,而不是Smartsheet列中的每个ID和格式化选项。任何帮助都会有用,谢谢!

{“id”:4140686686611332,“index”:2,“title”:“Column3”,“type”:“TEXT_NUMBER”,“width”:150} MAC-C02Q3C5MG8WP:~jxs18 $ curl {{3} } -H“授权:Bearer 21txb6n2ajlf6dhsil8g3jxtdu” { “ID”:5848567060424580, “姓名”: “JagTestSheet”, “版本”:1, “totalRowCount”:3 “ACCESSLEVEL”: “EDITOR_SHARE”, “effectiveAttachmentOptions”:[ “FILE”, “ONEDRIVE”,“GOOGLE_DRIVE “ ”EVERNOTE“, ”BOX_COM“, ”EGNYTE“, ”DROPBOX“], ”ganttEnabled“:假 ”dependenciesEnabled“:假 ”resourceManagementEnabled“:假 ”cellImageUploadEnabled“:真 ”userSettings“:{” criticalPathEnabled “:假” displaySummaryTasks “:真},” 永久 “:”https://api.smartsheet.com/2.0/sheets/584856724580 “ ”createdAt“: ”2016-07-07T14:44:38Z“, ”modifiedAt“:” 2016-07-07T15: 22:53Z“,”栏“:[{”id“:1888886872926084,”index“:0,”title“:”Primary Column“,”type“:”TEXT_NUMBER“,”primary“:true,”width“: 150},{ “ID”:6392486500296580 “索引”:1, “标题”: “列2”, “类型”: “TEXT_NUMBER”, “宽度”:150},{ “ID”:4140686686611332 “索引”: 2, “标题”: “栏3”, “类型”: “TEXT_NUMBER”, “宽度”:150},{ “ID”:8644286313981828 “指数”:3 “标题”: “Column4”, “类型”: “TEXT_NUMBER”, “宽度”:150},{ “ID”:481511989372804, “指数”:4 “标题”: “Column5”, “类型”: “TEXT_NUMBER”, “宽度”:150},{“ID “:4985111616743300” 索引 “:5”,标题 “:” Column6" , “类型”:” TEXT_NUMBER”, “宽度”:150}], “行”:[{ “ID”:6858731183990660 “ROWNUMBER”:1, “膨胀”:真 “createdAt”: “2016-07-07T15:22:53Z” “modifiedAt”: “2016-07-07T15:22:53Z”, “细胞”:[{ “ColumnID的”:1888886872926084 “值”:234.0, “displayValue”: “234”},{ “ColumnID的”:6392486500296580 “值”:657.0, “displayValue”: “657”},{ “ColumnID的”:4140686686611332 “值”:875.0, “displayValue”: “875”},{ “ColumnID的”:8644286313981828},{ “ColumnID的” :481511989372804},{ “ColumnID的”:4985111616743300}]},{ “ID”:1229231649777540 “ROWNUMBER”:2 “siblingId”:6858731183990660 “膨胀”:真 “createdAt”:“2016-07-07T15: 22:53Z “ ”modifiedAt“: ”2016-07-07T15:22:53Z“, ”细胞“:[{ ”ColumnID的“:1888886872926084 ”值“:564.0, ”displayValue“: ”564“},{” ColumnID的 “:6392486500296580”,值 “:546.0,” displayValue “:” 546 “},{” ColumnID的 “:4140686686611332”,值 “:453.0,” displayValue “:” 453 “},{” ColumnID的“:8644286313981828}, { “ColumnID的”:48151198937280MAC-C02Q3C5MG8WP:

1 个答案:

答案 0 :(得分:0)

您可以考虑将输出管道化为类似jsawk的内容 从您的cURL请求中查询您要查找的内容的JSON响应。