Save Single Record Using SaveData Endpoint
SaveData end point allows you to create, update or save a single record in Aptify. The POST action is used for the data modification operations.Â
Headers
In order to save and receive entity record, the AptifyAuthorization header is required along with <TokenId> generated after Authentication Process..
Header Name | Header Value |
---|---|
AptifyAuthorization | <Authentication Provider> <TokenId> |
Endpoint Example
URL
https://<base address>/services/BasicGenericEntity/SaveData/{id}
 Parameters:
- Data: Json data to be save along with Entity Name and ID, if have Sub type then its should be under SubType Tag along with Name as root.
- Id:Â Optional value need to pass any integer value, this value is not related to data.
Non-SubType Record
Sample Request Body for Non-SubType Record
{ ID: -1, EntityName: "Groups", Name: "Data Savers" }
Data returned has a valid ID value, indicating that you successfully saved a new group.Note the ID of the group you created.In this case ID is 1038.
Â
Sample Response Body for Non-SubType Record
{ Â "ID": 1038, "EntityName": "Groups", "Name": "Data Savers", "Description": "", "Subtypes": [ ] }
Â
Single SubType Record
Sample Request Body for Single SubType Record
{ ID: <Group ID>, EntityName: "Groups", SubTypes: [ { ID: -1, EntityName: "GroupMembers", UserID: <User ID> } ] }
Sample Response Body for Single SubType Record
{ Â "id": <Group ID>, "entityname": "Groups", "name": "Data Savers", "description": "", "subtypes": [{Â "id": <ID>, "entityname": "GroupMembers", "groupid": <Group ID>, "sequence": 1, "userid": <User ID>, "userid_name": <User ID Name>, "aptify_record_version": "system.byte[]" ]} }
Â
Multiple SubType Records
Â
Sample Request Body for Multiple SubType Records
{ ID: <Group ID>, EntityName: "Groups", SubTypes: [ { ID: -1, EntityName: "GroupMembers", UserID: <User ID 1> }, { ID: -1, EntityName: "GroupMembers", UserID: <User ID 2> } ] }
Sample Response Body for Multiple SubType Records
{ Â "id": <Group ID>, "entityname": "Groups", "name": "Data Savers", "description": "", "subtypes":Â [{Â "id": <ID>, "entityname": "GroupMembers", "groupid": <Group ID>, "sequence": 1, "userid": <User ID 1>, "userid_name": <User ID1 Name>, "aptify_record_version": "system.byte[]" }, { Â "id": <ID>, "entityname": "GroupMembers", "groupid": <Group ID>, "sequence": 2, "userid": <User ID 2>, "userid_name": <User ID2 Name>, "aptify_record_version": "system.byte[]" }] }
Â
HTTP Status Codes
Status Code | Meaning |
---|---|
200 | OK; View data in response body |
404 | Not Found or Not Authenticated |
Copyright © 2014-2019 Aptify - Confidential and Proprietary