Skip to navigation

Create multiple services

View as Markdown

Create multiple services on outbound interfaces in one simulation. Every service in the request is created, or none are. At most 100 services may be created per request. The same rules as POST /api/v3/simulations/nodes/interfaces/services/ apply: services can only be added to outbound interfaces without a connection, and there can be at most 252 services on any individual interface.

Required scope: Simulation Edit (roles: Air Org Administrator, Air User)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

idstringOptionalformat: "uuid"
interfacestringOptionalformat: "uuid"
namestringOptional
nodestringOptionalformat: "uuid"
node_portintegerOptional
orderingstringOptional
Which field to use when ordering the results.
searchstringOptional
A search term.
service_typeenumOptional

The type of service exposed (e.g. SSH or HTTP).

  • SSH - SSH
  • HTTPS - HTTPS
  • HTTP - HTTP
  • OTHER - Other
Allowed values:
simulationstringOptionalformat: "uuid"
teleport_access_portintegerOptional
worker_fqdnstringOptional
worker_portintegerOptional

Request

This endpoint expects an object.
serviceslist of objectsRequired
Services to create. Every interface must belong to the same simulation. At most 100 services may be created per request.

Response

idstringRead-onlyformat: "uuid"
createddatetimeRead-only
modifieddatetimeRead-only
node_portinteger1-65535

The port number associated with the service within the allowable range for an IP port (UINT16).

worker_portinteger or nullRead-only
The port exposed by the worker.
worker_fqdnstring or nullRead-only
The FQDN of the worker machine this service is running on. When the associated node is not active, this will be null.
interfacestringformat: "uuid"
namestringOptional<=256 characters
The name of the service.
service_typeenumOptionalDefaults to OTHER

The type of service exposed (e.g. SSH or HTTP).

  • SSH - SSH
  • HTTPS - HTTPS
  • HTTP - HTTP
  • OTHER - Other
Allowed values:
teleport_access_portinteger or nullOptional1024-65535
The port that reaches this service over Teleport. Can only be set when the simulation's organization is allowed to use Teleport. When omitted, Air assigns one if Teleport is enabled on the simulation, and otherwise when Teleport is turned on.

Errors

400
Bad Request Error
403
Forbidden Error
500
Internal Server Error