cube icon indicating copy to clipboard operation
cube copied to clipboard

REST API method to get cubes meta doesn't returns custom metadata

Open aaa-user opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe. I want to use meta parameter of cubes to customize frontend visualisation for this cubes. But I can't get field meta using method /v1/meta. Is there another ways to read custom metadata?

Describe the solution you'd like I find it logical to add field meta into response of method /v1/meta

aaa-user avatar Feb 09 '24 11:02 aaa-user

Hi @aaa-user , /v1/meta does return meta of the cube. However this feature is only available since version https://github.com/cube-js/cube/releases/tag/v0.34.35. Which version did you use? The documentation(https://cube.dev/docs/reference/rest-api#v1meta) is missing meta by mistake.

hannosgit avatar Feb 10 '24 08:02 hannosgit

@hannosgit Could you please provide PR to the Cube repo? Thanks!

paveltiunov avatar Feb 11 '24 21:02 paveltiunov

@paveltiunov done, see https://github.com/cube-js/cube/pull/7748

hannosgit avatar Feb 12 '24 05:02 hannosgit

Thanks a lot. I see changes in docs. But I face with error in playground, when paste example meta from docs in my cube (not in measures or dimensions):

Compile errors:
CubeName cube: (meta = [object Object]) is not allowed

Example is:

  meta: {
    any: `value`
  }

What I do wrong? Sorry for silly question.

aaa-user avatar Feb 15 '24 09:02 aaa-user

@aaa-user Which cube version do you use?

hannosgit avatar Feb 15 '24 09:02 hannosgit

Local version was 0.33.47, I've updated it to 0.34.55 and error have dissapeared. Thank you!

aaa-user avatar Feb 15 '24 12:02 aaa-user

@aaa-user so this can be closed?

hannosgit avatar Feb 19 '24 16:02 hannosgit

Yes, question is solved.

aaa-user avatar Feb 20 '24 04:02 aaa-user