Bracken Compatibility API

Home | API reference

PublicAPI reference

The compatibility API aims to provide limited backward compatibility of Bracken 2 data to Bracken 1 enabled integration partners.

These PublicAPI compatibility endpoints require client credentials.

Reference

POST /api/membership/create

Create a new user within a domain. Requires Site Administrator permission.

The request body and response are the same as the corresponding Bracken API method.

Request body

UserAttributes {
  username*: string
  firstname: string
  lastname: string
  email: string
  password*: string
  multicode: string
  parentkey: integer($int64)
}

Response

MembershipModel {
  user*	UserModel {
    userkey*: integer($int64)
    username*: string
    firstname: string
    lastname: string
    email: string
    verifiedemail: string
    password: string($byte)
    parentkey: integer($int64)
    friendlyname: string
    readOnly: true
    iconkey: string($uuid)
    storage: integer($int32)
    mobile: string
    domainkey*: integer($int64)
    created*: string($date-time)
    modified*: string($date-time)
    lastlogin*: string($date-time)
    internaluser*: boolean
    masteraccess*: boolean
    groupaccess*: boolean
    designaccess*: boolean
    siteaccess*: boolean
    authoraccess*: boolean
    markeraccess*: boolean
  }
  membership*	[ZoneMemberModel{
    memberkey: integer($int64)
    zonekey: integer($int64)
    userkey: integer($int64)
    username: string
    expires: string($date-time)
    created: string($date-time)
    modified: string($date-time)
    access: string
    storage: integer($int32)
    alertflags: integer($int64)
  }]
  groups*	[UserGroupMember{
    groupkey*: integer($int64)
    title*: string
    userkey*: integer($int64)
    username*: string
    firstname*: string
    lastname*: string
    created*: string($date-time)
    access*: Permissions integer($int64)
    role*: string
  }]
}

GET /api/membership/join/{username}/to/{multicode}

Grant a user membership access rights to one or more groups / zones. Requires Master Administrator permission.

The payload and response are the same as the corresponding Bracken API method.

Parameters

Parameter Data type Description
username* string The Bracken account username to be joined.
multicode* string Code identifying the group(s) or zone(s) to be joined.

Response

MembershipModel {
  user*	UserModel {
    userkey*: integer($int64)
    username*: string
    firstname: string
    lastname: string
    email: string
    verifiedemail: string
    password: string($byte)
    parentkey: integer($int64)
    friendlyname: string
    readOnly: true
    iconkey: string($uuid)
    storage: integer($int32)
    mobile: string
    domainkey*: integer($int64)
    created*: string($date-time)
    modified*: string($date-time)
    lastlogin*: string($date-time)
    internaluser*: boolean
    masteraccess*: boolean
    groupaccess*: boolean
    designaccess*: boolean
    siteaccess*: boolean
    authoraccess*: boolean
    markeraccess*: boolean
  }
  membership*	[ZoneMemberModel{
    memberkey: integer($int64)
    zonekey: integer($int64)
    userkey: integer($int64)
    username: string
    expires: string($date-time)
    created: string($date-time)
    modified: string($date-time)
    access: string
    storage: integer($int32)
    alertflags: integer($int64)
  }]
  groups*	[UserGroupMember{
    groupkey*: integer($int64)
    title*: string
    userkey*: integer($int64)
    username*: string
    firstname*: string
    lastname*: string
    created*: string($date-time)
    access*: Permissions integer($int64)
    role*: string
  }]
}

GET /api/membership/login/{username}?response_mode={response_mode}

Request a specific user to be logged in to Bracken. This can only be used to log the user in to the landing dashboard page.

Parameters

Parameter Data type Description
username* string The Bracken account username to be logged in.
response_mode string See response_mode discussion.

Response

The optional response_mode query parameter determines the type of response returned by Compatibility API.

response_mode Response
form_post HTML document with self-submitting <form> to Bracken 2.
passthrough Bracken 1 URL. The client can use document.location = {url} to redirect.
redirect_uri Bracken 1 redirect 302 Found to landing page.

Overrides

The target platform can be configured in the Compatibility API server for each tenant with optional client credential parameters.

Parameter Applies to Effect
forceLegacyRedirect form_post The returned self-submitting <form> logs in to Bracken 1.
forceUpdateRedirect passthrough, redirect_uri The return URL (as text or redirect location) logs the user in to Bracken 2.

POST /api/membership/accessrights

Set Access Rights for a given User within a particular Zone. Requires Site Administrator permission.

The zonekey property determines the affected zone or group.

Request body

MemberParamsJSON {
  username*: string
  zonekey*: integer($int64)
  rights*: string
}

Response

ZoneMemberModel {
  memberkey: integer($int64)
  zonekey: integer($int64)
  userkey: integer($int64)
  username: string
  expires: string($date-time)
  created: string($date-time)
  modified: string($date-time)
  access: string
  storage: integer($int32)
  alertflags: integer($int64)
}

GET /api/content/list/lesson/{lessonkey}

List information about a single lesson.

Parameters

Parameter Data type Description
lessonkey string($guid) Bracken 1 lesson identifier as GUID.
number Bracken 2 lessonkey as number.

Response

LessonModel {
  lessonkey: string; // Guid
  lessontitle: string;
  description: string;
  ownerkey: number; // long
  zoneownerkey: number; // long
  minimumscore: number; // int
  lessonflags: LessonFlagEnum;
  publishingstatus: string;
  version: number; // int
  created: string; // DateTime
  modified: string; // DateTime
  imagekey?: string; // Guid
  xapikey: string;
  certexpiry: number; // int
}

GET /api/lesson/list/zone/{zonekey}/modified/{date}?tz={tz}

Request a list of lessons completed by all members of a zone or group which have been modified since the specified date.

Parameters

Parameter Data type Description
zonekey* integer($int64) Zone or group key, see discussion.
modified* string($date-time) An ISO date-time string in Pacific/Auckland time, e.g. 2022-01-01T10:00:00
tz boolean When set, the returned results include a timezone offset. By default, dates are returned in Pacific/Auckland timezone without an offset.

The zonekey property determines the affected zone or group.

Response

Property Description
userkey User identifier, same as zone result.
zonekey Group identifier, equivalent to zone result.
resultkey The parameter is null. There is no equivalent in Bracken 2 portfolios.
lessonkey Identifier of a lesson, of type string.
created Result creation date, same as zone result.
modified Result modified date, same as zone result.
achieved Result completed date, same as zone result.
status Result status, mapped to the equivalent state of a zone result.
score Value 1 if the result has been achieved, or 0 otherwise.
pass Value 1.
[ResultScoreModelResultScoreModel {
  userkey: integer($int64)
  username: string
  zonekey: integer($int64)
  resultkey: string($uuid)
  lessonkey: string($uuid)
  status: string
  title: string
  created: string($date-time)
  modified: string($date-time)
  achieved: string($date-time)
  score: integer($int32)
  pass: integer($int32)
}]