25
EKP 5.6: The Enterprise Knowledge Platform API April 2009 i Enterprise Knowledge Platform 5.6 The Enterprise Knowledge Platform API

The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

  • Upload
    others

  • View
    45

  • Download
    1

Embed Size (px)

Citation preview

Page 1: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

i

Enterprise Knowledge Platform 5.6

The Enterprise Knowledge Platform API

Page 2: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

ii

Document Information

Document ID: EN049

Document title: EKP 5.6 The Enterprise Knowledge Platform API

Version: 4.6

Document date: 13 April 2009

This document may be revised from time to time. Please check NetDimensions

Support site at www.netdimensions.com/support for updates to this and other

documents or send an e-mail to [email protected] to request the most

recent version.

Please report any errors or feedback with this document by sending an e-mail to

[email protected].

Copyright Information

Copyright 2000-2009 by NetDimensions Ltd. All Rights Reserved.

Information in this document is subject to change without notice. The software

described herein is furnished under a license agreement, and it may be copied

only in accordance with the terms of that agreement. No part of this publication

may be reproduced, transmitted, or translated in any form or by any means without

the prior written permission of NetDimensions Ltd.

All company and product names used herein may be trademarks or registered

trademarks of their respective companies unless stated otherwise.

How to Contact NetDimensions Support

+852 2122 4588

1 866 206 6698 US toll-free number

+852 2122 4588

[email protected]

www.netdimensions.com/support

General Enquiries

+852 2122 4500

+852 2122 4588

[email protected]

www.netdimensions.com

Page 3: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

iii

Table of Contents

Table of Contents.............................................................................................................. iii

Overview ............................................................................................................................... 1

Authentication ..................................................................................................................... 2 Authentication Modes ......................................................................................................................2 Delegated Authentication...............................................................................................................3

Overview of Delegated Authentication.................................................................................3 Technical Approach...................................................................................................................3 EKP as Relying Party ....................................................................................................................4 EKP as Identity Provider ..............................................................................................................4

API Method Reference ...................................................................................................... 6 News Functions ...................................................................................................................................6

publicNews ...................................................................................................................................6 personalNews...............................................................................................................................6

Learning Record and Enrollment Functions ..................................................................................7 enrollments ...................................................................................................................................7 trainingHistoryXml ........................................................................................................................8 completedTrainingRecordsXml ................................................................................................8 learningStatusesCsv ....................................................................................................................8 contentHandler/trainingHistoryCsv..........................................................................................9 enrollmentHandler ......................................................................................................................9

Learning Module Functions ............................................................................................................10 catalog........................................................................................................................................10 module ........................................................................................................................................11 resourcesXml ..............................................................................................................................12 learningObjectsCsv...................................................................................................................12 learningObjects200405Csv ......................................................................................................13

User Functions ...................................................................................................................................13 user200510Xml............................................................................................................................13 users200510Xml ..........................................................................................................................14 usersCsv .......................................................................................................................................14 csUsersCsv...................................................................................................................................15 contentHandler/imsEnterprise ................................................................................................15 contentHandler/usersCsv ........................................................................................................19 contentHandler/ekpXml ..........................................................................................................20

HTTP Response Codes...................................................................................................... 22

Page 4: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

1

Overview

The Enterprise Knowledge Platform exposes its data via an Application

Programming Interface (API). The API is HTTP-based, and makes use of widely-

supported Web data formats such as XML, Atom and RSS. The API is intended to

conform to the design principles of Representation State Transfer (REST).

The API is intended to support at least the following scenarios:

• Integration with back end systems such as Human Resource Management

Systems;

• Integration with other Web sites and applications, such as portals, that are

built on server-side technologies such as Java, the Microsoft .NET Framework

or PHP;

• Access via browser-based technologies such as Ajax and Adobe Flash;

• Access via desktop applications (e.g. Adobe AIR, browser extensions); and

• Access via mobile applications (e.g. Android, Cocoa for iPhone).

Page 5: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

2

Authentication

Authentication Modes

Each API method utilizes one of the three authentication modes described below.

The appropriate mode for each API method is indicated in the Method Reference

section of this document.

• User Authentication

When calling a method that uses User Authentication, the caller must

authenticate using an EKP user account. The caller can authenticate in

