trOnGAtE
switch to dark mode

User ID Segment Authorization
There may be times when you'd like to allow access to users whose Trongate User ID can be matched with a number that has been passed via the URL. This is where User ID Segment Authorization comes to the rescue.
The basic syntax for User ID Segment Authorization is:
"authorization": {
"userIdSegment": segmentNum
}
Just To Let You Know
In the code example above, 'segmentNum' should be replaced with an integer that represents the URL segment that you'd like to read the Trongate User ID from.Below is an example of a 'Get' endpoint where access has been granted to users whose Trongate User ID matches the value presented in the fourth URL segment:
"Get": {
"url_segments": "api/get/members",
"request_type": "GET",
"description": "Fetch rows from table",
"enableParams": true,
"authorization":{
"userIdSegment": 4
}
}
HELP & SUPPORT
If you have a question or a comment relating to anything you've see here, please goto the Help Bar.