You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-09-23 20:27:38

stevansantos
Member
Registered: 2020-11-03
Posts: 7

[GLPI 9.5.5] Get only Requester id (type 1)

Is there any filter I can apply into the apirest.php/Ticket/XYZ/Ticket_User that returns only the requester id (type 1)?


Response:

[
  {
    "id": 1,
    "ticket_id": 23,
    "users_id": 5,
    "type": 1,
  },
  {
    "id": 2,
    "ticket_id": 23,
    "users_id": 8,
    "type": 3,
}
]

Expected (Using filter)

[
  {
    "id": 1,
    "ticket_id": 23,
    "users_id": 5,
    "type": 1,
  }
]

Last edited by stevansantos (2022-09-23 20:28:20)

Offline

#2 2022-09-23 21:30:55

stevansantos
Member
Registered: 2020-11-03
Posts: 7

Re: [GLPI 9.5.5] Get only Requester id (type 1)

Solved!

Just inserted apirest.php/Ticket/XYZ/Ticket_User/searchText[type]=1 and it returned only the requester as it shows below

[
	{
		"id": XXXX,
		"tickets_id": XXX,
		"users_id": XXX,
		"type": 1,
		"use_notification": 1,
		"alternative_email": "",
		"links": [
			{
				"rel": "Ticket",
				"href": "/apirest.php/Ticket/XXXX"
			},
			{
				"rel": "User",
				"href": "apirest.php/User/XXX"
			}
		]
	}
]

Offline

Board footer

Powered by FluxBB