index

REST API version 1 - Dashboard Apps state

Version: 1.0

Introduction

This API is used by the Dashboard Javascript on MitVirk and MitMyndighedsnet to get and store state for Dashboard Apps.

URL

The general url for getting app state information:

   http://mit.virk.dk/virkservices/api/dashboard/1/apps/state

The relative path prefix '/1/' indicates that this is version 1 of the API.

Methods

Method Url Description
GET https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?apps={app}&apps={app}... Get App state for the given list of apps
PUT https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?app={app}&activated={true\|false} Activate or Deactivate an App

GET: Get App state

URL

https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?apps={app}&apps={app}...

Description

Get App state for the given list of apps. If one of the app in the request is unknown no result is returned for that app.

There are the following states:

State Description
hidden The app should not be shown on the dashboard
active The app should be shown in the active apps section on the dashboard
deactive The app should be shown in the diasabled apps section on the dashboard

GET parameters

Field Description Required Constraints Type
apps App name true App name on the dashboard String

Example request

$ curl -v -X GET -H "Accept: application/json" 'https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?apps=cvr&apps=digitalpost&apps=unknown'

Example JSON response when App state found for a list of apps

{
    "cvr": {
       "state": "deactive"
    },
    "digitalpost": {
       "state": "active"
    }
}

PUT: Activate or Deactivate an App

URL

https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?app={app}&activated={true|false}

Description

Store if the App is should be active or deactive on the dashboard.

PUT parameters

Field Description Required Constraints Type
app The Apps name true App name on the dashboard String
activated A boolean describing if the app is activated or deactivated true true | false Boolean

Example request

$ curl -v -X PUT -H "Accept: application/json" 'https://mit.virk.dk/virkservices/api/dashboard/1/apps/state?app=cvr&activated=false'

Example JSON response if app state was updated

{"cvr":false}