Get an inventory
get
/rest/ofscCore/v1/inventories/{inventoryId}
This operation retrieves the inventory details of the specified inventory.
Request
Path Parameters
-
inventoryId(required): integer
The unique identifier of the inventory in Oracle Field Service.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : inventory
Type:
Show Source
object-
status:
string
Title:
StatusAllowed Values:[ "customer", "resource", "installed", "deinstalled" ]The status of the specified inventory. For example, if 'customer' is returned, then it indicates that the inventory is at the customer's site.
Match All
Show Source
Nested Schema : Inventory
Type:
objectTitle:
InventoryThe inventory that is installed or deinstalled at the customer's site during an activity.
Show Source
-
activityId:
integer
Title:
Activity IDThe activity ID to which the inventory is assigned.If the status for the inventory is set to resource, then the activity ID is not returned.
-
exchangedInventoryId:
integer
Title:
Exchanged Inventory IDThe inventory ID that is returned when the resource exchanges an inventory with another resource. -
inventoryId:
integer
Title:
Inventory IDThe unique identifier of the inventory in Oracle Field Service. -
inventoryType:
string
Title:
Inventory TypeThe inventory type specified in the request. -
quantity:
number
Title:
QuantityThe quantity of inventory specified in the request. -
resourceId:
string
Title:
Resource IDThe resource ID to which the inventory is assigned or the resource ID to which the activity (that has the inventory assigned to it) is assigned. -
serialNumber:
string
Title:
Serial NumberThe serial number specified in the request.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to get inventory by submitting a GET request on the REST resource:
Example of Request Header
The following shows an example of the request header.
GET /rest/ofscCore/v1/inventories/21258546 HTTP/1.0 Authorization: Basic c29hcEB5YW1hdG86MQ== Host: etadev1f Accept: */*
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 Ok Server: nginx/1.6.2 Date: Fri, 24 Jul 2015 08:35:48 GMT ContentType: application/json; charset=utf8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"inventoryId": 21258546,
"status": "provider",
"inventoryType": "NORMAL",
"quantity": 1,
"resourceId": "44001",
"links": [
{
"rel": "canonical",
"href": "https://etadev1f/rest/ofscCore/v1/inventories/21258546"
},
{
"rel": "describedby",
"href": "https://etadev1f/rest/ofscCore/v1/metadatacatalog/inventories"
}
]
}>