=========
This package provides a REST interface to an object providing an IOLAPSource
or IXMLASource interface.
Example usage
=============
A mini program exposing two interfaces:
```python
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
from pyramid.renderers import JSONP
import olap.rest.pyramid as orest
import olap.interfaces as oi
import olap.xmla.xmla as xmla
import cornice
@orest.restify()
class ExposeAll(orest.OLAPREST):
pass
@orest.restify()
class SomeFixed(orest.OLAPREST):
DATASOURCE="mondrian@localhost"
CATALOG="FoodMart"
CUBE="Sales"
def reg_fixed(config):
SomeFixed.register_service(config)
def reg_all(config):
ExposeAll.register_service(config)
def main():
config = Configurator()
config.begin()
config.add_renderer('jsonp', JSONP(param_name="callback"))
reg = config.registry
reg.registerUtility(xmla.XMLASource(location = "http://localhost:8080/mondrian/xmla"),
oi.IOLAPSource, "mondrian@localhost")
reg.registerUtility(xmla.XMLASource(location = "http://localhost:8080/mondrian/xmla"),
oi.IOLAPSource, "mondrian2")
cornice.includeme(config)
config.include(reg_all, route_prefix="/all")
config.include(reg_fixed, route_prefix="/fixed")
app = config.make_wsgi_app()
server = make_server('0.0.0.0', 6543, app)
server.serve_forever()
if __name__ == '__main__':
main()
```
The interface
=============
The following interface is exposed:
* `(GET) /datasources`
* `(GET) /datasource/{ds}`
> Returns information of the OLAP connection known in the backend.
* `(GET) /datasource/{ds}/catalogs`
* `(GET) /datasource/{ds}/catalog/{cat}`
> Retrieve information about the catalogs in a datasource.
* `(GET) /datasource/{ds}/catalog/{cat}/sets`
* `(GET) /datasource/{ds}/catalog/{cat}/set/{set}`
> Retrieve information about the sets in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/hierarchies`
`(GET) /datasource/{ds}/catalog/{cat}/hierarchy/{huname}`
Retrieve information about the hierarchies in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/measures`
`(GET) /datasource/{ds}/catalog/{cat}/measure/{muname}`
Retrieve information about the measures in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/queries`
Returns all queries with attached results currently in the session cache.
`(POST) /datasource/{ds}/catalog/{cat}/queries`
Create a new query, execute it and return its result along with a query id.
The query is expected in a `mdx` property.
`(GET) /datasource/{ds}/catalog/{cat}/query/{qid}`
Returns results of a query if still in session cache.
`(GET) /datasource/{ds}/catalog/{cat}/dimensions`
`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}`
Retrieve information about the dimensions in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}/members`
`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}/member/{muname}`
Retrieve information about the members of a dimension in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/cubes`
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}`
Retrieve information about the cubes in a catalog.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/sets`
Return information about all sets in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/set/{set}`
Return information about a set in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/measures`
Return information about all measures in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/measure/{muname}`
Return information about a measure in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimensions`
Return information about all dimensions in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}`
Return information about a dimension in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchies`
Return information about all hierarchies in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}`
Return information about a hierarchy in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/members`
Return information about all members of a hierarchy in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}`
Return information about a member of a hierarchy in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/levels`
Return information about all levels of a hierarchy in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}`
Return information about a level of a hierarchy in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/members`
Return information about all members of a hierarchy's level in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/member/{muname}`
Return information about a member of a hierarchy's level in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}/members`
Return information about all members of a dimension in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}/member/{muname}`
Return information about a member of a dimension in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}/children`
Return information about the children of a hierarchy's member in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/properties`
Return information about all properties of a hierarchy's level in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/property/{pname}`
Return information about a property of a hierarchy's level in a cube.
`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}/existingchildren`
Return information about the NON EMPTY children of a hierarchy's member in a cube w.r.t. a
second set specified in the query string parameter called `set2`.
PATH parameter:
:ds:
the name that was used to register the connection as an utility
:cat:
a catalog name
:cube:
a cube name
:duname:
the unique name of a dimension
:huname:
the unique name of a hierarchy
:luname:
the unique name of a level
:muname:
the unique name of a member
:pname:
a property name
:qid:
the query id as returned when a query is created
CHANGES
=======
Metadata
Release files for olap.rest 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| olap.rest-0.1.tar.gz | 8.2 kB | Without provenance | Details for olap.rest-0.1.tar.gz |
Release files / olap.rest-0.1.tar.gz
| Download URL | olap.rest-0.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3923ba8defa4bd2026e155ec0b19fd3a4e1bebe9a494972cd5730ed94158080
|
|
BLAKE2b-256 checksum How to use checksums |
9e1f47eb5fd69933e36b13b5e8387b4640fbceb4598ccfc23b52921df24748ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for olap.rest 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.