Method: admin.directory.v1.customers.chrome.printers.batchCreatePrinters
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างเครื่องพิมพ์ภายใต้หน่วยขององค์กรที่ระบุ
คำขอ HTTP
POST https://admin.googleapis.com/admin/directory/v1/{parent=customers/*}/chrome/printers:batchCreatePrinters
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ ชื่อลูกค้า รูปแบบ: customers/{customer_id}
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
requests[] |
object (CreatePrinterRequest )
รายการเครื่องพิมพ์ที่จะสร้าง สูงสุด 50 รายการต่อครั้ง
|
เนื้อหาการตอบกลับ
การตอบกลับสําหรับการเพิ่มเครื่องพิมพ์ใหม่ทีละหลายเครื่อง
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"printers": [
{
object (Printer )
}
],
"failures": [
{
object (FailureInfo )
}
]
} |
ช่อง |
printers[] |
object (Printer )
รายการเครื่องพิมพ์ที่สร้างสำเร็จพร้อมรหัส
|
failures[] |
object (FailureInfo )
รายการการสร้างที่ไม่สําเร็จ ระบบจะไม่ป้อนรหัสเครื่องพิมพ์เนื่องจากไม่ได้สร้างเครื่องพิมพ์
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/admin.chrome.printers
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
CreatePrinterRequest
คำขอเพิ่มเครื่องพิมพ์ใหม่
การแสดง JSON |
{
"parent": string,
"printer": {
object (Printer )
}
} |
ช่อง |
parent |
string
ต้องระบุ ชื่อลูกค้า รูปแบบ: customers/{customer_id}
|
printer |
object (Printer )
ต้องระบุ เครื่องพิมพ์ที่จะสร้าง หากต้องการวางเครื่องพิมพ์ไว้ใน OU ที่เฉพาะเจาะจง ให้ป้อนข้อมูลในไฟล์ printer.org_unit_id มิเช่นนั้นระบบจะวางเครื่องพิมพ์ไว้ใน OU รูท
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-24 UTC
[null,null,["อัปเดตล่าสุด 2025-07-24 UTC"],[],[],null,["# Method: admin.directory.v1.customers.chrome.printers.batchCreatePrinters\n\nCreates printers under given Organization Unit.\n\n### HTTP request\n\n`POST https://admin.googleapis.com/admin/directory/v1/{parent=customers/*}/chrome/printers:batchCreatePrinters`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the customer. Format: customers/{customer_id} |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requests\": [ { object (/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers/batchCreatePrinters#CreatePrinterRequest) } ] } ``` |\n\n| Fields ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requests[]` | `object (`[CreatePrinterRequest](/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers/batchCreatePrinters#CreatePrinterRequest)`)` A list of Printers to be created. Max 50 at a time. |\n\n### Response body\n\nResponse for adding new printers in batch.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"printers\": [ { object (/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers#Printer) } ], \"failures\": [ { object (/workspace/admin/chrome-printer/reference/rest/v1/FailureInfo) } ] } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `printers[]` | `object (`[Printer](/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers#Printer)`)` A list of successfully created printers with their IDs populated. |\n| `failures[]` | `object (`[FailureInfo](/workspace/admin/chrome-printer/reference/rest/v1/FailureInfo)`)` A list of create failures. Printer IDs are not populated, as printer were not created. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.chrome.printers`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nCreatePrinterRequest\n--------------------\n\nRequest for adding a new printer.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"parent\": string, \"printer\": { object (/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers#Printer) } } ``` |\n\n| Fields ||\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the customer. Format: customers/{customer_id} |\n| `printer` | `object (`[Printer](/workspace/admin/chrome-printer/reference/rest/v1/admin.directory.v1.customers.chrome.printers#Printer)`)` Required. A printer to create. If you want to place the printer under particular OU then populate printer.org_unit_id filed. Otherwise the printer will be placed under root OU. |"]]