Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operatingsystems Info Unavailable From REST V 9.2.1 #3334

Closed
databang-io opened this issue Dec 20, 2017 · 5 comments
Closed

Operatingsystems Info Unavailable From REST V 9.2.1 #3334

databang-io opened this issue Dec 20, 2017 · 5 comments

Comments

@databang-io
Copy link

databang-io commented Dec 20, 2017

Hi,
I have an issue with the rest API in 9.2.1.

The REST API Documentation states that we could retrive the following keys from a Computer object .

"operatingsystems_id": "Ubuntu 15.04",
"operatingsystemversions_id": "15.04",
"operatingsystemservicepacks_id": " ",
"os_license_number": null,
"os_licenseid": null,

But wen performing the following request :

http://glpi/apirest.php/Computer/?expand_drodpowns=true&with_infocoms=true&with_documents=true

I have none of those fields in my response .
I also have issues with the ?expand_drodpowns=true option witch has no effect on my response .

Bernard

@chenjeff622
Copy link

the same problem . how to get operation system information?

@kartnico
Copy link

Hello,

I have the same problem with the following request :

https://path/to/glpi/apirest.php/Computer/$id

(where $id is computer id). I don't have "operatingsystems_id".

My components versions :
CentOS Linux release 7.4.1708 (Core)
httpd.x86_64 2.4.6-67.el7.centos.2
mariadb.x86_64 5.5.56-2.el7
php.x86_64 7.2.5-1.el7.remi
glpi.noarch 9.2.3-1.el7.remi
glpi-fusioninventory.noarch 9.2.0.2.0-1.el7.remi

Regards,

Nicolas

@kartnico
Copy link

kartnico commented Sep 25, 2018

Hi,

I have the same problem after update to GLPI 9.3.1

My Fusioninventory plugin version is 9.3+1.1 (I test with and without this plugin, and I have also the problem).

My REST API request : https://path/to/glpi/apirest.php/Computer/$id

The answer :

"is_recursive": 0,
"date_creation": "2017-10-26 22:31:00",
"id": 3,
"entities_id": 2,
"name": "test",
"serial": "",
"otherserial": "",
"contact": "",
"contact_num": "",
"users_id_tech": 0,
"groups_id_tech": 0,
"comment": "",
"date_mod": "2017-11-27 17:06:34",
"autoupdatesystems_id": 0,
"locations_id": 0,
"domains_id": 1,
"networks_id": 0,
"computermodels_id": 0,
"computertypes_id": 0,
"is_template": 0,
"template_name": null,
"manufacturers_id": 0,
"is_deleted": 0,
"is_dynamic": 0,
"users_id": 0,
"groups_id": 0,
"states_id": 0,
"ticket_tco": 0,
"uuid": "",
"links": [
{
	"rel": "Entity",
	"href": "https://path/to/glpi/apirest.php/Entity/2"
},

I don't have "operatingsystems_id".

And I have an attached operating system to this computer :
image

Regards,

Nicolas

@trasher
Copy link
Contributor

trasher commented Sep 26, 2018

Operating systems are on their specific object now; this is no longer part of the computers table. Try querying on Item_OperatingSystem with Computer as itemtype and computers id as items_id.

@kartnico
Copy link

Hello,

Many thanks for your answer, it looks good.

My request :

https://path/to/glpi/apirest.php/Computer/$id/Item_OperatingSystem/?expand_dropdowns=true&get_hateoas=false

Now I get the operating system name :

[
	{
		"id": 1,
		"items_id": "test",
		"itemtype": "Computer",
		"operatingsystems_id": "CentOS Linux release 7.5.1804 (Core)",
		"operatingsystemversions_id": "7.5.1804",
		"operatingsystemservicepacks_id": 0,
		"operatingsystemarchitectures_id": "x86_64",
		"operatingsystemkernelversions_id": "3.10.0-862.11.6.el7.x86_64",
		"license_number": null,
		"license_id": null,
		"operatingsystemeditions_id": 0,
		"date_mod": "2018-09-25 09:26:18",
		"date_creation": null,
		"is_deleted": 0,
		"is_dynamic": 1,
		"entities_id": "My Company",
		"is_recursive": 0
	}
]

Regards,

Nicolas

trasher added a commit to trasher/glpi that referenced this issue Sep 26, 2018
trasher added a commit to trasher/glpi that referenced this issue Sep 26, 2018
trasher added a commit that referenced this issue Sep 28, 2018
ettalhi pushed a commit to ettalhi/glpi that referenced this issue Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants