How to select fields with specific value with jq - json

I want to select parent value where the field result is with a specific value
Here is the json i have :
{
"lde-poc-01": {
"file_|-linux-debian-login-uidmin_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 0,
"start_time": "14:40:20.708675",
"duration": 17.447,
"__id__": "linux-debian-login-uidmin"
},
"file_|-linux-debian-login-uidmax_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 1,
"start_time": "14:40:20.726336",
"duration": 10.614,
"__id__": "linux-debian-login-uidmax"
},
"file_|-linux-debian-login-sysuidmax_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 2,
"start_time": "14:40:20.737165",
"duration": 10.515,
"__id__": "linux-debian-login-sysuidmax"
},
"file_|-linux-debian-login-gidmin_|-/etc/login.defs_|-replace": {
"name": "/etc/login.defs",
"changes": {},
"pchanges": {},
"result": true,
"comment": "No changes needed to be made",
"__sls__": "dev/linux/ubuntu/login",
"__run_num__": 3,
"start_time": "14:40:20.747892",
"duration": 10.201,
"__id__": "linux-debian-login-gidmin"
},
"file_|-linux-ubuntu-docker_|-/etc/apt/sources.list.d/docker.list_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/apt/sources.list.d/docker.list is in the correct state",
"name": "/etc/apt/sources.list.d/docker.list",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 9,
"start_time": "14:40:20.873513",
"duration": 40.569,
"__id__": "linux-ubuntu-docker"
},
"cmd_|-linux-ubuntu-unattended-updrade-service_|-systemctl daemon-reload_|-run": {
"changes": {},
"result": false,
"duration": 0.008,
"start_time": "14:40:21.159608",
"comment": "State was not run because none of the onchanges reqs changed",
"__state_ran__": false,
"__run_num__": 20,
"__sls__": "dev/linux/ubuntu/apt"
},
"file_|-linux-ubuntu-upgrade-script-telegraf_|-/etc/telegraf/check-update.sh_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/telegraf/check-update.sh is in the correct state",
"name": "/etc/telegraf/check-update.sh",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 21,
"start_time": "14:40:21.159685",
"duration": 42.313,
"__id__": "linux-ubuntu-upgrade-script-telegraf"
},
"file_|-linux-ubuntu-upgrade-telegraf_|-/etc/telegraf/telegraf.d/update.conf_|-managed": {
"changes": {},
"pchanges": {},
"comment": "File /etc/telegraf/telegraf.d/update.conf is in the correct state",
"name": "/etc/telegraf/telegraf.d/update.conf",
"result": true,
"__sls__": "dev/linux/ubuntu/apt",
"__run_num__": 22,
"start_time": "14:40:21.202254",
"duration": 51.238,
"__id__": "linux-ubuntu-upgrade-telegraf"
},
"file_|-mysoc-po-python-rm2_|-/var/tmp/mysoc-po_|-absent": {
"name": "/var/tmp/mysoc-po",
"changes": {},
"pchanges": {},
"result": false,
"comment": "File /var/tmp/mysoc-po is not present",
"__sls__": "dev/mysoc-po",
"__run_num__": 236,
"start_time": "14:40:38.161788",
"duration": 0.305,
"__id__": "mysoc-po-python-rm2"
}
}
}
I want to get the values of comment / id and the parent value like ("file_|-mysoc-po-python-rm2_|-/var/tmp/mysoc-po_|-absent") where the field result is false.
I tried to use the select function but with no success
Thanks for your help

You can use the following :
.[]
| to_entries
| map(select(.value.result == false))
| map({ name:.key, id:.value.__id__, comment:.value.comment})
map(select(criteria)) is used to discard the items of an array (or the fields of an item in this case) which do not satisfy a criteria.
to_entries is used to craft an array of key/values from an item's fields.

Related

Check if a key exists and return another key

