I'm creating a ticket but also want to mention a user in the description. I know the email. Do I have to look the user id before being able to mention?
When mentioning the user from the UI it turns up like this
{
type: "paragraph",
content: [
{
type: "mention",
attrs: {
id: "[user id]",
text: "@My Users Name",
accessLevel: "",
},
},
{
type: "text",
text: " ",
},
],
}
Yes... I need to provide the id of the user...
In a RESTful API context, mentioning someone in a ticket typically involves sending a request to the server to associate a user with a specific ticket or include them in some kind of notification system. The specific implementation details can vary based on the API and platform you're working with, but generally, you would use HTTP methods (like POST or PATCH) to update or create a ticket with the mentioned user.
Here's a general example using HTTP POST:
```http
POST /api/tickets/:ticketId/mentions
Content-Type: application/json
{
"mentionedUserId": "123",
"message": "Hey, could you take a look at this ticket?"
}
```
In this example:
- `POST /api/tickets/:ticketId/mentions` is the endpoint for mentioning someone in a ticket. You would replace `:ticketId` with the actual identifier of the ticket.
- `Content-Type: application/json` indicates that the request body will be in JSON format.
- The JSON payload includes the `mentionedUserId` field, representing the ID or unique identifier of the user you want to mention.
- The `message` field can contain an optional message to accompany the mention.
Keep in mind that this is a simplified example, and the actual implementation details can vary depending on the API specifications or conventions used by the system you're working with. It's recommended to consult the API documentation of the service you're integrating with for accurate and detailed information on how to mention someone in a ticket using their REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This seems correct to me. You can also take a look at this thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.