either of the two ways listed below.

o The caller can supply the user ID and password of the user account

using HTTP basic access authentication. This technique is generally

appropriate for callers that are not browser-based—for example, for

server-to-server calls, or for desktop or mobile clients.

o The caller can include a standard EKP session cookie in the request.

This technique is appropriate for browser-based callers—for example,

Ajax or Adobe Flash clients—assuming that the user has already

logged into EKP via the browser.

In general, the result of calling a method that requires User Authentication

will depend on the permissions of the EKP user account that the caller uses to

authenticate.

• System Authentication

When calling a method that uses System Authentication, the caller must

supply a global system password using HTTP basic access authentication. The

value of the password is configured in the WEB-INF/conf/ekp.properties

configuration file using the authentication.key property. In this case, EKP

ignores the value of the supplied user name. However, some client and

server software will not forward the credentials if the user name is empty; for

this reason, we recommend supplying an arbitrary non-empty value for the

user name.

• Not Required

Some API methods provide access to public data that does not require

authentication. Note that the method might still return additional information

if the user is authenticated (using either of the two techniques described for

User Authentication above); however, the method is expected to return

some useful result even if the user is not authenticated.

Note that when using HTTP basic access authentication, credentials are passed in

what is essentially clear text. Therefore, the caller should always use SSL/TLS when

sending credentials using basic access authentication.

Page 6: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

3

Delegated Authentication

Overview of Delegated Authentication

Delegated authentication is a technique whereby one application relies on a

second application to authenticate the end user, thereby avoiding the need for

the user to log in to each application separately. Delegated authentication is

particularly useful when multiple Web sites are combined to provide a common

service.

In this document, we use the term identity provider to refer to a site that

authenticates the end user on behalf of one or more other sites, and relying party

to refer to a site that relies on an identity provider to authenticate the end user.

EKP can act as either an identity provider or a relying party in a delegated

authentication relationship.

As an example, consider a portal site that displays a list of the end user’s active

enrollments (obtained using EKP’s API), but then redirects the user to EKP to handle

tracking when the course is actually launched. Delegated authentication could be

used to avoid the need for the user to log into both the portal and EKP. If EKP is

acting as the identity provider, the user will use an EKP login to access both sites. If

EKP is acting as the relying party, the user will log in through the portal site to access

both sites.

Technical Approach

The basic technical approach used is the whether EKP is acting as identity provider

or relying party. The steps are as follows.

1. The end user attempts to access a protected resource within the relying

party. The relying party determines that the user is not yet authenticated.

2. The relying party generates a secure random one-time salt value, and stores

it in the user’s session.

3. The relying party redirects the user to a distinguished URL within the identity

provider (the provider URL), including the salt as the value of a query-string

parameter named salt. Optionally, the relying part may also provide a query

string parameter named callback, whose (URL-encoded) value is a URL that

the identity provider should redirect the user to after authenticating the user.

4. If the user is not currently authenticated with the identity provider, the

identity provider prompts the user to log in. If the user is already

authenticated with the identity provider, this step is skipped.

5. The identity provider redirects the user back to the relying party, using the

value of the callback parameter if provided in step 3, or a default URL

Page 7: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

4

otherwise. (N.B. The identity provider might wish to check that the host part

of the URL matches a whitelist of approved hosts, in order to prevent

arbitrary Web sites from discovering the user’s identity.) The identity provider

appends two query string parameters to this URL:

• userId: the identifier of the user as established by the identity provider;

and

• sig: a hex-encoded cryptographic hash of the string formed by

concatenating the user’s identifier, a shared secret, and the salt value.

(Regardless of whether EKP is acting as identity provider or relying party,

the shared secret is configured using the authentication.key property in

the WEB-INF/conf/ekp.properties configuration file. The hashing algorithm

is configured using the authentication.digestAlgorithm property; the

default is MD5.)

6. The relying party performs its own computation of the cryptographic hash,

and compares the result with the value provided by the query string

parameter. Authentication succeeds if and only if the values match.

EKP as Relying Party

In order to have EKP act as a relying party, configure the authentication.service.url

property in the WEB-INF/conf/ekp.properties configuration file to be the identity

provider URL, as in the example below.

authentication.service.url=http://portal.example.com/login.asp

