Operator API

URnetwork API: Device

Version 1.0.0 · 201 operations across 14 groups.OpenAPI spec ↗

URnetwork implements the UR protocol operator spec in full. UR protocol ↗

Device

14 operations

POST/device/add

Bearer authdeviceAdd

Add a device, which can either be owned by the network or shared with the network. The code provided can be either adoption code or a share code. Once a code is added, the device becomes an associated device until confirmation. If the device is a shared device, it will remain an associated device after confirmation.

show schema
code
string

share code or adopt code

2 statuses · show schema
200
code_type
string
enum: share, adopt
code
string
device_name
string

Name of the device shared by the owner

associated_network_name
string

The name of the source network. Only for share codes.

client_id
string

udid. Only for share codes.

duration_minutes
number
error
object
message
string
403
No body

POST/device/create-share-code

Bearer authdeviceCreateShareCode

Creates a code to share a device.

show schema
client_id
string

udid

device_name
string

Name of the device that will be shared to the guest

2 statuses · show schema
200
share_code
string
error
object
message
string
403
No body

GET/device/share-code/{code}/qr.png

Bearer authdeviceShareCodeQr

A QR code that maps to a URL to add the shared device. Send it to someone to scan to add the device.

code(path)
string

Share code

required
2 statuses · show schema
200
string (binary)
403
No body

POST/device/share-status

Bearer authdeviceShareStatus

The status of the shared device. The status can be one of:

  • unassociated
  • associated pending confirmation
  • associated
show schema
share_code
string
2 statuses · show schema
200
pending
boolean
associated_network_name
string
error
object
message
string
403
No body

POST/device/confirm-share

Bearer authdeviceConfirmShare

Confirm the share of a device. This must be called from the side that initiates the share.

show schema
share_code
string
associated_network_name
string
2 statuses · show schema
200
associated_network_name
string
error
object
message
string
403
No body

POST/device/create-adopt-code

PublicdeviceCreateAdoptCode

Creates a code to adopt a device. The adopt code is valid for a limited time.

show schema
device_name
string

Name of the device that will be shared to the adopter

device_spec
string
1 status · show schema
200
adopt_code
string
adopt_secret
string

keep this secret locally to use with confirm

duration_minutes
number
error
object
message
string

GET/device/adopt-code/{code}/qr.png

PublicdeviceAdoptCodeQr

A QR code that maps to a URL to adopt the device. Send it to someone to scan to adopt the device.

code(path)
string

Adopt code

required
1 status · show schema
200
string (binary)

POST/device/adopt-status

PublicdeviceAdoptStatus

The status of the adopt-code device. The status can be one of:

  • unassociated
  • associated pending confirmation
  • associated
show schema
adopt_code
string
1 status · show schema
200
pending
boolean
associated_network_name
string
error
object
message
string

POST/device/confirm-adopt

PublicdeviceConfirmAdopt

Confirm the adoption of a device. This must be called from the side that initiates the adoption.

show schema
adopt_code
string
adopt_secret
string
associated_network_name
string
1 status · show schema
200
by_client_jwt
string

client auth

error
object
message
string

POST/device/remove-adopt-code

PublicremoveAdoptCode

Remove an adopt code. This must be called from the side that initiates the adoption.

show schema
adopt_code
string
adopt_secret
string
1 status · show schema
200
error
object
message
string

GET/device/associations

Bearer authdeviceAssociations

The devices associated with the caller network. Associated devices are:

  • pending adoption devices
  • incoming shared devices (not owned by the caller network)
  • outgoing shared devices (owned by the caller network)
2 statuses · show schema
200
pending_adoption_devices
array<DeviceAssociation>

devices pending adoption that need to be confirmed by the offerer

array
pending
boolean

The association still needs confirming. Always true on pending_adoption_devices; on the two shared lists it is the negation of the stored confirmation.

code
string

The adopt code or share code the association is keyed by.

device_name
string

Name of the device

client_id
string

udid of the shared device. Set on incoming_shared_devices and outgoing_shared_devices; a pending adoption has no client yet, so it is omitted there.

network_name
string

The other network in the share -- the owner for an incoming share, the guest for an outgoing one. Set on the two shared lists, and omitted there too while the far side is not yet named. Never set on pending_adoption_devices.

duration_minutes
number

Minutes until the adopt code expires, counted from the moment the request was served. Set on pending_adoption_devices only; a share does not expire, so it is omitted on the two shared lists.

incoming_shared_devices
array<DeviceAssociation>

devices owned by another network shared to the caller network

array
pending
boolean

The association still needs confirming. Always true on pending_adoption_devices; on the two shared lists it is the negation of the stored confirmation.

code
string

The adopt code or share code the association is keyed by.

device_name
string

Name of the device

client_id
string

udid of the shared device. Set on incoming_shared_devices and outgoing_shared_devices; a pending adoption has no client yet, so it is omitted there.

network_name
string

The other network in the share -- the owner for an incoming share, the guest for an outgoing one. Set on the two shared lists, and omitted there too while the far side is not yet named. Never set on pending_adoption_devices.

duration_minutes
number

Minutes until the adopt code expires, counted from the moment the request was served. Set on pending_adoption_devices only; a share does not expire, so it is omitted on the two shared lists.

outgoing_shared_devices
array<DeviceAssociation>

devices owned by the caller network shared to another network

array
pending
boolean

The association still needs confirming. Always true on pending_adoption_devices; on the two shared lists it is the negation of the stored confirmation.

code
string

The adopt code or share code the association is keyed by.

device_name
string

Name of the device

client_id
string

udid of the shared device. Set on incoming_shared_devices and outgoing_shared_devices; a pending adoption has no client yet, so it is omitted there.

network_name
string

The other network in the share -- the owner for an incoming share, the guest for an outgoing one. Set on the two shared lists, and omitted there too while the far side is not yet named. Never set on pending_adoption_devices.

duration_minutes
number

Minutes until the adopt code expires, counted from the moment the request was served. Set on pending_adoption_devices only; a share does not expire, so it is omitted on the two shared lists.

403
No body

POST/device/remove-association

Bearer authdeviceRemoveAssociation

Remove a device association. The association can be any of:

  • pending adoption device
  • incoming shared device (not owned by the caller network)
  • outgoing shared device (owned by the caller network)
show schema
code
string
2 statuses · show schema
200
error
object
message
string
403
No body

POST/device/set-association-name

Bearer authdeviceSetAssociationName

Set the name of the association. To set the name of devices owned by the network, use /device/set-name.

show schema
code
string
device_name
string

Name of the device

2 statuses · show schema
200
error
object
message
string
403
No body

POST/device/set-name

Bearer authnetworkSetDeviceName

Sets the name of a device owned by the network. To set the name of devices shared with the network, use /device/set-association-name.

show schema
device_id
string

udid

device_name
string
1 status · show schema
200
error
object
message
string