Select fields in response#

All APIs have a set of fields that are included in the response by default. Many APIs allow you to override this set. This can be used to:

  • Reduce the amount of data returned if you do not need all the default fields.

  • Retrieve fields that are not returned by default.

This is done through the fields query parameter. This query parameter is a comma-separated list of which fields should be returned in the response.

Availability#

The fields query parameter is only available on specific APIs. This is documented on the individual APIs.

The available fields are also documented on the individual API pages. Fields that are not returned by default are marked as such.

Example#

To retrieve just the name and provider of a service, you can specify fields=name,provider in the query string:

https://api.feide.no/2/sp/16540?fields=name,provider

This will return something like:

{
  "provider": {
    "id": "136",
    "name": {
      "nb": "Uninett AS",
      "en": "Uninett AS"
    },
    "realm": "uninett.no"
  },
  "name": {
    "en": "Feide Customer Portal",
    "nb": "Feide Kundeportal"
  }
}