Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Fragments Type

 

Use to inject custom content fragments into JSA.

The fragments block contains fields that define the tab, page, and page area where you want to inject custom content. It also defines the REST endpoint that JSA uses to generate custom content. Different apps can inject content into the same page location. However, each app can insert only one set of HTML content for each location.

The following table describes the fragments block fields in the manifest.json file.

Table 1: Fragments Block Fields

Field

Required

Type

Description

app_name

Yes

String

The JSA app into which the content is to be injected.

page_id

Yes

String

The identifier of the page in JSA UI into which the content is injected.

location

No

String

The location on the JSA page where the custom content is injected.

To inject content at the top of a page, if permitted, the value for this parameter is header. To inject content at the bottom of a page, if permitted, the value for this parameter is footer. If the page has only one injection point, don't include this field.

rest_endpoint

Yes

String

Identifies the REST API endpoint that JSA invokes to retrieve the custom content. Can be any REST endpoint, not necessarily one that is provided by this app. An app's custom fragment REST endpoint must return a JSON response body.

The following example specifies content that is retrieved from the /myoffensesheadercontent endpoint to be injected into the header area of the Offense List page.

{ ... "fragments": [ { "app_name": "SEM", "page_id": "MyOffenseList", "location": "header", "rest_endpoint": "/myoffensesheadercontent" } ], ... }

For more information about adding custom content fragments to the JSA user interface, see Custom Fragments Example.