Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
JohannesFinsveen edited this page Nov 15, 2023 · 8 revisions

Welcome to the lab_gpt wiki!

GPTs Description, Instruction and swagger.json

[Swagger validator](https://editor-next.swagger.io/)

Eksempel-kall til databasen - [søk etter tabell: etsende ](https://data.qa.ssb.no/pxapi2-beta/api/v2/tables?query=etsende) - [søk: finn alle tabeller ](https://data.qa.ssb.no/pxapi2-beta/api/v2/tables?pageSize=10000)

Oppskrift: Starting with the fish: https://data.qa.ssb.no/pxapi2-beta/api/v2/tables/03024

For each object in the variable array:

Construck a string on the form: valueCodes[<id property>]=<code property of first item in the value array>,<same for the second item in the value array> and so on

For example: { "id": "VareGrupper2", "label": "varegruppe", "type": "RegularVariable", "elimination": false, "values": [ { "code": "01", "label": "Fersk oppalen laks" }, { "code": "02", "label": "Frosen oppalen laks" } ] }

Yields: valueCodes[VareGrupper2]=01,02

Decide on language and outputformat: lang=no&outputformat=json

Join these together:

VareGrupper2=01,02&valueCodes[ContentsCode]=Vekt,Kilopris&valueCodes[Tid]=2023U14,2023U15,2023U16,2023U17,2023U18,2023U19

Clone this wiki locally