Documentation

Mistake on this page? Email us

Manufacturing Statistics API

The Manufacturing Statistics API enables secure factories to retrieve manufacturing statistics. This API is only available for authorized accounts.
Please contact us to enable this API for your account.
Version: v3
Host: https://api.us-east-1.mbedcloud.com

Endpoints

FactoryManufacturingStatistics

get /v3/manufacturing/statistics/report
Retrieve provisioning statistics for devices in your factories. Show more Show less

Get manufacturing statistics report. Example:

curl -X GET https://api.us-east-1.mbedcloud.com/v3/manufacturing/statistics-report?startDate=2019-10-20&endDate=2019-10-22 \
-H 'authorization: <valid access token>' \
Query parameters
start (required)
Query Parameter — The start date of the period on which the report is produced.
format: date-time
end (optional)
Query Parameter — The end date of the period on which the report is produced. Default is the current date-time.
format: date-time
Return type
Example data
Content-Type: application/json
{
  "data" : [ {
    "avg_provisioning_time_sec" : 2.5,
    "factory_id" : 164,
    "max_provisioning_time_sec" : 3.1,
    "workstation" : "ws_1",
    "factory_name" : "factory 1",
    "min_provisioning_time_sec" : 2.2,
    "id" : "01612df56f3b0a580a010fc700000000",
    "device_count" : 103
  } ],
  "total_count" : 100,
  "limit" : 50,
  "start" : "2020-03-29T07:30:00.000",
  "end" : "2020-03-30T07:30:00.000",
  "has_more" : false,
  "after" : "01631667477600000000000100100374",
  "order" : "DESC",
  "object" : "list"
}
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json
Responses
status description schema
200 OK. StatisticsReportListResponse
204 No content.
400 Validation error. ErrorResponse
401 Unauthorized. ErrorResponse
403 Forbidden. ErrorResponse

Models

ErrorResponse

object
String

Entity name, always error.

Enum:
error
code
Integer ($int32)

HTTP response code

type
String

Error type used to categorise the error.

message
String

A human readable informative explanation

request_id
String

ID of the request.

fields (optional)
array[ErrorResponse_fields]

Request fields which failed validation.

ErrorResponse_fields

name
String

Name of the field which caused the error.

message
String

Message describing the error condition.

StatisticsReportListResponse

data (optional)
array[StatisticsReportResponse]

List of manufacturing statistics.

total_count (optional)
Integer ($integer)

order (optional)
String

Record order based on record identifier.

object (optional)
String

The API object type. The object type of this API is "list".

limit (optional)
Integer

The number of results to return (2-1000). Values outside of this range are set to the closest limit.

has_more (optional)
Boolean

Indicates whether additional results are available.

after (optional)
String

An offset token for the current page.

end (optional)
Date ($date-time)

start (optional)
Date ($date-time)

StatisticsReportResponse

id (optional)
UUID ($uuid)

Unique row identifier.

pattern:

factory_id (optional)
Integer

Factory ID.

factory_name (optional)
String

Factory name.

workstation (optional)
String

Workstation.

avg_provisioning_time_sec (optional)
BigDecimal

Average provisioning time in seconds.

max_provisioning_time_sec (optional)
BigDecimal

Maximum provisioning time in seconds.

min_provisioning_time_sec (optional)
BigDecimal

Minimum provisioning time in seconds.

device_count (optional)
Integer

Number of manufactured devices.