After upgradering our Confluence Server (self-hosted) to the lastest version 7.1.0, we experince that we cannot lookup users in the Create event dialog. I have updated the Team Calendar plugin to the latest version, which did not resolve the issue.
Two questions:
1) Have anybody else experienced this?
2) Do we need to restart the Confluence server for the plugin update to take effect?
Screen dump of Create event dialog:
First approach with things like this is to make sure you can make the request using curl, or postman or something, then turn it into code.
Other thing is you seem to be using two completely different URLs for making requests too, second one looks bogus.
Stylistically, it's much clearer and safe to write:
http.request(Method.PUT, ContentType.JSON) {
requestContentType = ContentType.JSON
body = [
productClass: 'test',
subscriberId: 'test',
]
...rather than hand-rolling your own json from a string.
Ahh thank you Jamie! Much appreciated for your guidance.
I ended up with the following:
def addModem(key, modemId) {
def http = new HTTPBuilder('http://incognito/devices')
http.request(POST, ContentType.JSON) {
requestContentType = ContentType.JSON
request.addHeader("authorization: IncognitoUms auth=${key}", "ContentType: application/json")
body = [oui: "test",
productClass: "test",
serial: "test",
subscriberId: "test",
manufacturer: manufact,
description: "",
deviceModel: "{id: \"${modemId}\"}"]
response.success = { resp, JSON ->
return JSON
}
response.failure = { resp, JSON ->
return JSON
}
}
}
Many thanks,
Pon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted],
I am wondering how the second part is receiving the token fetched in the first part. Can you please share the full script that gets the token, inserts it in to the headers and makes a REST call ? Thanks
--Raihan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.