1

We can fork repository using this

 /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}

But I am not able to understand how to use it in python requests API ? It throws me 500 status code.

I used this:

requests.post("https://PROJECTURL/rest/api/1.0/projects/PRJ_KEY/repos/REPO_NAME",
  auth=("usename", "password"), verify=False)

Any idea how should I define this?

SQB
  • 3,926
  • 2
  • 28
  • 49
vijay
  • 17
  • 3

1 Answers1

0

I believe you need to provide a POST payload even if it's empty JSON - eg: {}

Rog
  • 4,075
  • 2
  • 24
  • 35
  • requests.post("http://PROJECTURL/rest/api/1.0/projects/PRJ_KEY/repos/REPO_NAME", auth=("user", "password"), verify=False) this return me 200 status code, it should return 201 correct? – vijay Mar 25 '15 at 11:33