Skip to main content
Skip table of contents

[POST] Create print queue computers

This endpoint creates print queue computers.

Call

POST /v1/computers

Header

Parameter

Description

Type

Mandatory

Tenant

Name of the provider.

For this information, see the documentation: Portal menus.

string

Yes

Authorization

Authentication token obtained.

string

Yes

Body

Parameter

Description

Type

Mandatory

Client

Name of the customer, as registered in the NDD Orbix portal.

string

Yes

Computers

List of computers.

array

Yes

Hostname

Computer name.

Do not use accents, symbols (except hyphens) or spaces.

string

Yes

Example request

Create three computers:

CODE
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:

CODE
[]

or

  • there was a partial failure to create some computers, and will return the reason for the failure in JSON:

CODE
[
    {
        "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:

CODE
{
    "errors": {
        "3400": [
            "All computers are invalid."
        ]
    },
    "title": "BadRequest",
    "status": 400,
    "detail": "BusinessException",
    "instance": "/v1/computers"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.