Jira API从Jira项目中获取所有具有特定状态的用户

问题描述 投票:0回答:1

[在我的Ruby应用中,我试图从服务台板上获取所有代理用户。这表示所有具有status: 'ServiceDesk'的用户。是否可以仅使用基本身份验证?

在卷曲中,我正在尝试类似的事情:

curl -D -u USERNAME:PASSWORD -X GET -H "Content-Type: application/json" https://company_name.atlassian.net/rest/api/2/user/assignable/search?project=SERVICEDESK

但是我得到的只是一个错误:

警告:文件名参数'-u'看起来像一个标志。curl:(3)使用错误/非法格式或缺少URL的URL{“ errorMessages”:[“内部服务器错误”],“错误”:{}}%

有没有办法通过基本身份验证获取那些数据?

ruby rest jira jira-rest-api
1个回答
0
投票

我认为curl命令有问题,请尝试此

curl -D- -u USERNAME:PASSWORD  https://company_name.atlassian.net/rest/api/2/user/assignable/search?project=SERVICEDESK

It worked with me

© www.soinside.com 2019 - 2024. All rights reserved.