[POST] Create print queue computers
This endpoint creates print queue computers.
Call
POST /v1/computers
Header
Parameter | Description | Type | Mandatory |
---|---|---|---|
| Name of the provider. For this information, see the documentation: Portal menus. |
| Yes |
|
| Yes |
Body
Parameter | Description | Type | Mandatory |
---|---|---|---|
| Name of the customer, as registered in the NDD Orbix portal. |
| Yes |
| List of computers. |
| Yes |
| Computer name. Do not use accents, symbols (except hyphens) or spaces. |
| Yes |
Example request
Create three computers:
curl -L -X POST 'https://developer.nddorbix.com/printqueue-external-integration-api/v1/computers' \
-H 'Tenant: {tenant}' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
"Client": "ABC",
"Computers":
[
{
"Hostname": "PC-001"
},
{
"Hostname": "LAPTOP002"
},
{
"Hostname": "SERVER003"
}
]
}'
In the same request, you can create up to 4,500 computers.
To create more than 4,500 computers, make more than one request.
Example response
The response code 201 indicates that:
all computers have been successfully created and will return the following JSON:
[]
or
there was a partial failure to create some computers, and will return the reason for the failure in JSON:
[
{
"hostName": "PC@001",
"errorMessage": "The hostname cannot contain special characters."
},
{
"hostName": "SERVER#003",
"errorMessage": "The hostname cannot contain special characters."
}
]
The code 400 response indicates that there was a failure to create all computers and will return the following JSON:
{
"errors": {
"3400": [
"All computers are invalid."
]
},
"title": "BadRequest",
"status": 400,
"detail": "BusinessException",
"instance": "/v1/computers"
}