The callback URL to be used by the identity provider can be found appending

servlet/ekp/authenticationTokenVerifier to the base URL of the EKP site. For

example, if the EKP site is at http://www.example.com/ekp/, then the callback URL

will be http://www.example.com/ekp/servlet/ekp/authenticationTokenVerifier.

As an example, an organization might provide an intranet set for which each

member of the organization has a user name and password. The site could provide

a link that would enable a user to navigate to EKP and access a specified list of

courses. When the user clicks the link, the site calls EKP’s usersCsv API function to

ensure that there is an EKP user account for the user, followed by EKP’s

enrollmentHandler API to ensure that the user is enrolled in the specified courses.

Finally, the site redirects the user to EKP, which uses delegated authentication to

establish the user’s identity and display his or her active enrollments.

EKP as Identity Provider

In order to use EKP as an identity provider, the relying party should use an identity

provider URL formed by appending servlet/ekp/authenticate to the base URL of the

Page 8: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

5

EKP site. For example, if the EKP site is at http://www.example.com/ekp/, then the

identity provider URL will be

http://www.example.com/ekp/servlet/ekp/authenticate.

The default callback URL for the relying party can be configured using the

authentication.callback.url property in the WEB-INF/conf/ekp.properties

configuration file, as in the example below.

authentication.callback.url=http://www.example.com/authcallback.php

As an example, an application might be developed that displays a highly-

customized view of a learner’s training plan including his or her current progress. The

application could use delegated authentication to establish the user’s identity, and

then call EKP’s trainingHistoryXml API function to determine the user’s progress in the

various courses in their plan so that the training plan can be presented

appropriately.

Page 9: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

6

API Method Reference

Note: This document describes the most commonly used API methods. To see a

complete, current list of methods, access EKP’s API Explorer tool by appending api/

to the base URL of your EKP site. For example, if your EKP site were located at

http://www.example.com/ekp/, you could access the API Explorer at

http://www.example.com/ekp/api/. The API Explorer also enables you learn about

the API by invoking its methods interactively.

URLs are specified relative to the base URL of the EKP site. For example, if the base

URL of the EKP site is http://www.example.com/ekp/ then the absolute URL of the

publicNews API function (for which the URL is specified as api/publicNews) will be

http://www.example.com/ekp/api/publicNews.

Parameter values should be converted to UTF-8 and URL-encoded.

News Functions

publicNews

Returns a feed of public news articles, equivalent to those that would be shown on

EKP’s login page.

Authentication Mode: not required

URL: api/publicNews

Method: GET

Parameters:

• format: atom for Atom 1.0, rssteasers for RSS 2.0 with teasers, rssfull

for RSS 2.0 with full text.

Response Content Type: application/rss+xml or application/atom+xml

personalNews

Returns a feed of personalized news articles for a given user, equivalent to those

that would be shown on the News tab of a user’s Home Page.

Authentication Mode: user authentication

Page 10: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

7

URL: api/personalNews

Method: GET

Parameters:

• userId: The ID of a user.

• format: atom for Atom 1.0, rssteasers for RSS 2.0 with teasers, rssfull

for RSS 2.0 with full text.

Response Content Type: application/rss+xml or application/atom+xml

Learning Record and Enrollment Functions

enrollments

Returns a list of active enrollments for a given user in XML format.

Authentication Mode: user authentication

URL: api/enrollments

Method: GET

Parameters:

• userId: The ID of a user.

Response Content Type: application/xml

Response Schema: xsd/trainingHistory.xsd

Sample Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<trainingHistory

xmlns="http://www.netdimensions.com/2005/10/trainingHistory">

<dateCreated>2009-04-30T18:47:24.505+08:00</dateCreated>

<trainingRecord id="EKP000006574">

<userId>ndadmin</userId>

<learningModule>

<id>SingleCourseManifest</id>

<title>Maritime Navigation</title>

</learningModule>

<enrollmentDate>2009-04-17T18:03:59.054+08:00</enrollmentDate>

<startDate>2009-04-17T18:04:07.926+08:00</startDate>

<overallStatus>incomplete</overallStatus>

<lastAttemptDate>2009-04-17T18:04:07.926+08:00</lastAttemptDate>

<attemptCount>1</attemptCount>

