Call Endpoint /operations/metadata internally from a service

I am trying to call the internal endpoint /operations/metadata from within one of my services like below

What do I put in the <> for the ResolveService.
What is the service Action I should call in my service.AnyAsync(new what comes here…)

using (var service = base.ResolveService<>()
var operationsmeta = await service.AnyAsync(new WhatComesHere… {}

Have a look at the Service Gateway, e.g:

var operationsMeta = await Gateway.SendAsync(new MyRequest { ... });

Hi Mytz,

I am specifically looking for the internal operations/metadata service in Servicestack.

I don’t understand what this means. Please provide a complete code example to better clarify what you’re looking for.

On any servicestack service, you can browse to /metadata to get the metadata, and to /operations/metadata which gives you the following information (just an extract)

This metadata seem to be a normal service as you can view it via json or csv etc.

I have created a service called GetOperationsMeta

In the GetOperationsMeta service, I want to do an internal service call to get the attached data(which is internal to Servicestack and is called using /operations/metadata) in my service. This is however an internal Servicestack service, which I don’t know how to call.

So what I want to know is, on this:

var operationsMeta = await Gateway.SendAsync(new MyRequest { … });

If I for e.g. call my AccountGroupViewQuery service, I would do it as this.

var accountGroupView = await Gateway.SendAsync(new AccountGroupViewQuery { … });

What would be the Equivalent Service Name (internal to Servicestack) to call /operations/metadata.

var accountGroupView = await Gateway.SendAsync(new ServiceStackGetOperationsMetaData { … });

I could call it as a normal external rest service using endpoint : https://localhost:5001/operations/metadata, but would prefer to call it internally using the service name

Hope this helps

It’s not an API, all metadata information is available from HostContext.Metadata, e.g. you can retrieve this resultset from HostContext.Metadata.GetOperationDtos(), there’s also the MetadataApp API which returns a complete snapshot of your App’s metadata (which is used to power all built-in UIs).