Επεξεργασία

Κοινή χρήση μέσω


Create a new product

Use this method in the Microsoft Hardware API to create a new hardware product.

Prerequisites

If you have not done so already, complete all the prerequisites for the Microsoft Hardware APIs before trying to use any of these methods.

Request

This method has the following syntax. See the following sections for usage examples and descriptions of the header and request body.

Method Request URI
POST https://manage.devcenter.microsoft.com/v2.0/my/hardware/products

Request header

Header Type Description
Authorization string Required. The Microsoft Entra ID access token in the form Bearer <token>.
accept string Optional. Specifies the type of content. Allowed value is “application/json”

Request parameters

Do not provide request parameters for this method.

Request body

The following example demonstrates the JSON request body for creating a new product. For more details about the values in the request body, see the table below the json.

{
  "productName": "Test_Network_Product2-R",
  "testHarness": "Attestation",
  "announcementDate": "2018-01-01T00:00:00",
  "deviceMetadataIds": [],
  "firmwareVersion": "980",
  "deviceType": "external",
  "isTestSign": false,
  "isFlightSign": false,  
  "marketingNames": [],
  "selectedProductTypes": {
    "windows_v100_RS3": "Unclassified"
  },
  "requestedSignatures": [
    "WINDOWS_v100_RS3_FULL",
    "WINDOWS_v100_X64_RS3_FULL",
    "WINDOWS_VISTA"
  ],
  "additionalAttributes": {}
}

For details about the fields in the request, refer to Product resource.

Request examples

The following example demonstrates how to create a new product.

POST https://manage.devcenter.microsoft.com/v2.0/my/hardware/products HTTP/1.1
Authorization: Bearer <your access token>

Response

The following example demonstrates the JSON response body returned by a successful request for creating a product. For more details about the values in the response body, see the following section.

{
  "id": 14631253285588838,
  "sharedProductId": 1152921504607010608,
  "links": [
    {
      "href": "https:// manage.devcenter.microsoft.com/api/v1/hardware/products/14631253285588838",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "https:// manage.devcenter.microsoft.com/api/v1/hardware/products/14631253285588838/submissions",
      "rel": "get_submissions",
      "method": "GET"
    }
  ],
  "isCommitted": false,
  "isExtensionInf": false,
  "announcementDate": "2018-01-01T00:00:00",
  "deviceMetadataIds": [],
  "firmwareVersion": "980",
  "deviceType": "external",
  "isTestSign": false,
  "isFlightSign": false,  
  "marketingNames": [],
  "productName": "VST_apdevtest1",
  "selectedProductTypes": {
    "windows_v100_RS3": "Unclassified"
  },
  "requestedSignatures": [
    "WINDOWS_v100_RS3_FULL",
    "WINDOWS_v100_X64_RS3_FULL",
    "WINDOWS_VISTA"
  ],
  "additionalAttributes": {},
  "testHarness": "attestation"
}

Response body

Refer to Product resource for more details

Error codes

For more info, see Error codes.

See also

hardware dashboard API samples (GitHub)