After reading the official Documentation about creating permissions
I've copied the sample data from the site and place it in test.json (and fixed the missing } at the end in order to have a valid json file.)
Then the following command failed:
curl -X POST 'http://localhost:8082/access/api/v2/permissions/Checkmate.json' --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer eyJ2ZXIiOi...' -d @test.json
leads to:
{
"errors" : [ {
"code" : "METHOD_NOT_ALLOWED",
"message" : "HTTP 405 Method Not Allowed"
} ]
}
I've tried the delete permissions example and that worked with the same bearer token.
What am I doing wrong - the documentation is not precise enough.
PS: running artifactory version 7.77.5
I created a file called my-test.json with below content
Then I ran the below command.
My permission target was created successfully. Please give a try with this command.