1

I am working on automating a perl script by using rest api to create a restriction for supplied branch except for some user. Based on REST API for branch permissions, which is documented here.The document explained about the syntax of how to use GET but did not explain how the POST syntax are and how to use it .Here are some of the stuff that I have done before I got the road block.

I first obtain credential from bitbucket .Then construct json using the same format in document API and then perform encode_json in my script.The post command that I have constructed as below which is the final piece that I having problem with.

example 1: $client->POST("/rest/api/1.0/projects/COMMON/repos/data,$json, $headers);
example 2: $client->POST("/rest/branch-permissions/2.0/projects/COMMON/repos/data/restrictions/,$json, $headers);
June
  • 11
  • 2
  • Can you share what JSON you are sending to the server, and what error it is responding with? The link you included does have an example of a request body -- you have to look for the "Example request representations" part right after the description of the request and click the "Expand" link. – PlasmaSauna Jun 21 '17 at 04:07

0 Answers0