Hi, i was in progress to create an extension for auto assign ticket, and I had been using REST to create ticket, was wondering if there is a chance that I can include service_id and servicesubcategory_id in core/create? so that it can help to auto assign ticket? thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how can I ensure I have the right ID? I tried to look into ticket_request to get some of the IDs to check, but every time when I use Postman to test create ticket, it will be invalid object... do I need to have anything wrap the service_id and servicesubcategory_id?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the URL part is right, as if I removed service_id and servicesubcategory_id, I can create ticket with no issue, that {{rest_endpoint}} is just a variable setting in Postman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i was in progress to create an extension for auto assign ticket, and I had been using REST to create ticket, was wondering if there is a chance that I can include service_id and servicesubcategory_id in core/create? so that it can help to auto assign ticket? thank you
Yes, you can set those values during creation. Just add those fields in your core/create file and point to the right IDs.
how can I ensure I have the right ID? I tried to look into ticket_request to get some of the IDs to check, but every time when I use Postman to test create ticket, it will be invalid object... do I need to have anything wrap the service_id and servicesubcategory_id?
You could just check in iTop. When viewing the details of for example a service, you'll see "id=" in the URL.
so I have double check I have service_id 10, and it has servicesubcategory_id 1, but I still have the below error
Here's the code I use in Postman
Are you sure that you are pointing to the right URL? You seem to be using Postman, maybe you have the wrong env. variable in {{rest_endpoint}}
the URL part is right, as if I removed service_id and servicesubcategory_id, I can create ticket with no issue, that {{rest_endpoint}} is just a variable setting in Postman
Another thing which comes to mind: the REST user is not restricted to certain organizations? (Doubt this is the issue, but worth checking)
Last edit: Jeffrey Bostoen 2023-04-27
Currently we only have 1 organizations in place, so this is not an issue yet...
Can you try to create a userRequest manually with the same data ?