Get deinstalled inventories
/rest/ofscCore/v1/activities/{activityId}/deinstalledInventories
Request
-
activityId(required): integer
The unique identifier of the activity in Oracle Field Service.
-
filter: string
Boolean filter expression used to filter inventory items returned by the API.
Supported fields:
inventoryType,serialNumber,quantitySupported operators:
<,>,<=,>=,==,!=,AND,OR,NOTRules:
- String values must use single quotes.
- Numeric values must not be quoted.
<,>,<=, and>=are supported only forquantity.inventoryTypeandserialNumbersupport only==and!=.- Unsupported fields return
400 Bad Request. - Filtering is applied before pagination.
Examples:
quantity>=10,inventoryType=='MODEM',quantity>5 AND inventoryType!='CABLEBOX' -
limit: integer
The number of items to be returned in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is greater than 100, zero, or if no value is specified, then it defaults to 100.
-
offset: integer
The record number from which the retrieval starts. The default value is zero. If no value is specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
Response
- application/json
200 Response
objectDeinstalled Inventoriesobject-
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.
objectInventory-
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
object-
detail(required):
string
The detailed description of this error.
-
status(required):
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 deinstalled inventories of an activity by submitting a GET request on the REST resource using cURL
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -H 'Accept: application/json' 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225372/deinstalledInventories'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Wed, 31 Aug 2016 13:38:54 GMT Content-Type: application/json; charset=utf-8 Connection: close Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, PATCH Access-Control-Allow-Headers: DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"totalResults": 1,
"limit": 10,
"offset": 0,
"items": [
{
"inventoryId": 21258547,
"inventoryType": "NORMAL",
"quantity": 1,
"resourceId": "33011",
"activityId": 4225371
}
],
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/4225372/deinstalledInventories"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/activities"
}
]
}