<isSelfEnrolled>true</isSelfEnrolled>

</trainingRecord>

... truncated ...

</trainingHistory>

Page 11: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

8

trainingHistoryXml

Returns a list of all training records for a given user (or for all users if userId is not

specified), including both active and completed modules, in XML format.

Authentication Mode: user authentication

URL: api/trainingHistoryXml

Method: GET

Parameters:

• userId: Optional. The ID of a user.

Response Content Type: application/xml

Response Schema: xsd/trainingHistory.xsd

Sample Response: (see enrollments)

completedTrainingRecordsXml

Returns training records for completed modules for a given user (or for all users if

userId is not specified) in XML format.

Authentication Mode: user authentication

URL: api/completedTrainingRecordsXml

Method: GET

Parameters:

• userId: Optional. The ID of a user.

Response Content Type: application/xml

Response Schema: xsd/trainingHistory.xsd

Sample Response: (see enrollments)

learningStatusesCsv

Returns information about all training records/transcripts in CSV (comma delimited)

format, suitable for import into Exxceed CompetencySuite.

Authentication Mode: system authentication

Page 12: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

9

URL: api/learningStatusesCsv

Method: GET

Parameters:

• charset: The character encoding for the returned data.

Response Content Type: text/csv

contentHandler/trainingHistoryCsv

This simple comma-delimited text (CSV) format allows training records to be added

and modified. It can also be used to enrol users in existing courses. For details, refer

to the Training History Import/Export document

(EN145_EKP_TrainingHistoryImportExport_V1.0.pdf).

Authentication Mode: system authentication

URL: contentHandler/trainingHistoryCsv

Method: POST

Request Content Type: text/csv

Sample Request:

USERID,LEARNINGID,LOTITLE,STARTDATE,ENDDATE,STUDENTSTATUS,CREATESESSION

ray,PRJ101,Project Management Workshop,20-01-2004,23-01-2004,Pass,true

rob,JAV188,Java Security,31-06-2003,02-07-2003,Pass,true

cathy,CRS77,Courseware Standards,01-12-20003,01-12-2003,Fail,true

enrollmentHandler

Enables an external system to submit enrolment requests to EKP.

Authentication Mode: system authentication

URL: enrollmentHandler

Method: POST

Request Content Type: text/csv

Response Content Type: text/csv

Sample Request:

"USERID","LEARNINGID"

"joestudent","Course_1"

"marylearner","Course_2"

"johnfreshman","Program_1"

Sample Response:

Page 13: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

10

"USERID","LEARNINGID","ENROLLMENTSTATUS"

"joestudent","Course_1","true"

"marylearner","Course_2","false"

"johnfreshman","Program_1","true"

Learning Module Functions

catalog

Returns information about a catalog in XML format. Includes information about the

catalog’s ancestors and children and the modules it contains. If the caller is not

authenticated, only public catalogs will be returned.

Authentication Mode: not required

URL: api/catalog

Method: GET

Parameters:

• id: The ID of a catalog (*ROOT* for the top-level catalog).

Response Content Type: application/xml

Sample Response:

<?xml version="1.0" encoding="UTF-8"?>

<catalog children="1" modules="1">

<title>US</title>

<link rel="self" type="application/xml">

http://example.com/ekp/api/catalog?id=4

</link>

<link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?TX=STRUCTUREDCATALOG&amp;CAT=4

</link>

<parent children="5" modules="0">

<title>Top</title>

<link rel="self" type="application/xml">

http://example.com/ekp/api/catalog?id=*ROOT*

</link>

<link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?TX=STRUCTUREDCATALOG&amp;CAT=*ROOT*

</link>

</parent>

<child children="0" modules="0">

<title>Austin</title>

<link rel="self" type="application/xml">

http:// example.com/ekp/api/catalog?id=EKP000006455

</link>

<link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?TX=STRUCTUREDCATALOG&amp;CAT=5

</link>

Page 14: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

11

</child> <module>

<id>us015</id>

<title>US Training</title>

<link rel="self" type="application/xml">

http://example.com/ekp/api/module?id=us015

</link>

<link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?CID=us015&amp;TX=FORMAT1

</link>

<image></image>

<type>learningProgram</type>

<description></description>

</module>

</catalog>

