Sites API

List sites

List all sites for an account:

GET /sites

Response

Status: 200 OK
[
  {
    "name": "Widget Data Center",
    "created_at": "2016-03-14T03:09:52-06:00",
    "sourceID": null,
    "updated_at": "2016-03-14T03:09:52-06:00",
    "id": 13
  },
  {
    "name": "IT Training Facility",
    "created_at": "2016-03-14T09:10:17-06:00",
    "sourceID": null,
    "updated_at": "2014-01-18T11:29:02-06:00",
    "id": 29,
    "disabled": true
  },
  "..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of sites.

Predefined Filters

The following predefined filters are available:

Collection Fields

By default the following fields will appear in collections of sites:

id sourceID name created_at updated_at

Obtain a different set of fields using the ?fields= parameter.

Filtering

Filtering is available for the following fields:

id source sourceID name disabled created_at updated_at

Sorting

By default a collection of sites is sorted ascending by name.

The following fields are accepted by the ?sort= parameter:

id sourceID name created_at updated_at

Get a single site

GET /sites/:id

Response

Status: 200 OK
{
  "picture_uri": null,
  "name": "Widget Data Center",
  "city": "Houston",
  "address": "1919 Briar Oaks Lane",
  "zip": "77027",
  "remarks": null,
  "created_at": "2016-03-14T03:09:52-06:00",
  "sourceID": null,
  "country": "US",
  "updated_at": "2016-03-14T03:09:52-06:00",
  "id": 13,
  "time_zone": "Central Time (US & Canada)",
  "source": null,
  "disabled": false,
  "state": "TX",
  "custom_fields": null,
  "ui_extension": null
}

The response contains these fields.

Create a site

POST /sites

When creating a new site these fields are available.

Response

Status: 201 Created
{
  "address": "...",
  "...": "..."
}

The response contains all fields of the created site and is similar to the response in Get a single site

Update a site

PATCH /sites/:id

When updating an existing site these fields are available.

Response

Status: 200 OK
{
  "address": "...",
  "...": "..."
}

The response contains all fields of the updated site and is similar to the response in Get a single site

Fields

address
Optional string (max 1024) — The address lines of the street address.
attachments
Readonly aggregated Attachments
city
Optional string (max 80) — The city name of the street address.
country
Optional string (max 128) — The 2-letter country code of the street address.
created_at
Readonly datetime — The date and time at which the site was created.
custom_fields
Optional custom fields — Custom fields provided in JSON format by the UI Extension that is linked to the site.
custom_fields_attachments
Writeonly attachments The attachments used in Custom fields.
disabled
Optional boolean, default: false — The Disabled box is checked when the site may no longer be related to other records.
id
Readonly integer — The unique ID of the site.
integration
Optional boolean, default: false — The Integration field is a hidden checkbox that can be set to true using this API or the Import functionality. When checked, the address fields of the site are displayed as read-only in the user interface to prevent users from updating them.
name
Required string (max 80) — The Name field is used to enter the name of the site or facility.
picture_uri
Optional string — The hyperlink to the image file for the site.
remarks
Optional text (max 64KB) — The Remarks field is used to add any additional information about the site that might prove useful.
remarks_attachments
Writeonly attachments The inline attachments used in the Remarks field.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
state
Optional string (max 30) — The state name of the street address.
time_zone
Optional time_zone — The Time zone field is used to select the time zone in which the site is located.
ui_extension
Readonly reference to UI Extension — The UI extension field indicates the UI extension that is applied to the site.
updated_at
Readonly datetime — The date and time of the last update of the site. If the site has no updates it contains the created_at value.
zip
Optional string (max 20) — The zip code of the street address.