API: Common fields

From Yombo
Jump to: navigation, search

Some fields are commonly used throughout the Yombo API and are explained here.

Machine Label

The machine_label is non-changeable and is used to reference an item easily; compared to used it's ID. The machine_label is a generic form of the label field and only allows lower case lettering.

Public field

Many resources have a public field and is used to note if the item is private (0), public pending (1), or public (2).

The purpose of this is to allow users to create their own modules, commands, device types, etc, but if at a later time they wish for other to make use of am item, they can allow other users to.

Value Description
0 Private items can only be seen and used by the user that created it. The user can manage this item.
1 User wishes to make the item public, but it hasn’t been reviewed by Yombo staff and is treated like it’s private. User can still manage this item.
2 Public. Anyone can use this item. This item is managed by Yombo staff, but original owner is still tracked.

Once an item has gone public, it usually cannot be made private again. Only Yombo staff can make the change between 1 and 2.

Status field

Many resources have a status field and is used to note if the item is disabled, enabled, or deleted. Regardless of the status field, they are returned to the gateway when requesting configurations.

Value Description
0 Item is disabled. Cannot be used by the gateway.
1 Item is enabled.
2 Item is deleted.

Deleted items will be removed from the system after enough time has elapsed to propagate through the Yombo infrastructure, including gateways.

This page was last edited on 15 September 2018.