Device Identifier which is onboarded at MyGate's end
timestamp
Long
Timestamp defines the records to be returned which have been added/deleted after a particular value
page
Long
Page number defines the records in a particular page, every page has 20 records
Initial Sync
Request
curl --location --request GET 'https://gateway.mgthunderbolt.xyz/access/v1/sync?device_id=xxx×tamp=0&page=0'\
--header 'mg-xs-etype: VEHICLE'\
--header 'mg-xs-api-key: xxxx'
Response
{
"timestamp":"Long",
"all":[
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
}
],
"success":"Boolean",
"_links":{
"next":{
"href":"String"
}
}
}
Response Attributes
Name
Type
Notes
all
List[Object]
Initial sync. Only populated when the query timestamp is 0. Same format as upserted
timestamp
Long
Timestamp of last sync.
_links
Object
Link to the next set of results (pagination). Use this to traverse through the complete result set. The last page/set will not have this field and can be used for terminating the traversal
success
Boolean
If false, message is populated with the reason
message
String
Response message
all.access_entity_type
Enum
VEHICLE (Refer enum table)
all.access_uuid_type
Enum
LPN,TAG etc (Refer enum table)
all.access_uuid
String
The unique identifier associated with the entity seeking access. Can be one of either MD5 hash string of the uuid value or Base64 encoded string of the uuid value used for image based uuid type like face and fingerprint
all.access_ref_id
String
The opaque identifier used to identify the entity in mygate backend. It is passed back in the notify API
all.access_display
String
The display string to be used (optional)
Incremental Sync
Request
curl --location --request GET 'https://gateway.mgthunderbolt.xyz/access/v1/sync?device_id=xxx×tamp=1676033513&page=0'\
--header 'mg-xs-etype: VEHICLE'\
--header 'mg-xs-api-key: xxxx'
Response
{
"timestamp":"Long",
"deleted":[
"String",
"String"
],
"upserted":[
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
},
{
"access_entity_type":"String",
"access_uuid_type":"String",
"access_ref_id":"String",
"access_uuid":"String",
"access_display":"String"
}
],
"success":"Boolean",
"_links":{
"next":{
"href":"String"
}
}
}
Response Attributes
Name
Type
Notes
upserted
List[Object]
Encoded entries in object form added or updated since timestamp. Same format as all
timestamp
Long
Timestamp of last sync.
_links
Object
Link to the next set of results (pagination). Use this to traverse through the complete result set. The last page/set will not have this field and can be used for terminating the traversal
success
Boolean
If false, message is populated with the reason
upserted.access_entity_type
Enum
VEHICLE (Refer enum table)
upserted.access_uuid_type
Enum
LPN,TAG etc (Refer enum table)
upserted.access_uuid
String
The unique identifier associated with the entity seeking access. Can be one of either MD5 hash string of the uuid value or Base64 encoded string of the uuid value used for image based uuid type like face and fingerprint
upserted.access_ref_id
String
The opaque identifier used to identify the entity in mygate backend. It is passed back in the notify API