Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
Aabol, Simen Tvete edited this page Nov 20, 2023 · 44 revisions

Welcome to the lab_gpt wiki!

OpenAI Evals

OpenaAI cookbook

GPTs Description, Instruction and swagger.json

Swagger validator

Swagger til Svenske

Eksempel-kall til databasen

PxWebApi v0

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

Look at the response from : https://data.qa.ssb.no/pxapi2-beta/api/v2/tables/03024/metadata?lang=no

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:

https://data.qa.ssb.no/pxapi2-beta/api/v2/tables/03024/data?lang=no&outputformat=json&valueCodes[VareGrupper2]=01,02&valueCodes[ContentsCode]=Vekt,Kilopris&valueCodes[Tid]=2023U14,2023U15,2023U16,2023U17,2023U18,2023U19
Clone this wiki locally