I need help with jq syntax on how to return the Gitlab job ID if it contains an artifact. The JSON output looks like this (removed a lot of unrelated info from it and added [...]):
[{
"id": 3219589880,
"status": "success",
"stage": "test",
"name": "job_with_no_artifact",
"ref": "main",
"tag": false,
"coverage": null,
"allow_failure": false,
"created_at": "2022-10-24T18:21:25.119Z",
"started_at": "2022-10-24T18:21:25.986Z",
"finished_at": "2022-10-24T18:21:38.464Z",
"duration": 12.478682,
"queued_duration": 0.499786,
"user": {
"id": 123456789,
[...]
},
"commit": {
"id": "5e0e1f287d20daf2036a3ca71c656dce55999265",
[...]
"pipeline": {
"id": 123456789,
[...]
"project": {
"ci_job_token_scope_enabled": false
},
"artifacts": [],
"runner": {
"id": 12270859,
[...]
},
"artifacts_expire_at": null,
"tag_list": []
}, {
"id": 3219589878,
"status": "success",
"stage": "test",
"name": "create_artifact_job_2",
"ref": "main",
"tag": false,
"coverage": null,
"allow_failure": false,
"created_at": "2022-10-24T18:21:25.111Z",
"started_at": "2022-10-24T18:21:25.922Z",
"finished_at": "2022-10-24T18:21:39.090Z",
"duration": 13.168405,
"queued_duration": 0.464364,
"user": {
"id": 123456789,
[...]
},
"commit": {
"id": "5e0e1f287d20daf2036a3ca71c656dce55999265",
[...]
},
"pipeline": {
"id": 675641982,
[...],
"project": {
"ci_job_token_scope_enabled": false
},
"artifacts_file": {
"filename": "artifacts.zip",
"size": 223
},
"artifacts": [{
"file_type": "archive",
"size": 223,
"filename": "artifacts.zip",
"file_format": "zip"
}, {
"file_type": "metadata",
"size": 153,
"filename": "metadata.gz",
"file_format": "gzip"
}],
"runner": {
"id": 12270845,
[...]
},
"artifacts_expire_at": "2022-10-25T18:21:35.859Z",
"tag_list": []
}, {
"id": 3219589876,
"status": "success",
"stage": "test",
"name": "create_artifact_job_1",
"ref": "main",
"tag": false,
"coverage": null,
"allow_failure": false,
"created_at": "2022-10-24T18:21:25.103Z",
"started_at": "2022-10-24T18:21:25.503Z",
"finished_at": "2022-10-24T18:21:41.407Z",
"duration": 15.904028,
"queued_duration": 0.098837,
"user": {
"id": 123456789,
[...]
},
"commit": {
"id": "5e0e1f287d20daf2036a3ca71c656dce55999265",
[...]
},
"pipeline": {
"id": 123456789,
[...]
},
"web_url": "WEB_URL",
"project": {
"ci_job_token_scope_enabled": false
},
"artifacts_file": {
"filename": "artifacts.zip",
"size": 217
},
"artifacts": [{
"file_type": "archive",
"size": 217,
"filename": "artifacts.zip",
"file_format": "zip"
}, {
"file_type": "metadata",
"size": 152,
"filename": "metadata.gz",
"file_format": "gzip"
}],
"runner": {
"id": 12270857,
},
"artifacts_expire_at": "2022-10-25T18:21:37.808Z",
"tag_list": []
}]
I've been trying to do either of the following using jQ:
Either:
Check if artifacts_file key exists in each iteration and if it does return the (job) id (so .[].id)
Check if artifacts array is empty in each iteration and if it is empty return the (job) id.
In both cases I'm able to do the first part but I am not sure how to return the .id key.
Related stackoverflow questions that I've been trying to utilize and adapt to my case:
jq - return array value if its length is not null
How to check for presence of 'key' in jq before iterating over the values
What I have so far: jq '[.[].artifacts[]|select(length > 0)] | .[]' which returns all the artifacts found (but it doesn't contain the .id of the job).
Checking the existence of a field using has:
.[] | select(has("artifacts_file")).id
3219589878
3219589876
Demo
Checking if a field is an empty array by comparing it to []:
.[] | select(.artifacts == []).id
3219589880
Demo

Is there a way for omitting certain fields from matching array elements of JSON array of content of JSON response based on a criteria in spring boot

but it should retain the fields in other array elements which did not match the criteria.
I have json response like below
{
"content": [
{
"someId": 1498,
"someKey": {
"anotherKey": "Not Specified",
"keyOne": "",
"keyTwo": null,
"keyThree": null
},
"date": "2009-09-11",
"time": "17:14",
"location": "Not Specified"
},
{
"someId": 1498,
"someKey": {
"anotherKey": "criteria",
"keyOne": "some data",
"keyTwo": "some data for key two",
"keyThree": "some data for key three"
},
"date": "2009-09-12",
"time": "17:15",
"location": "Not Specified"
},...
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageSize": 10,
"pageNumber": 0,
"unpaged": false,
"paged": true
},
"totalElements": 10630,
"totalPages": 1063,
"last": false,
"size": 10,
"number": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"first": true,
"numberOfElements": 10,
"empty": false
}
when "anotherKey" value is "criteria", the "keyOne","keyTwo","keyThree" should be omitted, else it should be retained. any solution to this? thanks in advance

Extract some value from JSON using JsonPath with != condition in Jmeter

I have the following JSON and I need to get id values for instances which do not have type = Jenkins
{
"data": [
{
"id": "35002399-6fd7-40b7-b0d0-8be64e4ec09c",
"name": "94Jenkins",
"url": "http://127.0.0.1:8084",
"authProvider": false,
"siteId": "cce1b6e2-4b5d-4455-ac96-6b5d4c0d901d",
"status": {
"status": "ONLINE"
},
"instanceStateReady": true,
"instanceState": {
"#type": "InstanceStateDto",
"version": "2.60.3"
},
"adminUser": "admin1",
"hasDRConfig": false,
"managed": true,
"type": "JENKINS",
"siteName": "City",
"lastRefreshTime": "2018-04-24T09:43:01.694Z"
},
{
"id": "5cd3caf6-bac1-4f07-8793-5f124b90eaf5",
"name": "RJO",
"url": "http://test.com",
"authProvider": false,
"status": {
"status": "UNAUTHORIZED"
},
"instanceStateReady": true,
"instanceState": {
"#type": "numberOfArtifacts",
"version": "5.5.2-m002",
"licenses": {
"RJO : artrjo-m": {
"type": "ENTERPRISE",
"validThrough": "Jun 12, 2021",
"licensedTo": "Test",
"licenseHash": "asdadsdb612bda1aae745bd2a3",
"expired": false
},
"RJO : artrjo-s1": {
"type": "ENTERPRISE",
"validThrough": "Jun 12, 2021",
"licensedTo": "JFrog",
"licenseHash": "asaswca236350205a3798c0fa3",
"expired": false
}
}
},
"adminUser": "jfmc",
"hasDRConfig": false,
"managed": false,
"warnings": [
"Site is missing",
"Failed to connect to the service. Please verify that the service information provided is correct."
],
"type": "ARTIFACTORY"
},
{
"id": "0727a49a-6c95-433e-9fc5-7e5c760cc76f",
"name": "NinetyTwo",
"url": "http:127.0.0.1:8081",
"authProvider": true,
"siteId": "cce1b6e2-4b5d-4455-ac96-6b5d4c0d901d",
"status": {
"status": "ONLINE"
},
"instanceStateReady": true,
"instanceState": {
"#type": "numberOfArtifacts",
"version": "5.9.0",
"licenses": {
"NinetyTwo": {
"type": "ENTERPRISE",
"validThrough": "Dec 30, 2018",
"licensedTo": "Test",
"licenseHash": "qweqwed95f712dbabee98184da52443",
"expired": false
}
}
},
"adminUser": "admin",
"hasDRConfig": false,
"managed": true,
"type": "ARTIFACTORY",
"serviceId": "jfrt#01c7g4c7hq0dpd0qa71r8c09sj",
"siteName": "Test",
"lastRefreshTime": "2018-04-24T09:43:01.698Z"
}
]
}
And I use $..[?(#.type!='JENKINS')].id path to receive id-s which relate to the instances with type NOT JENKINS, however JSON Extractor returns me the Jenkins's id too. The question is how can I receive ids for non-jenkins instances only?
Replace your JSON path expression with the below and it should work:
$.data.[*][?(#.type != "JENKINS")].id

Grafana status board

Not sure if this is possible but we're trying to create an overall status dashboard in grafana using the singlestat panel. We used templating to group our hosts into two sites and using the packet loss value from hostalive in Icinga2. We'd like the singlestat panel to show the percentage of hosts down but sometimes we get null values. Here's the JSON from our panels:
{
"id": 2,
"title": "Host Group 2",
"span": 6,
"type": "singlestat",
"targets": [
{
"target": "icinga2.$group1.host.hostalive.perfdata.pl.value",
"refId": "A",
"hide": true
},
{
"target": "keepLastValue(averageSeries(#A))",
"refId": "B",
"textEditor": true,
"targetFull": "keepLastValue(averageSeries(icinga2.$group1.host.hostalive.perfdata.pl.value), 10000)"
}
],
"links": [],
"datasource": null,
"maxDataPoints": "",
"interval": null,
"cacheTimeout": null,
"format": "percent",
"prefix": "",
"postfix": "",
"nullText": null,
"valueMaps": [
{
"value": "null",
"op": "=",
"text": "N/A"
}
],
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"rangeMaps": [
{
"from": "null",
"to": "null",
"text": "N/A"
}
],
"mappingType": 1,
"nullPointMode": "connected",
"valueName": "current",
"prefixFontSize": "50%",
"valueFontSize": "80%",
"postfixFontSize": "50%",
"thresholds": "50, 100",
"colorBackground": true,
"colorValue": false,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"sparkline": {
"show": false,
"full": false,
"lineColor": "rgb(31, 120, 193)",
"fillColor": "rgba(31, 118, 189, 0.18)"
},
"gauge": {
"show": false,
"minValue": 0,
"maxValue": 100,
"thresholdMarkers": true,
"thresholdLabels": false
}
}
The polling interval for the hosts is every ten minutes, the grafana board range is "today" and set to refresh every second.
Got it figured out with the keeplastvalue.
"targets": [
{
"hide": true,
"refId": "A",
"target": "exclude(keepLastValue(icinga2.$group1.host.hostalive.perfdata.pl.value, 144), '1-99')",
"textEditor": true
},
{
"refId": "B",
"target": "averageSeries(#A)",
"targetFull": "averageSeries(icinga2.$group1.host.hostalive.perfdata.pl.value)",
"textEditor": false
}
],

Can not filter results in vimeo api GET call with fields param

I am using Vimeo API, while making a get call to access a user's video I am doing
https://api.vimeo.com/users/61402929/videos?access_token=token
this is returning a json response
{
"total": 1,
"page": 1,
"per_page": 25,
"paging": {
"next": null,
"previous": null,
"first": "/users/61402929/videos?access_token=365879aad6244864dab70902890fc1a1&page=1",
"last": "/users/61402929/videos?access_token=365879aad6244864dab70902890fc1a1&page=1"
},
"data": [
{
"uri": "/videos/200383630",
"name": "Bhuvan bam _ Bb ki vines _ playing piano _ Saagar jaisi aankhon waali _ bhuvan bam live (360p_30fps_H264-96kbit_AAC)",
"description": "BB Ki Vines",
"link": "https://vimeo.com/200383630",
"duration": 59,
"width": 320,
"language": null,
"height": 320,
"embed": {
"uri": null,
"html": "<iframe src=\"https://player.vimeo.com/video/200383630?badge=0&autopause=0&player_id=0\" width=\"320\" height=\"320\" frameborder=\"0\" title=\"Bhuvan bam _ Bb ki vines _ playing piano _ Saagar jaisi aankhon waali _ bhuvan bam live (360p_30fps_H264-96kbit_AAC)\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>",
"buttons": {
"like": true,
"watchlater": true,
"share": true,
"embed": true,
"hd": false,
"fullscreen": true,
"scaling": true
},
"logos": {
"vimeo": true,
"custom": {
"active": false,
"link": null,
"sticky": false
}
},
"title": {
"name": "user",
"owner": "user",
"portrait": "user"
},
"playbar": true,
"volume": true,
"color": "00adef"
},
"created_time": "2017-01-20T17:57:04+00:00",
"modified_time": "2017-01-20T17:58:41+00:00",
"release_time": "2017-01-20T17:57:04+00:00",
"content_rating": [
"unrated"
],
"license": null,
"privacy": {
"view": "anybody",
"embed": "public",
"download": true,
"add": true,
"comments": "anybody"
},
"pictures": {
"uri": "/videos/200383630/pictures/613872508",
"active": true,
"type": "custom",
"sizes": [
{
"width": 100,
"height": 75,
"link": "https://i.vimeocdn.com/video/613872508_100x75.webp?r=pad",
"link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613872508_100x75.webp&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png"
},
{
"width": 200,
"height": 150,
"link": "https://i.vimeocdn.com/video/613872508_200x150.webp?r=pad",
"link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613872508_200x150.webp&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png"
},
{
"width": 295,
"height": 166,
"link": "https://i.vimeocdn.com/video/613872508_295x166.webp?r=pad",
"link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613872508_295x166.webp&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png"
},
{
"width": 640,
"height": 640,
"link": "https://i.vimeocdn.com/video/613872508_640x640.webp?r=pad",
"link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613872508_640x640.webp&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png"
},
{
"width": 960,
"height": 960,
"link": "https://i.vimeocdn.com/video/613872508_960x960.webp?r=pad",
"link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613872508_960x960.webp&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png"
}
],
"resource_key": "fdb74e1e2dcaf7c929cfe14240765f45f2d2a302"
},
"tags": [],
"stats": {
"plays": 0
},
"metadata": {
"connections": {
"comments": {
"uri": "/videos/200383630/comments",
"options": [
"GET",
"POST"
],
"total": 0
},
"credits": {
"uri": "/videos/200383630/credits",
"options": [
"GET",
"POST"
],
"total": 1
},
"likes": {
"uri": "/videos/200383630/likes",
"options": [
"GET"
],
"total": 0
},
"pictures": {
"uri": "/videos/200383630/pictures",
"options": [
"GET",
"POST"
],
"total": 1
},
"texttracks": {
"uri": "/videos/200383630/texttracks",
"options": [
"GET",
"POST"
],
"total": 0
},
"related": null
},
"interactions": {
"watchlater": {
"added": false,
"added_time": null,
"uri": "/users/61402929/watchlater/200383630"
}
}
},
"user": {
"uri": "/users/61402929",
"name": "Rishabh Kumar",
"link": "https://vimeo.com/user61402929",
"location": null,
"bio": null,
"created_time": "2017-01-11T16:15:43+00:00",
"account": "basic",
"pictures": null,
"websites": [],
"metadata": {
"connections": {
"activities": {
"uri": "/users/61402929/activities",
"options": [
"GET"
]
},
"albums": {
"uri": "/users/61402929/albums",
"options": [
"GET"
],
"total": 0
},
"appearances": {
"uri": "/users/61402929/appearances",
"options": [
"GET"
],
"total": 0
},
"categories": {
"uri": "/users/61402929/categories",
"options": [
"GET"
],
"total": 0
},
"channels": {
"uri": "/users/61402929/channels",
"options": [
"GET"
],
"total": 0
},
"feed": {
"uri": "/users/61402929/feed",
"options": [
"GET"
]
},
"followers": {
"uri": "/users/61402929/followers",
"options": [
"GET"
],
"total": 0
},
"following": {
"uri": "/users/61402929/following",
"options": [
"GET"
],
"total": 0
},
"groups": {
"uri": "/users/61402929/groups",
"options": [
"GET"
],
"total": 0
},
"likes": {
"uri": "/users/61402929/likes",
"options": [
"GET"
],
"total": 0
},
"moderated_channels": {
"uri": "/users/61402929/channels?filter=moderated",
"options": [
"GET"
],
"total": 0
},
"portfolios": {
"uri": "/users/61402929/portfolios",
"options": [
"GET"
],
"total": 0
},
"videos": {
"uri": "/users/61402929/videos",
"options": [
"GET"
],
"total": 1
},
"watchlater": {
"uri": "/users/61402929/watchlater",
"options": [
"GET"
],
"total": 0
},
"shared": {
"uri": "/users/61402929/shared/videos",
"options": [
"GET"
],
"total": 0
},
"pictures": {
"uri": "/users/61402929/pictures",
"options": [
"GET",
"POST"
],
"total": 0
},
"watched_videos": {
"uri": "/me/watched/videos",
"options": [
"GET"
],
"total": 0
}
}
},
"preferences": {
"videos": {
"privacy": "anybody"
}
},
"content_filter": [
"language",
"drugs",
"violence",
"nudity",
"safe",
"unrated"
],
"resource_key": "6fe192b4cb782d1341fbf3fb3d0ba04a0295236d"
},
"app": null,
"status": "available",
"resource_key": "cad1f2b7d388491329363a4936f0219fa4dfd18b",
"embed_presets": null
}
]
}
however I am only interested in fields paging, total, and some fields of data array therefore i am using filter as below
https://api.vimeo.com/users/61402929/videos?access_token=token&fields=paging,data.name,data.description,data.link,data.pictures.sizes.link
but the response of above call is
{
"total": 1,
"page": 1,
"per_page": 25,
"paging": {
"next": null,
"previous": null,
"first": "/users/61402929/videos?access_token=365879********0902890fc1a1&fields=paging%2Cdata.name%2Cdata.description%2Cdata.link%2Cdata.pictures.sizes.link&page=1",
"last": "/users/61402929/videos?access_token=365879********0902890fc1a1&fields=paging%2Cdata.name%2Cdata.description%2Cdata.link%2Cdata.pictures.sizes.link&page=1"
},
"data": [
[]
]
}
Edit: Also the response for the call
https://api.vimeo.com/users/61402929/videos?access_token=token&fields=paging
is
{
"total": 1,
"page": 1,
"per_page": 25,
"paging": {
"next": null,
"previous": null,
"first": "/users/61402929/videos?access_token=365879*********70902890fc1a1&fields=paging&page=1",
"last": "/users/61402929/videos?access_token=365879*********70902890fc1a1&fields=paging&page=1"
},
"data": [
[]
]
}
I am unable to figure out why the request is not being processed correctly.
A couple of things: First, the access token should be passed in the auth header of the request, not in the request uri as you mentioned: https://developer.vimeo.com/api/authentication#making-requests
With regards to the fields filter, the filter only applies to the keys nested under data. The paging array is always returned for requests where multiple items are returned.
So your example request should look like this:
https://api.vimeo.com/users/61402929/videos?fields=name,description,link,pictures.sizes.link
More info here: https://developer.vimeo.com/api/spec#json-filter
Hope this helps!
This is not a direct answer to this question, but in case anyone else like me ends up finding this page through search results, I have wasted a couple of hours of my life with a similar problem, wondering why the results returned by Vimeo's API were seemingly completely erratic, when dialing up the API using Laravel with this package like so:
$response = Vimeo::request('/me/albums/xxxxxxx/videos?fields=name,uri,duration,width,height,link', `['per_page' => 100], 'GET');`
After a lot of trial and error I discovered that it always seemed to miss the last field listed in the query parameter.
Anyway, the solution was to always send the request with a trailing comma! i.e.
$response = Vimeo::request('/me/albums/xxxxxxx/videos?fields=name,uri,duration,width,height,link,', `['per_page' => 100], 'GET');`
Is this an absolutely face-palmingly ridiculous requirement? Why, yes. Yes it is. But there you have it.