---
title: API Xventory
slug: aiops2/api-xventory
docTags: 
createdAt: 2023-11-03T14:06:03.764Z
---



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://inventory-server/inventory/api/sync/configuration-items/",
  "name": "Listar todos os itens de configuração",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "name": "page",
        "kind": "optional",
        "type": "Integer",
        "description": "",
        "children": []
      },
      {
        "kind": "optional",
        "name": "page_size",
        "type": "Integer",
        "description": "Resultados por página (Default: 100)"
      },
      {
        "name": "seconds",
        "kind": "optional",
        "type": "Integer",
        "description": "Valor relativo em segundos (Ex: 3600)",
        "children": []
      },
      {
        "kind": "optional",
        "name": "from",
        "type": "String",
        "description": "O ID inicial para busca em offset."
      },
      {
        "name": "to",
        "kind": "optional",
        "type": "string",
        "description": "",
        "children": []
      },
      {
        "name": "name",
        "kind": "optional",
        "type": "string",
        "description": "Nome do computador / Hostname",
        "children": []
      },
      {
        "name": "os",
        "kind": "optional",
        "type": "string",
        "description": "Nome do Sistema operacional (ex: Ubuntu, Windows Server 2023)",
        "children": []
      },
      {
        "name": "os_type",
        "kind": "optional",
        "type": "string",
        "description": "Tipo de Sistema operacional (ex: Linux, WIndows, Mac, etc)",
        "children": []
      },
      {
        "name": "type",
        "kind": "optional",
        "type": "string",
        "description": "Tipo de Item de Configuração (Other, Desktop, Laptop, Workstation, Computer, Server, etc.)",
        "children": []
      },
      {
        "name": "detailed",
        "kind": "optional",
        "type": "Boolean",
        "description": "Retornar todas as propriedades do item de configuração (Definir como true) Default: false",
        "children": []
      },
      {
        "name": "ci_ids[]",
        "kind": "optional",
        "type": "string",
        "description": "Array de ids dos itens de configuração",
        "children": []
      }
    ],
    "headerParameters": [],
    "formDataParameters": [],
    "bodyDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "KuHjtRecM78pjppiZCzft",
        "code": "{\n\t\"results\": [\n\t\t{\n\t\t\t\"ci_id\": \"CI0000001\",\n\t\t\t\"name\": \"ser-stj\",\n\t\t\t\"type_name\": \"Other\",\n\t\t\t\"os\": \"Ubuntu 22.04\",\n\t\t\t\"os_type\": \"Linux\",\n\t\t\t\"description\": null,\n\t\t\t\"created_at\": \"2023-10-17T22:27:23.627547Z\",\n\t\t\t\"updated_at\": \"2023-10-20T22:27:23.627000Z\",\n\t\t\t\"hardware\": {\n\t\t\t\t\"DNS\": \"127.0.0.53\",\n\t\t\t\t\"ARCH\": null,\n\t\t\t\t\"NAME\": \"simon-stj\",\n\t\t\t\t\"UUID\": \"bd314f12-0ad3-425b-8771-9497b2011d07\",\n\t\t\t\t\"IPSRC\": \"146.235.62.40, 10.0.20.201\",\n\t\t\t\t\"IPADDR\": \"10.0.20.158/192.168.177.1/192.168.176.1/192.168.178.1/192.168.179.1/192.168.183.1/192.168.184.1/192.168.185.1\",\n\t\t\t\t\"MEMORY\": 32085,\n\t\t\t\t\"OSNAME\": \"Ubuntu 22.04\",\n\t\t\t\t\"OSTYPE\": \"Linux\",\n\t\t\t\t\"USERID\": \"ubuntu\",\n\t\t\t\t\"machine\": {\n\t\t\t\t\t\"uuid\": \"bd314f120ad3425b87719497b2011d07\"\n\t\t\t\t},\n\t\t\t\t\"WINOWNER\": null,\n\t\t\t\t\"OSVERSION\": \"22.04\",\n\t\t\t\t\"USERAGENT\": \"OCS-NG_unified_unix_agent_v2.8.0\",\n\t\t\t\t\"WINPRODID\": null,\n\t\t\t\t\"WORKGROUP\": \"citsmartx.oraclevcn.com\",\n\t\t\t\t\"PROCESSORN\": 1,\n\t\t\t\t\"PROCESSORS\": 0,\n\t\t\t\t\"PROCESSORT\": \"AMD EPYC 7J13 64-Core Processor\",\n\t\t\t\t\"USERDOMAIN\": null,\n\t\t\t\t\"WINPRODKEY\": null,\n\t\t\t\t\"DEFAULTGATEWAY\": \"10.0.20.1\"\n\t\t\t},\n\t\t\t\"memories\": [\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 1,\n\t\t\t\t\t\"TYPE\": \"RAM\",\n\t\t\t\t\t\"SPEED\": \"Unknown\",\n\t\t\t\t\t\"CAPTION\": \"DIMM 0\",\n\t\t\t\t\t\"PURPOSE\": \"\",\n\t\t\t\t\t\"CAPACITY\": 16384,\n\t\t\t\t\t\"NUMSLOTS\": 0,\n\t\t\t\t\t\"DESCRIPTION\": \"Other\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"SERIALNUMBER\": \"Not Specified\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2,\n\t\t\t\t\t\"TYPE\": \"RAM\",\n\t\t\t\t\t\"SPEED\": \"Unknown\",\n\t\t\t\t\t\"CAPTION\": \"DIMM 1\",\n\t\t\t\t\t\"PURPOSE\": \"\",\n\t\t\t\t\t\"CAPACITY\": 16384,\n\t\t\t\t\t\"NUMSLOTS\": 1,\n\t\t\t\t\t\"DESCRIPTION\": \"Other\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"SERIALNUMBER\": \"Not Specified\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"networks\": [\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 29,\n\t\t\t\t\t\"MTU\": \"9000\",\n\t\t\t\t\t\"TYPE\": \"ethernet\",\n\t\t\t\t\t\"SPEED\": \"-1 Mbps\",\n\t\t\t\t\t\"IPDHCP\": \"\",\n\t\t\t\t\t\"IPMASK\": \"255.255.255.0\",\n\t\t\t\t\t\"STATUS\": \"Up\",\n\t\t\t\t\t\"MACADDR\": \"02:00:17:00:37:dd\",\n\t\t\t\t\t\"TYPEMIB\": \"\",\n\t\t\t\t\t\"IPSUBNET\": \"10.0.20.0\",\n\t\t\t\t\t\"IPADDRESS\": \"10.0.20.158\",\n\t\t\t\t\t\"IPGATEWAY\": \"10.0.20.1\",\n\t\t\t\t\t\"VIRTUALDEV\": 0,\n\t\t\t\t\t\"DESCRIPTION\": \"ens3\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 30,\n\t\t\t\t\t\"MTU\": \"1500\",\n\t\t\t\t\t\"TYPE\": \"ethernet\",\n\t\t\t\t\t\"SPEED\": \"10 Gbps\",\n\t\t\t\t\t\"IPDHCP\": \"\",\n\t\t\t\t\t\"IPMASK\": \"255.255.255.0\",\n\t\t\t\t\t\"STATUS\": \"Up\",\n\t\t\t\t\t\"MACADDR\": \"02:42:c1:5d:15:19\",\n\t\t\t\t\t\"TYPEMIB\": \"\",\n\t\t\t\t\t\"IPSUBNET\": \"192.168.177.0\",\n\t\t\t\t\t\"IPADDRESS\": \"192.168.177.1\",\n\t\t\t\t\t\"IPGATEWAY\": \"10.0.20.1\",\n\t\t\t\t\t\"VIRTUALDEV\": 0,\n\t\t\t\t\t\"DESCRIPTION\": \"br-00e9d69134b1\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"drives\": [\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2096,\n\t\t\t\t\t\"FREE\": 70958,\n\t\t\t\t\t\"TYPE\": \"/\",\n\t\t\t\t\t\"TOTAL\": 79205,\n\t\t\t\t\t\"LETTER\": \"\",\n\t\t\t\t\t\"VOLUMN\": \"/dev/sda1\",\n\t\t\t\t\t\"NUMFILES\": 0,\n\t\t\t\t\t\"CREATEDATE\": \"2023-08-28\",\n\t\t\t\t\t\"FILESYSTEM\": \"ext4\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2097,\n\t\t\t\t\t\"FREE\": 98,\n\t\t\t\t\t\"TYPE\": \"/boot/efi\",\n\t\t\t\t\t\"TOTAL\": 104,\n\t\t\t\t\t\"LETTER\": \"\",\n\t\t\t\t\t\"VOLUMN\": \"/dev/sda15\",\n\t\t\t\t\t\"NUMFILES\": 0,\n\t\t\t\t\t\"CREATEDATE\": \"0000-00-00\",\n\t\t\t\t\t\"FILESYSTEM\": \"vfat\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2098,\n\t\t\t\t\t\"FREE\": 505734,\n\t\t\t\t\t\"TYPE\": \"/dados\",\n\t\t\t\t\t\"TOTAL\": 524028,\n\t\t\t\t\t\"LETTER\": \"\",\n\t\t\t\t\t\"VOLUMN\": \"/dev/mapper/vg00-dados\",\n\t\t\t\t\t\"NUMFILES\": 0,\n\t\t\t\t\t\"CREATEDATE\": \"0000-00-00\",\n\t\t\t\t\t\"FILESYSTEM\": \"xfs\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2140,\n\t\t\t\t\t\"FREE\": 0,\n\t\t\t\t\t\"TYPE\": \"/dev/sdb\",\n\t\t\t\t\t\"TOTAL\": 524284,\n\t\t\t\t\t\"LETTER\": \"\",\n\t\t\t\t\t\"VOLUMN\": \"VG: vg00, Fmt: lvm2, Attr: a--\",\n\t\t\t\t\t\"NUMFILES\": 0,\n\t\t\t\t\t\"CREATEDATE\": \"0000-00-00\",\n\t\t\t\t\t\"FILESYSTEM\": \"LVM PV\",\n\t\t\t\t\t\"HARDWARE_ID\": 1\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"bios\": [\n\t\t\t\t{\n\t\t\t\t\t\"MSN\": \"\",\n\t\t\t\t\t\"SSN\": \"Not Specified\",\n\t\t\t\t\t\"TYPE\": \"Other\",\n\t\t\t\t\t\"BDATE\": \"06/16/2021\",\n\t\t\t\t\t\"MMODEL\": \"\",\n\t\t\t\t\t\"SMODEL\": \"Standard PC (i440FX + PIIX, 1996)\",\n\t\t\t\t\t\"ASSETTAG\": \"OracleCloud.com\",\n\t\t\t\t\t\"BVERSION\": \"1.5.1\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"BMANUFACTURER\": \"EFI Development Kit II / OVMF\",\n\t\t\t\t\t\"MMANUFACTURER\": \"\",\n\t\t\t\t\t\"SMANUFACTURER\": \"QEMU\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"software\": [\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 1,\n\t\t\t\t\t\"GUID\": \"\",\n\t\t\t\t\t\"NAME\": \"adduser\",\n\t\t\t\t\t\"FOLDER\": \"\",\n\t\t\t\t\t\"SOURCE\": 0,\n\t\t\t\t\t\"VERSION\": \"3.118ubuntu5\",\n\t\t\t\t\t\"COMMENTS\": \"add and remove users and groups\",\n\t\t\t\t\t\"FILENAME\": \"\",\n\t\t\t\t\t\"FILESIZE\": 622592,\n\t\t\t\t\t\"LANGUAGE\": \"\",\n\t\t\t\t\t\"BITSWIDTH\": 0,\n\t\t\t\t\t\"PUBLISHER\": \"Unavailable\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"INSTALLDATE\": \"2023-07-28 22:11:36\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 2,\n\t\t\t\t\t\"GUID\": \"\",\n\t\t\t\t\t\"NAME\": \"amd64-microcode\",\n\t\t\t\t\t\"FOLDER\": \"\",\n\t\t\t\t\t\"SOURCE\": 0,\n\t\t\t\t\t\"VERSION\": \"3.20191218.1ubuntu2.2\",\n\t\t\t\t\t\"COMMENTS\": \"Processor microcode firmware for AMD CPUs\",\n\t\t\t\t\t\"FILENAME\": \"\",\n\t\t\t\t\t\"FILESIZE\": 123904,\n\t\t\t\t\t\"LANGUAGE\": \"\",\n\t\t\t\t\t\"BITSWIDTH\": 0,\n\t\t\t\t\t\"PUBLISHER\": \"Unavailable\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"INSTALLDATE\": \"2023-09-05 06:13:14\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"ID\": 3,\n\t\t\t\t\t\"GUID\": \"\",\n\t\t\t\t\t\"NAME\": \"apparmor\",\n\t\t\t\t\t\"FOLDER\": \"\",\n\t\t\t\t\t\"SOURCE\": 0,\n\t\t\t\t\t\"VERSION\": \"3.0.4-2ubuntu2.2\",\n\t\t\t\t\t\"COMMENTS\": \"user-space parser utility for AppArmor\",\n\t\t\t\t\t\"FILENAME\": \"\",\n\t\t\t\t\t\"FILESIZE\": 2736128,\n\t\t\t\t\t\"LANGUAGE\": \"\",\n\t\t\t\t\t\"BITSWIDTH\": 0,\n\t\t\t\t\t\"PUBLISHER\": \"https://apparmor.net/\",\n\t\t\t\t\t\"HARDWARE_ID\": 1,\n\t\t\t\t\t\"INSTALLDATE\": \"2023-07-28 22:12:25\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"meta\": {\n\t\t\"pagination\": {\n\t\t\t\"page\": 1,\n\t\t\t\"pages\": 1,\n\t\t\t\"page_size\": 20,\n\t\t\t\"count\": 1\n\t\t}\n\t},\n\t\"links\": {\n\t\t\"first\": \"https://inventory-server/inventory/api/sync/configuration-item/?detailed=1&name=simon-stj&page=1\",\n\t\t\"last\": \"https://inventory-server/inventory/api/sync/configuration-item/?detailed=1&name=simon-stj&page=1\",\n\t\t\"next\": null,\n\t\t\"prev\": null\n\t}\n}",
        "language": "200"
      }
    ],
    "selectedLanguageId": "KuHjtRecM78pjppiZCzft"
  },
  "examples": {
    "languages": [
      {
        "id": "xHtAzFqX3D1YHN4jAt45_",
        "language": "curl",
        "code": "curl --location --request GET 'https://inventory-server/inventory/api/sync/configuration-items/' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'\n--header 'X-Api-Key: <api-key>'",
        "customLabel": ""
      },
      {
        "id": "MhNmfLvNuxqLqwyDteB5A",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://inventory-server/inventory/api/sync/configuration-items/',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json',\n      'X-Api-Key': '<api-key>'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "qnBWXPAkKpmhjN9JdLIKI",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\nmyHeaders.append(\"X-Api-Key\", \"<api-key>\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://inventory-server/inventory/api/sync/configuration-items/\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "olrrz9PtfLbBGfatGJxtf",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://inventory-server/inventory/api/sync/configuration-items\"\n\npayload={}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "xHtAzFqX3D1YHN4jAt45_"
  },
  "responses": [
    {
      "statusCode": 200,
      "description": "Cake successfully retrieved.",
      "jsonExample": "{\n    \"name\": \"Cake's name\",\n    \"recipe\": \"Cake's recipe name\",\n    \"cake\": \"Binary cake\"\n}"
    },
    {
      "statusCode": 404,
      "description": "Could not find a cake matching this query.",
      "jsonExample": "{\n    \"message\": \"Ain't no cake like that.\"\n}"
    }
  ],
  "description": "Lista computadores a partir de um offset.",
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  }
}
```
:::

**Listagem de items de configuração modificados recentemente**
Os parâmetros são os mesmos, contudo é obrigatorio preencher um dos campos de data da mudança (from/seconds).

**Exemplo:&#x20;***(atualizados na ultima hora)*
https\://inventory-server/inventory/api/sync/inventory/configuration-item/updated/?**seconds=3600**

**Resposta:**

```json
{
	"results": [
		{
			"ci_id": "CI0000001",
			"name": "simon-stj",
			"type_name": "Other",
			"os": "Ubuntu 22.04",
			"os_type": "Linux",
			"description": null,
			"created_at": "2023-10-17T22:27:23.627547Z",
			"updated_at": "2023-10-20T20:00:23.627000Z"
		}
	],
	"meta": {
		"pagination": {
			"page": 1,
			"pages": 1,
			"page_size": 20,
			"count": 1
		}
	},
	"links": {
		"first": "http://localhost:8000/api/sync/inventory/configuration-item/updated/?page=1&seconds=3600",
		"last": "http://localhost:8000/api/sync/inventory/configuration-item/updated/?page=1&seconds=3600",
		"next": null,
		"prev": null
	}
}
```

**Detalhamento de item de configuração modificados recentemente**
Os parâmetros são os mesmos, contudo é obrigatorio preencher um dos campos de data da mudança (from/seconds)
