{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Search

Search for tickets with a given phrase. The phrase is identical to the one used in the Tickets application and additionally offers suggestions for ticket fields and values within these fields. The response list of tickets is represented by their ticket IDs which can be used for further requests.

The request is supposed to be send using the POST verb, including a request body consisting of JSON to describe the search request.

POST /api/ticket/search

The following request fields can be set in the JSON posted to the server. The servers response is either an error or an object with RESPONSE fields from below.

REQUEST Fields Value Type Description
query string The search string.
limit (optional) number The limit of tickets to return, defaults to 100
start (optional) number The starting point from which additional tickets should be returned. Defaults to 0.
locale (optional) string The locale to use for the search. This corresponds to the language of the search phrase (query). Defaults to the detected locale of the requesting client.
RESPONSE Fields Value Type Description
ticketList array The list of ticket IDs.
hasMore boolean True, if there are more matches.
suggestedFields array A list of ticket fields that can be used to extend the query.
suggestedValues array A list of values from the ticket fields that can be used to extend the query.

Example Request

# Request
POST /api/ticket/search HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
{
    "query": "Resource:",
    "limit": 100,
    "start": 0,
    "locale": "en"
}
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
    "ticketList": [
        1,
        2,
        3,
        4
    ],
    "hasMore": true,
    "suggestedValues": [
        "First Level Support",
        "Sub 2. Second Level",
        "Sub Ressource 1. Level"
    ],
    "suggestedFields": []
}

Application Example

# Browser access
http://127.0.0.1:9000/api/ticket/search
 
# Shell access using curl
curl -Ls "http://127.0.0.1:9000/api/ticket/search" \
     --header 'Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u' \
     --header "Content-Type: application/json" \
     --request POST \
     --data '{"query":"Resource:","locale":"en"}'
 
 
# Shell access using curl using username and password
curl -Lsu username:password "http://127.0.0.1:9000/api/ticket/search" \
     --header "Content-Type: application/json" \
     --request POST \
     --data '{"query":"Resource:","locale":"en"}'
i-net HelpDesk
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - /search