Project

General

Profile

Actions

Question #1376

closed

API: Select view method

Added by Bernhard Koschiček-Krombholz over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
-
Start date:
2020-10-02
Estimated time:

Description

To optimize the time to first byte received a new parameter will be introduced: ?view=

Possible options:
  • detailed - is the standard, shows everything
  • map - ID, Name, Class_code, Description, GIS-data
  • simple - ID, Name, Class_code
  • linked - ID, Name, Class_code, Relations, Types
  • literals - ID, Name, Description, Aliases, ...
Actions #1

Updated by Christoph Hoffmann over 3 years ago

looks good, if it's no bother, maybe the simple view could also include aliases and desription (basically all "literals" directly connected to the entity in question) thank you!

Actions #2

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Description updated (diff)

I added "literals", I don't know what you mean by all literals. Can you explain further?

Actions #3

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Status changed from New to Acknowledged

You can now completely select everything with the parameter show . The question is, are these ?view options useful? Let's discuss it at the next dev meeting.

Actions #4

Updated by Christoph Hoffmann over 3 years ago

... yes they are! so far I am using literals and map, and they reduce TTFB as well as payload

by all literals I meant all purely string based values, that do not require resolving another entity

can you elaborate what is the parameter show - will it replace the parameter view?

Actions #5

Updated by Bernhard Koschiček-Krombholz over 3 years ago

https://redmine.craws.net/projects/uni/wiki/Usage#ShowHide-Types

with the parameter show , you can say, what json keys will not be displayed (and also not requested -> faster load). So if you try /api/0.1/class/E18?show=none you will just get the bare results (@id, crmClass, type, description and properties{title}) and nothing else. And with show you can select which key you want to request ('when', 'types', 'relations', 'names', 'links', 'geometry', 'depictions', 'geonames').
So the view parameter would just be a shortcut version.

Actions #6

Updated by Christoph Hoffmann over 3 years ago

... ein klassischer Fall von RTFM. Vielen Dank :)

Actions #7

Updated by Bernhard Koschiček-Krombholz over 3 years ago

I think I will close this, because it is not needed anymore???

Actions #8

Updated by Christoph Hoffmann over 3 years ago

yes, thank you Bernhard, I suppose for now we have all we need :)

Actions #9

Updated by Bernhard Koschiček-Krombholz over 3 years ago

  • Status changed from Acknowledged to Closed
Actions #10

Updated by Alexander Watzinger over 3 years ago

  • Target version deleted (208)
Actions

Also available in: Atom PDF