cancel
Showing results for 
Search instead for 
Did you mean: 

How to get list of all odata services defined in sap hana db?

0 Kudos
1,283

Hi,

I am able to successfully run odata service created on SAP HANA DB trial version, and perform GET, PUT, POST, DELETE operations on same.

Now, I am able to get list of all entities defined in any .xsodata file using /sampledata/sample.xsodata/$metadata (for instance).

But as per business requirement, I would like to know if there is any way I can get list of all odata services (xsodata files and its paths) defined on particular SAP HANA DB.

Thanks,

Asha

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor

Ok, as you have mentioned in the comments that you are using XS Classic, you can find all (active) available xsodata services in your system by following query:

select package_id, object_name 
from _sys_repo.active_object
where object_suffix = 'xsodata';

object_name is the service artifact name, package_id is the package id/path to the service.

In case you wanna expose that information, you can easily build your own odata service which provides that information.

0 Kudos

Thanks, above query works in case of SAP HCP trial account.

I have two more queries:

1) Does same query work when I use XS Advanced? If not can you also help me with the solution for same requirement on XS Advanced?

2) Also, when I run a query on _sys_repo.active_object , along with xsodata services that I had created, I get a huge list of services that is activated by _SYS_REPO which I do not want. So, is it safe to add a where clause as ACTIVATED_BY not like '_SYS_REPO';

pfefferf
Active Contributor
0 Kudos

For XS Advanced it does not work, because XS Advanced does not use the HANA repository anymore.

All services in XS Classic created via a design time object are activated by _SYS_REPO.

0 Kudos

So, do we have any other way to fetch list of odata services in XS Advanced?