UI Extensions API

List UI extensions

List all UI extensions for an account:

GET /ui_extensions

Response

Status: 200 OK
[
  {
    "id": 3,
    "name": "Location Move",
    "disabled": false,
    "created_at": "2016-03-18T19:04:06-05:00",
    "updated_at": "2016-03-18T19:04:06-05:00",
    "active_version": {
      "id": 7,
      "name": "Location Move",
      "version": 1
    },
    "prepared_version": {
      "id": 8,
      "name": "Location Move",
      "version": 2
    }
  },
  {
    "id": 2,
    "name": "SAP Finance field option",
    "disabled": false,
    "created_at": "2016-03-18T19:04:06-05:00",
    "updated_at": "2016-03-18T19:04:06-05:00",
    "active_version": {
      "id": 5,
      "name": "SAP Finance field option",
      "version": 1
    },
    "prepared_version": {
      "id": 6,
      "name": "SAP Finance field option",
      "version": 2
    }
  }
]

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

Collection Fields

By default the following fields will appear in collections of UI extensions:

active_version created_at disabled id sourceID name prepared_version updated_at

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

Filtering

Filtering is available for the following fields:

id source sourceID name created_at updated_at disabled

Sorting

By default a collection of UI extensions is sorted ascending by name.

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

id sourceID name created_at updated_at

Get a single UI extension

GET /ui_extensions/:id

Response

Status: 200 OK
{
  "active_version": {
    "id": 7,
    "name": "Location Move",
    "version": 1
  },
  "category": "request_template",
  "created_at": "2016-03-18T19:04:06-05:00",
  "css": ".row.subject {\n  display: none;\n}",
  "description": "Location move request template UI Extension",
  "disabled": false,
  "html": "<div class=\"row vertical\">\n  <label for=\"move_from\">Move from</label>\n  <input id=\"move_from\" type=\"text\" class=\"required add-to-subject\">\n</div>\n\n<div class=\"row vertical\">\n  <label for=\"move_to\">Move to</label>\n  <input id=\"move_to\" type=\"text\" class=\"required add-to-subject\">\n</div>",
  "id": 3,
  "javascript": null,
  "name": "Location Move",
  "phrases": [
    "Move from",
    "Move to"
  ],
  "prepared_version": {
    "id": 8,
    "name": "Location Move",
    "version": 2
  },
  "compiled_css": ".row.subject {\n  display: none; }\n",
  "localized_html": "<div>\n<div class=\"row vertical\"><label for=\"move_from\">Verplaats van</label><input id=\"move_from\" type=\"text\" class=\"required add-to-subject\">\n</div><div class=\"row vertical\"><label for=\"move_to\">Verplaats naar</label><input id=\"move_to\" type=\"text\" class=\"required add-to-subject\">\n</div>\n</div>",
  "title": "Information",
  "localized_title": "Informatie",
  "updated_at": "2016-03-18T19:04:06-05:00"
}

The response contains these fields.

Create a UI extension

POST /ui_extensions

When creating a new UI extension these fields are available.

Response

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

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

Update a UI extension

PATCH /ui_extensions/:id

When updating a UI extension these fields are available.

Response

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

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

Fields

activate
Optional boolean, default: false — Set to true to promote the Prepared Version to the Active Version. If the was an Active Version, it will be Archived.
active_version
Readonly Optional reference to UI extension Version The version with Status active.
category
Required enum — The Category field is used to select the type of record in which the UI extension can be selected. Valid values are:
  • request_template: Request Template
  • knowledge_article_template: Knowledge Article Template
  • problem: Problem
  • release: Release
  • workflow_template: Workflow Template
  • task_template: Task Template
  • project: Project
  • project_task_template: Project Task Template
  • service: Service
  • service_instance: Service Instance
  • product: Product
  • product_category: Product Category
  • contract: Contract
  • organization: Organization
  • team: Team
  • person: Person
  • site: Site
  • risk: Risk
  • custom_collection: Custom Collection
  • scim_user: SCIM User
  • app_offering: App Offering
  • shop_article: Shop Article
compiled_css
Readonly text (max 64KB) — The compiled CSS stylesheet of the Active Version (if available).
created_at
Readonly datetime — The date and time at which the UI extension was created.
created_by
Readonly reference to Person — The Created by field is automatically set to the person who created the UI extension.
css
Optional text (max 64KB) — The CSS stylesheet; Shows the CSS stylesheet of the Active Version on retrieval and sets the CSS stylesheet of the Prepared Version if updated.
description
Optional string (max 64KB) — The Description field is used to enter a very short description of the ui extension.
disabled
Optional boolean, default: false — The Disabled box is checked when the UI extension is inactive.
html
Optional text (max 64KB) — The HTML code; Shows the HTML code of the Active Version on retrieval and sets the HTML code of the Prepared Version if updated.
id
Readonly integer — The unique ID of the UI extension.
javascript
Optional text (max 64KB) — The Javascript code; Shows the Javascript code of the Active Version on retrieval and sets the Javascript code of the Prepared Version if updated.
localized_html
Readonly text (max 64KB) — The HTML code of the Active Version with all phrases translated in the current users locale (if available).
name
Required string (max 190) — The Name field is used to enter the name of the UI extension.
phrases
Readonly array — The translatable phrases used in the version with Status active.
prepared_version
Readonly reference to UI Extension Version The version with Status being prepared.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
title
Optional string — The Title field is used to enter the text that is to be displayed as the section header above the UI extension when the UI extension is presented within a form.
updated_at
Readonly datetime — The date and time of the last update of the UI extension. If the UI extension has no updates it contains the created_at value.
created_by
Readonly reference to Person — The Updated by field is automatically set to the person who last updated the UI extension.