module

Returns information about a program or module in XML format. Includes information

about the module or program’s scheduled sessions, if any.

Authentication Mode: not required

URL: api/module

Method: GET

Parameters:

• id: The ID of a module.

Response Content Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>

<module>

<id>us015</id>

<title>US Training</title>

<link rel="self" type="application/xml">

http://example.com/ekp/api/module?id=us015

</link>

<link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?CID=us015&amp;TX=FORMAT1

</link>

<image></image>

<type>learningProgram</type>

<subject>Unassigned</subject>

<language>English</language>

<description></description>

<info></info>

<session>

<id>s2</id>

<module>

<id>ekpadmincr</id>

<title>EKP Administrator Training - Classroom</title>

<link rel="self" type="application/xml">

http://example.com/ekp/api/module?id=ekpadmincr

Page 15: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

12

</link> <link rel="alternate" type="text/html">

http://example.com/ekp/servlet/ekp?CID=ekpadmincr&amp;TX=FORMAT1

</link>

<type>classroom</type>

<start>2009-05-06T09:00:00.000+01:00</start>

<end>2009-05-08T17:00:00.000+01:00</end>

<region>London, UK</region>

<instructor>

<id>netd_instructor</id>

<family>NetDimensions</family>

<given>Instructor</given>

</instructor>

<institute></institute>

<location>London Training Centre</location>

<deadline>2009-04-23T20:00:00.000+01:00</deadline>

<seats>10</seats>

<status>cancelled</status>

<link rel="enroll" type="text/html">

http://example.com/ekp/servlet/ekp?TX=REGISTER&amp;EID=EKP000001201

&amp;PX=N&amp;LID=ekpadmincr&amp;DTE=May+6%2C+2009+9%3A00+AM+BST

&amp;EDTE=May+8%2C+2009+5%3A00+PM+BST&amp;LRNTYPE=R

</link>

</module>

... truncated ...

<link rel="enroll" type="text/html">

http://example.com/ekp/servlet/ekp?TX=REGISTER&amp;EID=s2&amp;LID=us015

&amp;SID=s2&amp;LRNTYPE=C&amp;PX=N

</link>

</session>

... truncated ...

</module>

resourcesXml

Returns summary information about all learning modules in XML format.

Authentication Mode: system authentication

URL: api/resourcesXml

Method: GET

Parameters: None

Response Content Type: application/xml

Response Schema: xsd/resources.xsd

learningObjectsCsv

Page 16: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

13

Returns information about all learning modules in CSV (comma delimited) format,

suitable for import into early versions of Exxceed CompetencySuite 5.

Authentication Mode: system authentication

URL: api/learningObjectsCsv

Method: GET

Parameters:

• charset: The character encoding for the returned data.

Response Content Type: text/csv

learningObjects200405Csv

Returns information about all learning modules in CSV (comma delimited) format,

suitable for import into recent versions of Exxceed CompetencySuite 5.

Authentication Mode: system authentication

URL: api/learningObjects200405Csv

Method: GET

Parameters:

• charset: The character encoding for the returned data.

Response Content Type: text/csv

User Functions

user200510Xml

Returns information about a single user in XML format.

Authentication Mode: system authentication

URL: api/user200510Xml

Method: GET

Parameters:

• userId: The ID of a user.

Response Content Type: application/xml

Response Schema: xsd/users200510.xsd

Page 17: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

14

Sample Response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<users xmlns="http://www.netdimensions.com/2005/10/users">

<user>

<id>joestudent</id>

<familyName>Student</familyName>

<givenName>Joe</givenName>

<otherName/>

<gender>male</gender>

<email>[email protected]</email>

<locale>en</locale>

<role>

<id>S</id>

<name>Learner</name>

</role>

<employeeNumber/>

<organization>

<id>EKP9999999</id>

<name>UNASSIGNED</name>

</organization>

<attribute>

<code>0</code>

<description>Unassigned</description>

</attribute>

... truncated ...

</user>

</users>

users200510Xml

Returns information about all users in XML format.

Authentication Mode: system authentication

URL: api/users200510Xml

Method: GET

Parameters: None

Response Content Type: application/xml

Response Schema: xsd/users200510.xsd

Sample Response: (see user200510Xml)

usersCsv

