簡體   English   中英

為 github api 添加過濾器 curl

[英]Adding filter with curl for github api

如何在 curl 中為 github api 添加 2fa 過濾器? 這是文檔頁面的圖像,但它沒有指定如何為 2fa 添加過濾器

非常感謝!

我試過使用“?”:curl
-H "接受:application/vnd.github+json"
-H“授權:不記名”“”
-H“X-GitHub-Api-版本:2022-11-28”
https://api.github.com/orgs/"my_org_name"/members?2fa_disabled

根據文檔,您需要的查詢參數稱為filter ,值為2fa_disabled 因此,您的 curl 命令應如下所示:

curl \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>"\
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/members?filter=2fa_disabled

請記住,此選項僅適用於組織所有者。

文檔: https://docs.github.com/en/rest/orgs/members?apiVersion=2022-11-28#list-organization-members

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM