Skip to main content
Matrix42 Self-Service Help Center

Fragments Data Service: Get a list of Fragments


Retrieves a list of fragments with a defined list of columns which match the specified search criteria and are sorted in the defined order.



GET  http(s)://{server}/M42Services/api/data/fragments/{ddname}?where={where}&columns={columns}&pagesize={pagesize}&pagenumber={pageNumber}&sort={sort}

URL Attributes and Query Parameters

Element Description Type Required
ddName The technical name of the Data Definition (e.g. SPSActivityClassBase) string Required
where A-SQL Where Expression.  If no filtering expression is specified, the Service returns all fragments of the specified Data Definition which are allowed for the caller.
More information  please see ASQL
string Optional
columns A-SQL Column expression defines the columns in the result set, separated by Comma. If no Columns defines, then the Operation returns only Fragment Ids. 
Example: Name, Parent.Name as ParentName
string Optional


Sets the number of records (fragments) returned by Operation. Used in combination with the PageNumber parameter integer Optional
pageNumber Sets the Number of the page. Used in combination with PageSize property. integer Optional
Sort Defines the sorting in the result. Example: "Name ASC, CreatedDate DESC" string Optional


For a list of available HTTP request headers see Web Services: REST API integration.



An array of JSON objects where each object represents the Data Definition fragment which matches the specified search criteria and is allowed for the current user (caller). 

The response has the following format:

        "DisplayString":"{Fragment Display String}",
        "Column1": value

Status Codes and Errors

The following table lists the returned HTTP status codes.

Code Description
  • Defined Data Definition is not found
  • The specified Where or Columns ASQL expressions are not valid



Example 1: Read Service Desk categories 

The example obtains all the list of Service Desk categories which

  • Have a Parent category. 
  • Each found category contains columns: ID, Name of the Category, Name of the parent Category.
  • Names of the categories are expected in German.
  • All the categories need to be sorted by name. 
  • Result fetches up to 3 category 
GET http://localhost/m42Services/api/data/fragments/SPSScCategoryClassBase?columns=ID,Parent.Name as ParentName,Name&where=Parent IS NOT NULL&Sort=Name asc&pageSize=3

Authorization: Bearer {token}
Explicit-Language: de