AP.request({
url: "/rest/api/group",
type: 'PUT',
contentType: "application/json",
Accept: 'application/json',
Authorization: "Basic bWJvdWF6emEuc3BlY3RydW1ncm91cGVAZ21haWwuY29tOk9jQjloZXRCWVg1b2dDaDdtUXNSMDRCNA==", data: JSON.stringify(bodyData2),
success: function (data) {
console.log(data)
}}).catch(function (error) {
console.log(error)
});
I added to scope all permissions
"scopes": [ "READ", "ACT_AS_USER", "WRITE", "DELETE", "SPACE_ADMIN", "ADMIN" ],
im connected with an administrator
Hello @Mehdi
A 405 error is telling you that the request is incorrectly formed, which means your code which is making the request has a mistake in it.
Try doing some basic testing of the structure of the request first, using a REST API test tool like Postman. If the request works, then some other part of your code is incorrect.
Hi @Mehdi - Can you check the URI format?
New group creation must have a POST /wiki/rest/api/group
https://developer.atlassian.com/cloud/confluence/rest/api-group-group/#api-api-group-post
User must be a site admin to create a new group
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Niranjan , sorry i put the wrong code
this is my code
const bodyData2 = {"name": "RS-managers"};
AP.request({ url: "/rest/api/group",
type: 'PUT',
contentType: "application/json",
Accept: 'application/json',
Authorization: "bWJvdWF6emEuc3BlY3RydW1ncm91cGVAZ21haWwuY29tOnd6UGhpRXBWd1JTN0E0aDhrRVRyODhGRg==",
data: JSON.stringify(bodyData2),
success: function (data) {console.log(data)}
}).catch(function (error)
console.log(error)
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mehdi - Can you try with POST method ? PUT method is generally used for update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.