Fragments Data Service: Get Fragment data
Details
Reads the whole Fragment of the specified Data Definition with defined Id.
Request
URL
The URL which returns only the data of the requested fragment has the following format:
GET http(s)://{server_name}/M42Services/api/data/fragments/{ddname}/{fragmentid}
If the Response should include the schema meta-info data which describes the fragment attributes, the following link has to be used
GET http(s)://{server_name}/M42Services/api/data/fragments/{ddname}/{fragmentid}/schema-info
URL Attributes and Query Parameters
Element | Description | Type | Required |
---|---|---|---|
ddName | The technical name of the Data Definition (e.g. SPSActivityClassBase) | string | Required |
fragmentId | Id of the Fragment of specified Data Definition | GUID | Required |
Headers
For a list of available HTTP request headers see Web Services: REST API integration.
Response
Returns the JSON object with all attributes specified in the Data Definition.
The Service returns null if the fragment with the specified fragmentId does not exist, or the Object the Fragment belongs to, is not allowed for the caller.
If the additional Schema meta-info was demanded (with URL directive "/schema-info") the response has the following format
{ Result: { "ID":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Column1": value }, Schema: [{ "ColumnName":"Column1", "ColumnType": {StringType | DateType | IntergerType | ...}, "Localizable": {true | false} }] }
Status codes and errors
The following table lists the returned HTTP status codes.
Code | Description |
---|---|
500 | Defined Data Definition not found |
Example
Example 1: Get the whole fragment of the Category "Facility Management"
GET https://localhost/m42Services/api/data/fragments/SPSScCategoryClassBase/7777780d-71a0-df11-708c-000c2968299e Authorization: Bearer {token} Response: { "ID":"7777780d-71a0-df11-708c-000c2968299e", "TimeStamp":"AAAAAEa7mU4=", "DefaultSubject":"", "Description":"Facility Management", "DefaultImpact":3, "Image":null, "DefaultUrgency":2, "EscalationRole":"1692c2f7-5320-4072-9170-91f1b7bd0811", "Name":"Facility Management", "DefaultRecipientRole":"695f8936-71a0-df11-708c-000c2968299e", "DefaultDescription":null, "ObjectID":"ACT00100", "DefaultDescriptionHTML":null, "DefaultPriority":2, "DefaultSolutionHTML":null, "Hidden":1, "DefaultSolution":null, "Parent":"42b49002-fed3-4c9b-9532-cf351df038cf" }