Retrieve all factories
get
/productionMonitoring/clientapi/v2/factories
This operation returns information about all the factories that are filtered by a query. This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Request
Query Parameters
-
expand(optional): string
The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
-
fields(optional): string
The comma-separated list of fields to be shown in response. By default all response object fields will be present.
-
limit(optional): integer
The maximum number of entries to return to the end user.
-
offset(optional): integer
The number that the first record of results is starting from.
-
orderBy(optional): string
The ordering criteria for the returned factory list.
-
q(optional): string
The query to filter factories on the server. (For more information on mongoDB query parameters refer to Using mongoDB Query Syntax.)
-
since(optional): integer
The starting point of the desired time interval, in milliseconds. The default is 0.
-
totalResults(optional): boolean
The total number of results suiting the request.
-
until(optional): integer
The finishing point of the desired time interval, in milliseconds. The default is 0.
Header Parameters
-
X-ORACLE-IOT-ORG: string
This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : Factory_receive_list
Type:
Show Source
object
-
count:
integer(int32)
-
hasMore:
boolean
-
items:
array items
-
limit:
integer(int32)
-
links:
array links
The set of API navigation links.
-
offset:
integer(int32)
Nested Schema : items
Type:
Show Source
object
-
address:
string
The street address of the factory.
-
code:
string
The unique code of the factory.
-
description:
string
The description of the factory.
-
extId:
string
The external identifier representing the external factory imported
-
factoryManager:
object FactoryManager_receive
-
floorPlans:
array floorPlans
The list of floor plans for the factory.
-
geoLocation:
string
The geographic location of the factory specified as {latitude},{longitude}.
-
id:
string
The unique identifier of the factory.
-
integrationId:
string
The integration identifier that imported the factory
-
iotEnabled:
boolean
The field value indicates the factory is available for working in the integration with Manufacturing Cloud
-
lastModifiedBy:
string
The name of the user who last modified the definition of the factory.
-
lastModifiedTime:
integer
The time when the factory definition was last updated as milliseconds since the epoch.
-
lastModifiedTimeAsString:
integer
The time when the factory definition was last updated as an ISO-8601 formatted string.
-
metrics:
object metrics
Set of factory metrics
-
name:
string
The unique name of the factory.
-
productionLines:
array productionLines
The list of identifiers of production lines that are part of this factory.
-
registeredBy:
string
The name of the user who registered this factory.
-
registrationTime:
integer
The time when the factory was registered with the app as an epoch milliseconds.
-
registrationTimeAsString:
integer
The time when the factory was registered with the app as an ISO-8601 formatted string.
Nested Schema : FactoryManager_receive
Type:
Show Source
object
-
email:
string
The email address of the factory manager.
-
name:
string
The name of the factory manager.
-
phone:
string
The phone number of the factory manager.
Nested Schema : metrics
Type:
object
Set of factory metrics
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : productionLines
Type:
array
The list of identifiers of production lines that are part of this factory.
Show Source
Nested Schema : FactoryFloorPlan_receive
Type:
Show Source
object
-
externalId:
string
Property description was not set
-
id:
string
The identifier created by Oracle IoT Cloud Service for the factory floor plan.
-
image:
object image
The reference ID for the factory floor plan image.
-
name:
string
The unique name of the factory floor plan.
-
organizationId:
string
Property description was not set
-
referencePoints:
object FloorPlanReferencePoints_receive
Nested Schema : image
Type:
object
The reference ID for the factory floor plan image.
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : FloorPlanReferencePoints_receive
Type:
Show Source
object
-
imageP1:
string
Coordinates of the first point on image.
-
imageP2:
string
Coordinates of the second point on image
-
mapP1:
string
Geographic coordinates of the first point
-
mapP2:
string
Geographic coordinates of the second point
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
401 Response
Unauthorized. The request requires user authentication.
403 Response
Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/productionMonitoring/clientapi/v2/factories
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"count":2,
"hasMore":false,
"items":[
{
"address":"The street address of the factory.",
"code":"The unique code of the factory.",
"description":"The description of the factory.",
"extId":"3f46cb720e0-6b26",
"factoryManager":{
"email":"The email address of the factory manager.",
"name":"The name of the factory manager.",
"phone":"The phone number of the factory manager."
},
"floorPlans":[
{
"externalId":"1253766f7c40-2cc3",
"id":"3ce4d67465d-4081",
"image":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"name":"The unique name of the factory floor plan.",
"organizationId":"5943634521d-16f0",
"referencePoints":{
"imageP1":"Coordinates of the first point on image.",
"imageP2":"Coordinates of the second point on image",
"mapP1":"Geographic coordinates of the first point",
"mapP2":"Geographic coordinates of the second point"
}
}
],
"geoLocation":"The geographic location of the factory specified as {latitude},{longitude}.",
"id":"1ff220025148-3a2c",
"integrationId":"2530fa74ed6-2639",
"iotEnabled":false,
"lastModifiedBy":"The name of the user who last modified the definition of the factory.",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"metrics":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"name":"The unique name of the factory.",
"productionLines":[
"productionLines_1",
"productionLines_2",
"productionLines_3"
],
"registeredBy":"The name of the user who registered this factory.",
"registrationTime":1469184297746,
"registrationTimeAsString":1469184297746
},
{
"address":"The street address of the factory.",
"code":"The unique code of the factory.",
"description":"The description of the factory.",
"extId":"6a32d1f764c-3c48",
"factoryManager":{
"email":"The email address of the factory manager.",
"name":"The name of the factory manager.",
"phone":"The phone number of the factory manager."
},
"floorPlans":[
{
"externalId":"584549a77657-73cc",
"id":"3229210f187-11d0",
"image":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"name":"The unique name of the factory floor plan.",
"organizationId":"3ff466d043f3-1c5a",
"referencePoints":{
"imageP1":"Coordinates of the first point on image.",
"imageP2":"Coordinates of the second point on image",
"mapP1":"Geographic coordinates of the first point",
"mapP2":"Geographic coordinates of the second point"
}
}
],
"geoLocation":"The geographic location of the factory specified as {latitude},{longitude}.",
"id":"758956ea833-427b",
"integrationId":"6d266cffd86-4a89",
"iotEnabled":false,
"lastModifiedBy":"The name of the user who last modified the definition of the factory.",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"metrics":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"name":"The unique name of the factory.",
"productionLines":[
"productionLines_1",
"productionLines_2",
"productionLines_3"
],
"registeredBy":"The name of the user who registered this factory.",
"registrationTime":1469184297746,
"registrationTimeAsString":1469184297746
}
],
"limit":10,
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
],
"offset":0
}
Complete cURL Example
The following example shows a complete cURL command that you can use to perform the described operation:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/productionMonitoring/clientapi/v2/factories
Note that in the request,
https://iotserver
will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is
https://myinstance-myidentitydomain.iot.us.oraclecloud.com
and the default port is 443.