Returns information about all users in a generic CSV (comma delimited) format.

Page 18: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

15

Authentication Mode: system authentication

URL: api/usersCsv

Method: GET

Parameters:

• charset: The character encoding for the returned data.

Response Content Type: text/csv

csUsersCsv

Returns information about all users in CSV (comma delimited) format, suitable for

import into Exxceed CompetencySuite.

Authentication Mode: system authentication

URL: api/csUsersCsv

Method: GET

Parameters:

• charset: The character encoding for the returned data.

Response Content Type: text/csv

contentHandler/imsEnterprise

Based on the IMS Enterprise Version 1.1 Final XML Binding specification, this format

allows for addition, modification and deletion of users (including organization

memberships and direct appraisers in addition to basic properties and contact

details), and addition, modification and deletion of organizations.

For details, refer to the Specification for EKP User Management APIs document

(EN035_Specification_for_EKP_User_Management_API_4.0.pdf).

Authentication Mode: system authentication

URL: contentHandler/imsEnterprise

Method: POST

Parameters: None

Request Content Type: application/xml

Request Schema: dtd/ims_epv1p1.dtd

Sample Request:

<?xml version="1.0" encoding="UTF-8"?>

Page 19: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

16

<enterprise>

<!--

The properties element is required by IMS Enterprise but is not

used by EKP.

-->

<properties>

<datasource>PeopleSoft</datasource>

<datetime>2002-11-11</datetime>

</properties>

<!--

One person element should be supplied for each user to be

modified. recstatus 1 = Add; 2 = Update; 3 = Close Account.

-->

<person recstatus="1">

<!--

The sourcedid element is required. source is not used by EKP;

id must match EKP user ID.

-->

<sourcedid>

<source>PeopleSoft</source>

<id>rob</id>

</sourcedid>

<!--

The userid element is required by EKP when creating a new user;

not required for updates. The value should match the id element

above; password must be supplied.

-->

<userid password="123456">rob</userid>

<!--

A userid element with a useridtype of employeenumber is

interpreted as Employee Number.

-->

<userid useridtype="employeenumber">1234567890</userid>

<!-- The name element is required by IMS Enterprise. -->

<name>

<!--

The fn element is required by IMS Enterprise but not used by

EKP. (EKP uses the family, given and other name parts below.)

-->

<fn>Robert Michael Lowe</fn>

<n>

<family>Lowe</family>

<given>Robert</given>

<other>Michael</other>

<prefix>Mr.</prefix>

</n>

</name>

<demographics>

<!-- 0 = Unknown; 1 = Female; 2 = Male. -->

<gender>2</gender>

<bday>1973-01-16</bday>

</demographics>

<email>[email protected]</email>

<!-- Only one telephone number is allowed. -->

<tel>+852 2122 4505</tel>

<adr>

Page 20: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

17

<!-- Company Name --> <extadd>Dunelm Services Limited</extadd>

<!-- Address 1 -->

<street>34 Acorn Drive</street>

<!-- Address 2 -->

<street>Stannington</street>

<!-- City -->

<locality>Sheffield</locality>

<!-- Province/State -->

<region>S.Yorks</region>

<!-- Postal Code -->

<pcode>S7 6WA</pcode>

<country>UK</country>

</adr>

<photo>

<extref>http://www.netdimensions.com/staff/rob.jpg</extref>

</photo>

<!--

A systemroletype of SysAdmin or A is interpreted as an EKP role

of System Administrator; any valid role ID or role name is

permitted.

-->

<systemrole systemroletype="Manager"></systemrole>

<!-- EKP extensions to IMS Enterprise. -->

<extension>

<!-- Options. -->

<costcenter>Engineering</costcenter>

<!-- Use External Mail. -->

<useexternalmail>yes</useexternalmail>

<!-- User Attributes. -->

<attribute index="1">vanilla</attribute>

<attribute index="2">chocolate</attribute>

<attribute index="3">strawberry</attribute>

<attribute index="4">macadamia</attribute>

<attribute index="5">raspberry</attribute>

<attribute index="6">cappuccino</attribute>

<attribute index="7">mango</attribute>

<attribute index="8">toffee</attribute>

<!-- User Options. -->

<option index="1">red</option>

<option index="2">green</option>

