Analytics Services Token Cap Table Report Tutorial
Overview
Analytics Services is supported by the LedgerScan Platform, in conjunction with Looker, a business intelligence platform offered by Google.
The Cap Table Report API Endpoint is exposed by the LedgerScan Processing Engine (LSPE) component.
1. API Endpoint Parameters
The Token Cap Table Report requires a number of parameters to be specified so that the report can be generated. The parameters are:
-
report name
-
report parameters
-
user parameters, which are:
-
external user id
-
first name
-
last name
-
list of tokens that are part of the tenant that the user can view
-
list of wallets that are part of the tenant that the user can view
-
2. API Endpoint Specification
A typical API Endpoint call would be:
POST {Apigee Domain}{LSPE Proxy}/v1/reports/cap-table
{
"reportDate": "2023-09-07T09:00:00",
"tokenReferenceId": "Stellar:Token:ABC.GAQQWQM4BG5DJBDLOAF5NNQ5KKOZJYGE4RUI3OFV345PWAEEIMJYLHJX",
"userId": "<user-identifier>",
"firstName": "<first-name>",
"lastName": "<last-name>",
"dataFilter":{
"tokenReferenceIds":[
"Stellar:Token:ABC.GCMDTUF2HGEALRBVVMSGOZSMH65BE5NSPR5NIBQMF3PNCRNVMSW3KG6S",
"Stellar:Token:WSP.GBT7HCRUZLASWEGDGFHPGQMNYRVKXSEFQTUBTHB24FT7X4V43KMQOJ5Q",
"Stellar:Token:CDF.GD4IZOXCU2XM2CJ2KA4U5VT3VN53VY5633H7LYWWJU2SRDNDMPS3FO2P"
],
"walletReferenceIds":[
"Stellar:Wallet:GCMDTUF2HGEALRBVVMSGOZSMH65BE5NSPR5NIBQMF3PNCRNVMSW3KG6S",
"Stellar:Wallet:GBT7HCRUZLASWEGDGFHPGQMNYRVKXSEFQTUBTHB24FT7X4V43KMQOJ5Q",
"Stellar:Wallet:GD4IZOXCU2XM2CJ2KA4U5VT3VN53VY5633H7LYWWJU2SRDNDMPS3FO2P"
]
}
}3. API Endpoint Response
Execution of this API Endpoint will produce a return code, as documented in the API Primer.
A success return code will also generate a response body with this information:
{
"reportUrl": "<generated-report-url-from-Looker>"
}The response body is a string that represents a single-use URL, which points to a HTML document containing the pre-formatted report.