0👍
CosmosDB offers a REST API to access documents. For example:
@Injectable({
providedIn: 'root'
})
export class CosmosDBService {
constructor(private http: HttpClient) { }
get(id: string) {
return this.http.get(
`https://${account}.documents.azure.com/dbs/${db}/colls/${collection}/docs/${id}`);
}
}
Of course, you have to take care of access control, and set the right auth headers to the requests (https://learn.microsoft.com/en-us/rest/api/cosmos-db/access-control-on-cosmosdb-resources)
Source:stackexchange.com