Dette dokumentet beskriver REN Kunde API. APIet omfatter REN sine kunder, brukere og produkter.

For generell informasjon om tilgang, autentisering og bruk av REN API, se Generelt.

Tabell 1. Endringslogg for dokumentet
Dato Beskrivelse

19.02.2018

Første versjon.

25.01.2019

Endringer i kapittelinndeling samt noen tekstuelle endringer.

Oppbygging

REN Kunde API er APIet for alt som er relatert til din brukerprofil, ditt selskap eller ditt kundeforhold med REN.

URL base path

Base path for REN Kunde API er https://api.ren.no/public/customer/rest.

API-dokumentasjon

Dokumentasjonen over endepunktene og datastrukturene er generert og skrevet på engelsk. Du kan lese den samt prøve ut endepunktene i REN sin API Browser. Den dokumentasjonen er live-generert og gjenspeiler den versjon som faktisk kjører. Alternativt kan du fortsette å lese en statisk generert versjon her.

Gå til API Browser

Resources

User

Get a user
GET /users/{user}
Description

Returns information about the authenticated user identified by either username or email.

Parameters
Type Name Description Schema

Path

user
required

A user identifier. Can be either the username or an email address.

string

Responses
HTTP Code Description Schema

200

successful operation

User

Produces
  • application/json;charset=utf-8

Security
Type Name Scopes

oauth2

oauth2-password

rensystemer

Log service usage
POST /users/{user}/services/{service}/usage
Description

For intergrators that need a detailed usage logging for a given REN service or application. Usage is reported as a JSON list of name / value structures inside the request body.

Parameters
Type Name Description Schema

Path

service
required

The name of the REN service / application.

string

Path

user
required

A user identifier. Can be either the username or an email address.

string

Body

body
required

< NameValue > array

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json;charset=utf-8

Security
Type Name Scopes

oauth2

oauth2-password

rensystemer

Validate service access
GET /users/{user}/services/{service}/validate
Description

Can be used to query if a given user has access to a specified REN service or application.

Parameters
Type Name Description Schema

Path

service
required

The name of the REN service / application.

string

Path

user
required

A user identifier. Can be either the username or an email address.

string

Responses
HTTP Code Description Schema

200

successful operation

UserServiceValidateResult

Produces
  • application/json;charset=utf-8

Security
Type Name Scopes

oauth2

oauth2-password

rensystemer

Definitions

NameValue

A name / value pair for storing additional information.

Name Description Schema

name
optional

The name.

string

value
optional

The value.

string

ServiceFacility

A service facility is similar to a service role, but relates to content or scope rather than what a user can do. In addition, service facilities cannot be turned on or off on a per user basis. Certain parts of an application, or certain data within an application, will only be available for users that have the appropriate service facility.

Name Description Schema

id
optional

The ID of the service facility.

integer (int64)

ServiceRole

A service role has implications for what a user can access or do within a service or an application.

Name Description Schema

baserole
optional

Some roles are base roles, that will be applied to all users having the related service. Others are specialized roles that can be enabled or disabled on a per user basis.

boolean

name
optional

The name of the service role.

string

User

Models an end-user.

Name Description Schema

active
optional

Reveals if the user is active in the sense that he or she can log in.

boolean

companyId
optional

The ID of the company that employs the user.

integer (int64)

companyName
optional

The name of the company that employs the user.

string

confirmed
optional

Reveals if the user is confirmed by his or her company. A user might be unconfirmed if he or she has indirectly been registered to a company - e.g. via course booking. Such users do not get access to company subscriptions and data until they are confirmed by a user administrator within the company.

boolean

departmentId
optional

The ID of the department within the company where the user works, if any.

integer (int64)

departmentName
optional

The name of the department within the company where the user works, if any.

string

email
optional

The email address of the user. Most users log in using their email address.

string

firstName
optional

The first name of the user.

string

lastName
optional

The last (family) name of the user.

string

mobile
optional

The mobile phone number for the user.

string

phone
optional

The main (or land line) phone number for the user.

string

position
optional

The position (norsk: stilling) that the user has within his or her company.

string

username
optional

The username. This is the user’s unique and permanent identifier. Most users will use their email address when logging in, and might not even know what their username is.

string

UserService

Models a service, in the context of a user. Will point out which roles the user has, and which facilities he or she can access. This object will also reveal if the service is active for that user.

Name Description Schema

active
optional

Is the service active? If this value is false, the user won’t have access to this service regardless of what roles or facilities he or she has.

boolean

endDate
optional

An optional end date for when the service expires.

string (date-time)

facilities
optional

The service facilities that the user has access to.

< ServiceFacility > array

name
optional

The name of the service.

string

roles
optional

The service roles that the user has.

< ServiceRole > array

tool
optional

Services can either be tools or content-only. Tools can be enabled or disabled on a per user basis, whereas users always have access to all the content that their company is paying for.

boolean

UserServiceValidateResult

The result of service validation for a user. Reveals if the user has access to the service, and what roles and facilities he or she has.

Name Description Schema

currentDate
optional

The date and time that validation was performed.

string (date-time)

service
optional

Service information for the validated user. Reveals if the service is active, what roles the user has etc.

UserService

Security

oauth2-password

A flow where an end user is required. Endpoints using this flow can provide personal customization and access to personal information.

Name Description

rensystemer

The default (and minimum) scope.

oauth2-client

A flow where an end user is not involved. Endpoints using this flow will support full automation without any human intervention, but on the other hand cannot provide personal customization or access to personal information.

Name Description

rensystemer

The default (and minimum) scope.