<option index="3">blue</option>

<!-- External Authentication. -->

<externalauthentication>yes</externalauthentication>

<!-- Additional properties -->

<hrmanagername>Jimi Hendrix</hrmanagername>

<hrmanageremail>[email protected]</hrmanageremail>

<managername>Bruce Springsteen</managername>

<manageremail>[email protected]</manageremail>

<departmentname>Groovy Dept.</departmentname>

<departmentid>groove1</departmentid>

<language>fr_CA</language>

</extension>

</person>

<!--

A membership element can be used to associate one or more users

with an organizational unit.

Page 21: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

18

--> <membership>

<!--

The sourcedid element is required. source is not used by EKP;

id must consist of the prefix organization: followed by a

comma-separated list of level codes (e.g. NETD,HK,ENG).

-->

<sourcedid>

<source>EKP</source>

<id>organization:NETD,HK,ENG</id>

</sourcedid>

<!--

One member element should be supplied for each user to be

associated with this organizational unit. It is not necessary

to supply elements for users already associated with this

organizational unit. Since each user is associated with exactly

one organizational unit, the recstatus attribute is

unnecessary; an existing association is implicitly deleted when

the user is associated with a new organizational unit.

-->

<member>

<!--

The sourcedid element is required. source is not used by EKP;

id must match EKP user ID for the user to be associated with

this organizational unit.

-->

<sourcedid>

<source>PeopleSoft</source>

<id>rob</id>

</sourcedid>

<!--

The idtype element is required by IMS Enterprise. Must be 1

(Person) since EKP does not support administration of

organization hierarchies using IMS Enterprise at this time.

-->

<idtype>1</idtype>

<!-- The role element is required by IMS Enterprise. -->

<role>

<!-- subrole maps to EKP's Job Title -->

<subrole>Senior Software Engineer</subrole>

<!--

The status element is required by IMS Enterprise. A value

of 0 means Inactive (Suspended); a value of 1 means Active.

-->

<status>1</status>

<!-- datetime maps to EKP's Join Date. -->

<datetime>2000-11-27</datetime>

</role>

</member>

</membership>

<!--

A membership element can be used to assign appraisees to a direct

appraiser.

-->

<membership>

<!--

The sourcedid element is required. source is not used by EKP;

Page 22: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

19

id must consist of the prefix appraisees: followed by user ID of direct appraiser.

-->

<sourcedid>

<source>EKP</source>

<id>appraisees:ndadmin</id>

</sourcedid>

<!--

One member element should be supplied for each user to be

associated with this direct appraiser. It is not necessary to

supply elements for users already associated with this direct

appraiser. Since each user is associated with at most one

direct appriaser, the recstatus attribute is unnecessary; an

existing association is implicitly deleted when the user is

associated with a new direct appraiser.

-->

<member>

<!--

The sourcedid element is required. source is not used by EKP;

id must match EKP user ID for the user to be associated with

this direct appraiser.

-->

<sourcedid>

<source>PeopleSoft</source>

<id>rob</id>

</sourcedid>

<!--

The idtype element is required by IMS Enterprise. Must be 1

(Person).

-->

<idtype>1</idtype>

<!-- The role element is required by IMS Enterprise. -->

<role>

<!-- The status element is required by IMS Enterprise. -->

<status>1</status>

</role>

</member>

</membership>

</enterprise>

contentHandler/usersCsv

This comma-delimited text (CSV) format allows for the addition, modification and

deletion of users. This is the same format used by the CSV User Data Loader.

For details, refer to the Data Uploading Guide

(EN029_EKP_Data_Uploading_Guide_V1_5.pdf).

Authentication Mode: system authentication

URL: contentHandler/usersCsv

Method: POST

Parameters: None

Page 23: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

20

Request Content Type: text/csv

contentHandler/ekpXml

This XML format allows for the addition, modification and deletion of users and

learning objects.

For details, refer to the Data Uploading Guide

(EN029_EKP_Data_Uploading_Guide_V1_5.pdf).

Authentication Mode: system authentication

URL: contentHandler/ekpXml

Method: POST

Parameters: None

Request Content Type: application/xml

Sample Request:

<?xml version="1.0" encoding="UTF-8"?>

<DOCUMENT>

