uvdesk / api-bundle Goto Github PK
View Code? Open in Web Editor NEWAPI Integration for UVdesk Community Helpdesk System.
License: MIT License
API Integration for UVdesk Community Helpdesk System.
License: MIT License
After testing the solution provided at: issue 12 the multiple attachments uploaded for a ticket still behaves the same, i.e If list of attachments are uploaded, it takes only the last item and uploads only one attachment.
When testing via postman, I use "attachments" key multiple times for each file I want to upload and also via my code base, I pass list of files to the attachments key, but both methods of testing still behaves the same as usual.
Line 57 in 0b5e2d1
Description
If we use multiple attachments in creates tickets and replies from the postman side should be added multiple attachments
How to reproduce
Step 1: Tickets creates or reply from the postman's side with multiple attachments
Step 2: Now go to the admin dashboard and here shown only one attachment:
Possible Solution
If we use multiple attachments in creates tickets and replies from the postman side should be added multiple attachments
Description
When create a custom field with required option from the postman side, so after create custom field not taking required on the when create a ticket from admin and customer end
How to reproduce
Step 1: Create a custom field with postman side like this:
{
"name": "Sample Custom Field",
"agentType": "both",
"fieldType": "text",
"placeholder": "Sample Custom Field Placeholder",
"status": true,
"required": true,
"encryption": false,
"sortOrder": 2,
"dependencies": [{"id": ticketTypeId}]
}
Step 2: Now check on the customer and admin side with create a ticket and submit blank the form so here not showing a required message in create ticket form:
Possible Solution
If we using the required field from the postman side so here also taking the required with showing a warning message like this:
Description
When replying from the customer account with the postman API so not going to email to the agent side
How to reproduce
Issue 1:
Step 1: Go to the postman side and reply from the customer account
Step 2: Now check the agent's email here nothing receives email notification but also going to the customer email with this email template: New Reply Added on ticket #id
Issue 2:
With the same steps with collaborators add in the ticket and reply from the customer or collaborators side so email notifications receive to the own customer and collaborators account but not receive email notifications to agent account.
Issue 3:
If the customer replies from the postman API side so collaborator is not added as a CC in the ticket thread like this:
Possible Solution
If the reply from the customer or collaborator side with the postman API side so should go to email notification to agent and collaborators side with the right email notification:
If a reply from the customer account from the postman side should be collaborator account added as a CC in ticket thread like this:
Hi Folks, I was wondering if any of the documentation listed in https://www.uvdesk.com/en/api-doc/#3043 could be used with this API integration package bundle, especially for the non-ticket specific capabilities. The reason why I am asking is that I was looking at the Github for the UVDesk API bundle and I only saw ticket-specific API functionality here https://github.com/uvdesk/api-bundle/wiki/Ticket-Related-APIs
Many thanks in advance!
I am unable to create a ticket with attachments in Python.
data = {
'message': message,
'actAsType': 'customer',
'name': name,
'subject': subject,
'from':from_email,
}
if attachments:
data['attachments'] = attachments
Above is the code i am using to fill my data object. This will go into the POST request to the api.
response = requests.post(url, data=data, headers=self.headers)
The ticket is actually created, however, attachments are nowhere to be found. See response below:
{'status': 'success', 'response': {'message': 'Success! Ticket has been created successfully.', 'ticketId': 35}}
In the attachments key is a base64 string. Is this correct? What format is to be expected?
Route for downloading an attachment "http://localhost:8000/api/v1/ticket/attachment/{attachementId}" is not working, when accessing the api-bundle provided by uvdesk
Every time i try to download an attachment using the above route, i kept on getting response:
{
"status": false,
"message": "An unexpected error occurred. Please try again later."
}
Description
I found out whenever list of all tickets is requested, there is formatedCreatedAt return with odd value.
I keep getting (almost) the same result "01-01-1970 15:16am".
The only think that changed was the time at the end of formatedCreatedAt.
At first I thought "api-bundle" could not returning proper "created at" date time value from database.
But oddly enough, it can when I requested to view single ticket, I get proper createdAt and updatedAt value.
How to reproduce
by requesting to /api/v1/tickets
check within "tickets" list , all formatedCreatedAt value started with "01-01-1970"
Possible Solution
at this point i'm not sure, yet
probably because of Webkul\UVDesk\ApiBundle\API\Tickets:objectSerializer
notice this line 920 = $object->formatedCreatedAt = new \Datetime;
probably should use correct value from $object->createdAt , with proper formatting
or just return $object->createdAt and let the frontend change it formatting according what it needs.
Can anyone please help me? thanks in advance
Description
If in api parameters leave space in last when create ticket then here showing an error
How to reproduce
Create a ticket using api side and added a api parameters with leave space in last in the below parameters, then after send request shows an error in all parameters like this: "Warning: Undefined array key "actAsType""
Name
From
Email
actAsType
Subject
Message
Attachments[0]
Note: Only on actAsEmail parameter if leave space in last then working.
Also, if we leave space in starting then all works fine.
Possible Solution
If we have leave space in the last then should not be shown an error like this.
Description
When the ticket is in the trashed tab should not be the agent updated at this moment
How to reproduce
Step 1: Create a ticket and trash the ticket
Step 2: Now go to the postman and update the agent from the postman API side with the trashed ticket id
Using this API:
API URL: {helpdesk_url}/api/v1/ticket/{ticketId}
Method: [PATCH]
Authorization: Basic {API token}
Inputs for agent Update:
property: agent(property is agent)
value: agent Id(agent id)
Note:
These inputs give in body -> x-www-form-urlencoded
Step 3: Here the ticket agent is updated successfully
Possible Solution
If we are updating the agent with a trashed ticket id from the postman side should not be updated the agent because on the uvdesk helpdesk trashed ticket agent is not updated:
Description
Is there an option to set limits and offset by fetching data like "all tickets" ?
The response includes only 15 items and it seems there is no way to get more than that.
Description
On the agent side should be added api bundle icon and also shows session login api keys on the agent panel
How to reproduce
Step 1: Login with agent account and here should be added api bundle. Please check the below points for add the api bundle on agent panel:
On agent panel should be shown api bundle without + access credentials button
On agent panel should not be shown a disable and copy credentials button
On agent panel should be shown a session login api keys but shows a partial key (not shows complete api key)
On agent panel should be shown only a delete credentials button for agent delete only own api keys
Possible Solution
At this moment only api bundle option and generated api keys shows on agent panel.
Note: Discussed with Akshay Sir
https://www.uvdesk.com/en/blog/api-resource/
I installed the API using the following guide the above guide, however when I attempt to pull for example tickets.json or similar using curl I get back a "404: We were not able to find the page you are looking for." page instead.
Am I missing a step here? The API section of the panel is available, and a token has been created.
Hi
Is it possible to retrieve just headline information about a ticket without pulling all the threads etc?
For instance, we would like to retrieve the last time a new response was posted on a ticket by anyone.
Description
When we using the wrong email from postman api side in agent and customer created and updated time so here should be shown a warning message instead of agent created on the admin dashboard
How to reproduce
Step 1: When we used the wrong email from the postman side in agent and customer account created time then here showing an error but also agent and customer created successfully on the admin panel without showing any warning:
On admin panel:
Step 2: When we updated the agent and customer then here updated with wrong email address from the postman api side instead of showing an warning:
Possible Solution
If we have created or updated with wrong email so here should be shown a warning message like admin panel:
This is not a valid email address
Description
When using forward reply from postman API side should be show forwarded in the ticket thread
How to reproduce
Step 1: Reply with a forward option from the postman side
Step 2: Now go to the admin dashboard and here reply added but not showing forwarded in the ticket thread:
Possible Solution
If we are using a forward reply from the postman side here should be shown forwarded in the ticket thread.
Description
Got error 500 on using /api/v1/customers/create , method POST
This is the result
{
"status": false,
"message": "An unexpected error occurred. Please try again later."
}
At this point I'm not sure what did I do wrong.
I tried to trace back inside api-bundle but could not even find proper customers.yaml within routes
How to reproduce
Use route /api/v1/customers/create.
Use method POST
Send as JSON the following parameters : firstName, lastName, email, contactNumber and isActive (boolean)
For example
{
"firstName": "first",
"lastName": "last",
"email": "[email protected]",
"contactNumber": "",
"isActive": true
}
Thanks
Description
When using the API i would like to set the CC adres and/or BCC adres on a thread.
So 2 additional parameters for setting CC and BCC.
Also multiple CC/BCC would be nice to have.
We have a need for this because of the following reason.
When a employee send in a ticket we need to inform there manager about the ticket also there for a CC would be nice.
Line 38 in 0b5e2d1
It should be userRepository
Description
When replying with a note and forward option added to the customer account so should not be added as a note and forward in the ticket thread
How to reproduce
Step 1: Reply from the postman side with the note and forward option choose
Step 2: Here added actAsType and actAsEmail is customer account
Step 3: Go to the admin panel and here note and forward added from the customer account:
Note added from the customer account:
Forward added from the customer account:
Possible Solution
If we use reply add from the postman side with the customer account so should not be added a note and forwarded with the customer account because on uvdesk helpdesk from the customer side is not available the note and forward option.
Description
When create an agent from api side then group, team, agent-priv, ticket-view option added
How to reproduce
Step 1: Create an agent from postman api side then added all params in form data:
Step 2: Now send this request and here showing an error like this:
Step 3: Now check on the admin panel here agent created successfully:
Also, not choose or added group and team option in created agent:
Also, not choose any ticket view option and agent privilege:
Possible Solution
If we are using the create agent from postman api side then should be added all option in agent on the admin panel
Description
Fetching all Tickets actAsType: customer responds with wrong list , same as agent, full long list of all tickets.
How to reproduce
API GET tickets ActAsType customer
Possible Solution
line 34 $data['actAsEmail'] not defined in api-bundle/API/Tickets.php
line 45 similar
When i upload multiple attachments to uvdesk, it only uploads the last file in the set of files sent, and discards the rest.
It does not accept an array of files when creating a ticket or replying to a ticket. It only takes one.
Description
Should be shown a proper messages when using the session logout api. Please follow the below cases point:
Here should be shown a message like this: "This api is expired so not working, please check once again"
Here should be shown a message like this: "This api is disabled from admin end, please check once again"
Here should be shown a message like this: " This Session token has been already expired successfully."
Possible Solution:
Should be shown a proper message while using the below cases.
Description
When installing I get the message
“Could not find package uvdesk/api-bundle. It was however found via repository search, which indicates a consistency issue with the repository”
When specifying a release ie
composer require uvdesk/api-bundle:1.0.4 i get the message
“Yor requirements could not be resolved to an installable set of packages” (for all releases i tried this was the answer)
min-stability is set to dev
updated composer and symfony and no change. running php 7.4
Description
When we added multiple access token on our admin panel then copy the below token using copy button then always copy on the first token only
How to reproduce
Create an api access token and copy the 2nd token so here copy the first token instead of click copy token details:
Possible Solution
When click on copy token so here should be copy the same access token
Description
If we are creating a ticket from the postman side, click on ticket view showing an error
How to reproduce
Step 1: Ticket created with this case and send:
message : (your message)
actAsType : (agent)
actAsEmail: (any customer email)
name: (customer name)
subject: (Ticket subject)
from: (Agent Email)
Step 2: Now go to the admin panel and click on the created ticket with this case after clicking on it shows an error:
Possible Solution
If we create a ticket and click on the ticket should be open
Description
I'm trying to fetch the tickets belonging to a particular user.
As suggested by the API documentation (https://github.com/uvdesk/api-bundle/wiki/Ticket-Related-APIs) I tried:
To send a GET request to this endpoint: {my_localhost_url}/api/v1/tickets?actAsEmail={[email protected]}.
The API response is the same everytime, regardless of the email parameter.
So to clarify, everytime I receive a response containing all the tickets no matter their emails.
If I try this:
{my_localhost_url}/api/v1/tickets?actAsEmail={[email protected]}&actAsType=customer
The API returns an error.
How to reproduce
To reproduce this issue:
Thanks for your help.
Description
I'm trying to assign a ticket to a particular agent.
As suggested by the API documentation (https://github.com/uvdesk/api-bundle/wiki/Ticket-Related-APIs) I tried:
To send a PUT request to this endpoint: {my_localhost_url}/api/v1/ticket/{ticketId}/agent.
I assume that "agent", after the last slash, is the id of the agent you want to assign the ticket, isn't it?
The API response that I got is this:
{
"status": false,
"message": "No route found for \"PUT /api/v1/ticket/2/4\""
}
I should say that I've verified and the agent id exists.
Same thing for the ticket which id is 2.
How to reproduce
To reproduce this issue:
Thanks in advance!
I need to know how can I post formatted message to uvdesk api create.
I tried to send message with full html tags, and all html tags were sanitized.
I tried again using php htmlentities()
htmlspecialchars()
, converting html tags (limited to p
, br
and a
) to ascii counterpart but it is also sanitized.
Can you please help me?
Thanks in advance
Description
I cannot query the API for customers: I get "No route found"
How to reproduce
Query for retrieving tickets works:
$ curl -X GET -H "Authorization: Basic $TOKEN" https://<domain>/api/v1/tickets
while for customers it doesn't work:
$ curl -X GET -H "Authorization: Basic $TOKEN" https://<domain>/api/v1/customers
{"status":false,"message":"No route found for \u0022GET \/api\/v1\/customers\u0022"}
I'm looking at the documentation on uvdek web site at the page https://www.uvdesk.com/en/api-doc/, but I'm getting confused because it doesn't seem to be consistent to my installation: is that documentation valid for uvdesk/api-bundle
project?
Thank you
Stefano
Description
When we create and update of agent, customer, group, and team option form postman api side then should be shown a validation for special characters
How to reproduce
Step 1: When we create a new or update an agent, customer, group, and team field then if we using some special characters in firstname and lastname, name, description field then created or updated successfully from the postman api side instead of warning:
Step 2: Now checked on the same from the admin dashboard then here showing a warning like this:
Possible Solution
If we created a new agent, customer, group, team form postman api side then should be shown a warning like admin panel
This field must have characters only
This field must be a number
Hi!
I am using Python to create new tickets with this code:
import requests
headers = {"Authorization": "Bearer TOKEN"}
payload = {
"message": "Ticket Message",
"actAsType": "customer",
"name": "Name",
"subject": "Ticket Subject",
"from": "[email protected]",
}
r = requests.post("http://my_server/api/v1/ticket", data=payload, headers=headers)
print r.content
Now I want to know how can I create this same ticket but with attachment.
Thanks!
Description
When we are using the expired token from session logout api then token not expired/disabled from admin panel
How to reproduce
Step 1: First create a token from using session login api or from admin panel on admin credentials button:
Step 2: Now we have api token expired from session logout api using postman side:
Headers:
{
"Authorization": "Bearer ACCESS_TOKEN"
}
Step 3: After token expired now check on the admin panel and here this token still enabled:
Possible Solution
If we have api token expired from session logout api side so here should be token is expired like when click on disbaled button so here status is disabled but here should be status shown expired and also enabled button is unclickable so that we are not able to status is enabled again:
Note: Discussed with Akshay Sir
Description
If we reply with forward type this reply should not be shown on the customer side
How to reproduce
Step 1: Reply from the postman side with forward type with agent id
Step 2: Now check on the admin panel here forward the reply added that is correct:
Step 3: Now check on the customer panel and here also show the agent forward reply:
Note: If the forward reply from admin id so reply not shown on the customer side but using agent id so reply shown on the customer panel
Possible Solution
If forward from postman side so agent forward reply should not be shown on the customer panel
Description
When creating a ticket using the api bundle it gets the default ticket type even when sending a type field with the request.
How to reproduce
Create two Ticket Types in the dashboard
Send a POST
request to my-domain/api/v1/ticket
with
{
"name": "John Dow",
"from": "[email protected]",
"subject": "Example",
"message": "Testing example.",
"type": "support"
}
The newly created ticket has the default
ticket type.
Possible Cause
In Webkul\UVDesk\ApiBundle\API\Tickets::createTicket
we don't do anything with $data['type']
Description
When using session/login api then showing an error regarding UserAccessScopes
How to reproduce
Step 1: Use the session login api, then api send here showing an error:
Case 1: If we are using the admin email for session login then api secret key generated on the admin HD but on PM api side showing an error like this:
Case 2: If we are using any agent email then showing an error also api secret key not generated on admin HD:
Possible Solution
If we are using the session login api with owner account or agent account so here not shoiwng an error also create an api on the admin panel
Description
If the ticket deletes permanently from the postman side so attachments are not deleted from the physical path:
[public/assets/threads]
How to reproduce
Step 1: Tickets delete permanently from the postman side
Step 2: Now check in the physical path of the project here are attachments not deleted from this path:
[public/assets/threads]
Possible Solution
If we delete permanently from the postman side so attachments should be deleted from the physical path: [public/assets/threads]
Description
When we using the raw format for create agent api then here showing an error
How to reproduce
Step 1: Added a details for creating agent in raw option like this:
{
"firstName": "lazer",
"lastName": "angelov",
"role": "ROLE_AGENT",
"email": "[email protected]",
"contactNumber": "8178563000",
"isActive": "false",
"signature": "lazer angelov",
"designation": "QA",
"agentPrivilege": ["2"],
"userSubGroup": ["3"],
"groups": ["2"],
"ticketView": "2"
}
Step 2: Then send api and here showing an error like this: "Notice: Undefined index: email"
Note: Same params we have using with the data form then agent created successfully.
Possible Solution
If we have added data with raw format so here should be create an agent from postman api side.
Description
UvDesk API bundle tickets filtration use actAsType="customer" and actAsEmail="email.address" as main identification
This resulting our customers losing their ticketing after they change their email address.
So I tried to submit email change using route /api/v1/customers/update/{customerId}
But I got the following error message returned
{
"status": false,
"message": "Class \"Webkul\\UVDesk\\ApiBundle\\API\\UserPasswordEncoderInterface\" does not exist"
}
How to reproduce
As example I used customerId 8
Use this route /api/v1/customers/update/8
Use method POST (this route will not work using PUT)
Send in JSON format data that I want to changed, in this case the email address, for example
{
"email": "[email protected]"
}
Description
Url : /api/v1/tickets
On invoking the get all tickets fails with error " Call to a member function getId() on null"
It works completely fine on fetching the individual ticket.
Url : /api/v1/ticket/1
How to reproduce
After installing the API bundle within the container
Any hints or suggestions will be greatly appreciated
How to reproduce
I created a ticket using the API
I made a post request http://localhost:8000/api/v1/ticket/1/thread to reply the thread, and below is the body
{ "message":"why should I Help you", "actAsType":"customer", "actAsEmail":"[email protected]", "threadType":"reply" }
This is the response and no error message in the terminal
{ "status": false, "message": "An unexpected error occurred. Please try again later." }
Description
The ticket channel should be API when the ticket creates from the postman API side
How to reproduce
Step 1: Ticket creates from postman API side
Step 2: Now go to the admin panel, and click on the tickets for ticket view page here show the channel is website instead of the API channel:
Possible Solution
If we are creating a ticket from the API side should be channel shown API like this:
Note: On the tickets list page already shows channel API
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.