I'll try to perform this basic api request call below. It succeeds when I do not add the priority field:
{
"serviceDeskId": "3",
"requestTypeId": "30",
"requestFieldValues": {
"summary": "Test-Request 2 help via REST",
"description": "I need a new *mouse* for my Mac",
"priority": 1
}
But when I do i'll get the following error:
{
"errorMessage": "Unable to create request because of theses errors : Field with id 'priority' named 'Priority' has these errors : Could not find valid 'id' or 'name' in priority object.",
"i18nErrorMessage": {
"i18nKey": "sd.request.create.error.failed.msg",
"parameters": [
"Field with id 'priority' named 'Priority' has these errors : Could not find valid 'id' or 'name' in priority object."
]
}
}
Can someone explain me what's going wrong here? The priority field is available on the UI.
Hello,
You update the priority field like this:
"priority": { "id": "20000" }
"priority" returns as unrecognized field.
The data
$data = '{ "serviceDeskId": "1", "requestTypeId": "1", "raiseOnBehalfOf": "'.$_SESSION['currentUser']['userEmail'].'", "priority": { "id": "20000" }, "requestFieldValues": { "summary": "API Test", "description": "This is a test description" } }';
The error message
============ result: {"message":"Unrecognized field \"priority\" (Class com.atlassian.servicedesk.api.rest.dto.domain.request.RequestCreateDTO), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@c27b48; line: 12, column: 12] (through reference chain: com.atlassian.servicedesk.api.rest.dto.domain.request.RequestCreateDTO[\"priority\"])","status-code":500,"stack-trace":""} ============
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.