<USER ACTIONS="CREATE">

<USERID>steve</USERID>

<PERSONTITLE>MR</PERSONTITLE>

<GNAME>HOLMES</GNAME>

<FNAME>STEVE</FNAME>

<OTHERNAME>AppsManager</OTHERNAME>

<PERSONTITLE>MR</PERSONTITLE>

<JOINDATE>1999-04-01 00:00:00</JOINDATE>

<DAPPRAISER>ray</DAPPRAISER>

<LEVEL1>NetD</LEVEL1>

<LEVEL1DESC>NetDimensions</LEVEL1DESC>

<LEVEL2>Eng</LEVEL2>

<LEVEL2DESC>Engineering</LEVEL2DESC>

<LEVEL3>AppDev</LEVEL3>

<LEVEL3DESC>Application Development</LEVEL3DESC>

<EMPNO>2</EMPNO>

<JOBTITLE>APPLICATION DEVELOPMENT MANAGER</JOBTITLE>

<EMAIL>[email protected]</EMAIL>

<EXTAUTHENTICATION>N</EXTAUTHENTICATION>

<EXTERNALMAIL>N</EXTERNALMAIL>

<COSTCENTER>Cost center 1</COSTCENTER>

<DEPARTMENT>Engineering</DEPARTMENT>

<CITY>Hong Kong</CITY>

<PROVINCESTATE>(None)</PROVINCESTATE>

<POSTALCODEZIP>(None)</POSTALCODEZIP>

<COUNTRY>HKG</COUNTRY>

<GENDER>MALE</GENDER>

</USER>

<USER ACTIONS="CREATE">

<USERID>ray</USERID>

<PERSONTITLE>MR</PERSONTITLE>

Page 24: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

21

<GNAME>RUFF</GNAME>

<FNAME>RAY</FNAME>

<OTHERNAME>CTO</OTHERNAME>

<JOINDATE>1997-01-01 00:00:00</JOINDATE>

<DAPPRAISER />

<LEVEL1>NetD</LEVEL1>

<LEVEL1DESC>NetDimensions</LEVEL1DESC>

<EMPNO>1</EMPNO>

<JOBTITLE>CHIEF TECHNICAL OFFICER</JOBTITLE>

<EMAIL>[email protected]</EMAIL>

<EXTAUTHENTICATION>N</EXTAUTHENTICATION>

<EXTERNALMAIL>N</EXTERNALMAIL>

<COSTCENTER>Cost center 2</COSTCENTER>

<DEPARTMENT>Engineering</DEPARTMENT>

<CITY>Hong Kong</CITY>

<PROVINCESTATE>(None)</PROVINCESTATE>

<POSTALCODEZIP>(None)</POSTALCODEZIP>

<COUNTRY>HKG</COUNTRY>

<GENDER>MALE</GENDER>

<SUPERVISES>Engineering</SUPERVISES>

</USER>

</DOCUMENT>

Page 25: The Enterprise Knowledge Platform API€¦ · EKP 5.6: The Enterprise Knowledge Platform API April 2009 1 Overview The Enterprise Knowledge Platform exposes its data via an Application

EKP 5.6: The Enterprise Knowledge Platform API April 2009

22

HTTP Response Codes

The Enterprise Knowledge Platform API attempts to return appropriate HTTP status

codes for every request. You might encounter the following response codes.

• 200 OK: The request was processed successfully, and the response contains

the requested data (if appropriate).

• 204 No Content: The request was processed successfully, but the function

does not return any response data.

• 400 Bad Request: The request was invalid. For example, a required

parameter was omitted, or a parameter value was not in the expected

format.

• 401 Unauthorized: The method requires authentication credentials and none

were supplied, or the supplied credentials were not valid.

• 403 Forbidden: Your license does not permit API access.

• 404 Not Found: The URL path does not correspond with a valid API function.

• 405 Method Not Allowed: The caller sent a request using an HTTP method

that is not supported by the API function, for example attempting to use HTTP

GET to access an API function that requires HTTP POST.

• 410 Gone: The caller attempted to access an API function that was

available in an earlier version of EKP, but is no longer supported.

• 500 Internal Server Error: The request was valid, but EKP was unable to

process it due to a bug or misconfiguration. More details can usually be

found in the log file.