Jira使用REST登录

Jira使用REST登录,jira,jira-rest-api,Jira,Jira Rest Api,我想使用Jira的restapi与之合作,但在此之前,我想使用restapi进行登录。到目前为止,我发现可以使用用户名和api密钥令牌进行登录。但我不想从门户创建API令牌。 因此,如果我们可以从API本身创建API令牌或以某种方式登录,请寻求建议。根据Atlassian的说法,有多种方式可以通过JIRA进行身份验证。您希望使用的方式是使用基于cookie的身份验证 This is how cookie-based authentication works in Jira at a high l

我想使用Jira的restapi与之合作,但在此之前,我想使用restapi进行登录。到目前为止,我发现可以使用用户名和api密钥令牌进行登录。但我不想从门户创建API令牌。 因此,如果我们可以从API本身创建API令牌或以某种方式登录,请寻求建议。

根据Atlassian的说法,有多种方式可以通过JIRA进行身份验证。您希望使用的方式是使用基于cookie的身份验证

This is how cookie-based authentication works in Jira at a high level:

 - The client creates a new session for the user via the Jira REST API.
 - Jira returns a session object that has information about the session including the session cookie. The client stores this session object.
 - The client can now set the cookie in the header for all subsequent requests to the Jira REST API. 

这回答了你的问题吗?我试过了,但是“登录失败”。对于密码,我必须使用Jira登录密码或创建API密钥(如中所建议)。如果API密钥是这种情况,我希望它使用用户名和密码,而不是我们必须首先从Jira仪表盘生成的API密钥。感谢您的建议,按照步骤1,我们是否必须传递用户名和密码的组合,或从Jira生成的用户名和API密钥dashboard@user12251642您必须传递用户名和密码是,我尝试了用户名、密码,但它给了我登录失败和401响应。只是为了确认我使用的是云版本,是用于自托管的吗?