Hello, I have my own application, which already can create issues in JSM using REST API
curl --request POST \
--url 'https://{portal}.atlassian.net/rest/servicedeskapi/request' \
-u <secret-here>\
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"raiseOnBehalfOf": "user@email.here",
"serviceDeskId": "1",
"requestTypeId": "1",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}'
Property raiseOnBehalfOf helped me to specify customer's email, and issue was created with customer email as reporter
But now I need to add comment to JSM issue on customer behalf. REST API for comment creation contains only .body and .public fields.
I don't see a property raiseOnBehalfOf or anything like that.
{"errorMessages":["Unrecognized field \"raiseOnBehalfOf\" (Class com.atlassian.servicedesk.api.rest.dto.domain.comment.CommentCreateDTO), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@5877bceb; line: 5, column: 2] (through reference chain: com.atlassian.servicedesk.api.rest.dto.domain.comment.CommentCreateDTO[\"raiseOnBehalfOf\"])"]}%
I also found java api
@Nonnull ServiceDeskComment createServiceDeskComment(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull ServiceDeskCommentCreateParameters createParameters)
ApplicationUser
as the authorHi @Shovel Box
This is a good starting point, please find the ref link here
https://community.developer.atlassian.com/t/raise-comment-on-behalf-of-customer-via-api/28342
Thanks,
Pramodh
so, only the way is to use connect app? I have no idea why rest api allows to create issues on customer behalf but not comments...
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.