Sei sulla pagina 1di 7

Specification for Curriculum Item Status Web Service

1.1 Introduction
The Curriculum Item Status web service is intended to provide the status of items/sub-curricula/requirements in curricula for displaying
them in the customer portal.

1.2 General Technical Design


The web service is designed to adhere to the principles of REST.
A RESTful web service (also called a RESTful web API) is a web service implemented using HTTP. It is a collection of resources, with
four defined aspects:
 The base URI for the web service, such as http://example.com/resources/. Please refer the service invocation section below to
find out the URI for this web service API.
 The Internet media type of the data supported by the web service. This web service will return JSON type of response object.
 The set operations supported by the web service using HTTP methods (e.g., GET).
 The API must be hypertext driven.

1.3 Deprecation
As of May 5, 2015, all new customer / new webservices implementations are required to use OData
APIs for integrations (http://help.sap.com/hr_api/). This guide will remain available and RESTful web
services will continue to be supported (but no longer enhanced) for customers that had already
implemented a solution based on the RESTful APIs prior to May 5, 2015.

1.4 Functional Specifications


Service Name
This web service is curriculum-item-status

Authentication Mechanism
Webservice client will access the token provider tool in the LMS to get the user based token which later on will be passed with rest
API call. A Secret Key will be shared between LMS token provider and webservice client and will be used for authentication when web
service client is requesting for the token.

I18n Requirements (Localization)


Locale of the user passed to generate the token will be the locale for the Web service API call.

Service Invocation
RESOURCE DESCRIPTION
https://(learning server)/learning/public-api/rest/v1/current-user/curriculum-item-
Request URL
status?targetUserID=<value>&curriculumID=<value>&rootCurriculumID=<value>
Request Method GET
Description Get Curriculum Item Status.
Request Header Accept: application/json (Optional)
Parameters None
Request Body None
RESPONSE HEADER 200: OK. Or ERROR see HTTP error codes.
RestOperationStatusVOX object (This response object will have
RESPONSE Body List<CurriculumItemStatusDTO> put in its "data" field. CurriculumItemStatusDTO will contain
all the output parameters given below as Key/value pair)

SuccessFactors Confidential Page 1 of 7


User Curricula Item Status Web Service
Inputs
Inputs are supplied to the REST API via request query-string parameters.
# Input Parameter Required? Description Details/Business Rules
1 targetUserID [STUD_ID] N This is the ID of the  Must be a valid user id in LMS, if
user provided
 If this field is blank, the user id in the
token will be used, if the token is
generated for users.
 If the token is generated for an admin,
targetUserID is a must. If it is blank,
the related user will be used.
 If the token is generated for user, then
the target user id can be left blank or it
should be the same user as the token
user.
2 curriculumID
1 [QUAL_ID] Y This is the ID for the Must be a valid curricula ID in LMS.
curricula.
Data Type:
VARCHAR2(90)
3 rootCurriculumID [QUAL_ID] Y This is the ID of the This is the ID of the root curricula and not the
root curricula parent curricula. It is the topmost curricula in the
student curricula association.

Please note that the parent curricula and root


curricula need not be same.

For eg: Curr14 is the root curricula for all the


curricula irrespective of their depth from Curr14.

 When you are fetching the details of


Curr14, the curriculumID and
rootCurriculumID will be same.
 When you are fetching the details of
Curr15 (any level), the curriculumID
will be Curr15 and rootCurriculumID
will be Curr14.

Outputs
RestOperationStatusVOX
Field Description
Operation Operation name
Status Success/Fail
Data Data returned (as described in Response body above in service invocation section)
Errors Json errors (if any)
Warnings Json warnings (if any)

The HTTP Response Code is used as a primary indicator of the success or failure of the API call:
HTTP Error Code Description
400 Bad request – invalid or missing inputs

SuccessFactors Confidential Page 2 of 7


User Curricula Item Status Web Service
HTTP Error Code Description
401 Unauthorized – authentication credential is missing or incorrect
403 Forbidden – you are not allowed to perform this operation
404 Not found – the API itself does not exist
500 Internal server error

Validations
Error Code Error Message
500 User do not have access to other user’s details.
500 Curriculum ID cannot be null.
500 Root Curriculum ID cannot be null.
500 The user ID does not exist in the LMS
500 The user is an inactive user.
500 The curriculum ID does not exist in the LMS.
500 The root curriculum ID does not exist in the LMS.
500 The curriculum is an inactive curriculum.
500 The root curriculum is an inactive curriculum.
500 The root curriculum is not a root for the Curriculum.
500 User does not have access to curriculum status workflow.
500 Admin does not have access to “View Curriculum Assigned To User” workflow.
500 Curriculum ID is not associated to the user.
500 User does not have any Items in the associated Curriculum.

Output will be in JSON format and contains the following data elements:
No Parameter Name Data Type Description
1 curriculaID String Curricula ID

2 curriculaDesc String Curricula Description


3 htmlCurriculaDesc String HTML Description of the curricula
4 rootCurriculaID String Curricula Root ID

5 itemTypeID String Item Type ID within the LMS

6 itemID String Item ID within the LMS

7 revDate Timestamp Item Revision Date in milliseconds in DB timezone

8 itemTitle String Item Title


9 assignmentType String Assignment Type ID in LMS

10 displayOrder Number
SEQ_ORDER for the items to be displayed. The order
defined in the Curricula – Contents page specifying the
order in which the items should be displayed within that
specific curricula/sub-curricula
11 globalDisplayOrder String The display order of the items/sub-curricula/requirements from
the given Curricula ID. See the attached response where the
globalDisplayOrder is calculated from the first record in the
response
12 completionDate Timestamp Completion Date of the item in milliseconds in DB timezone
SuccessFactors Confidential Page 3 of 7
User Curricula Item Status Web Service

13 completionStatus String Completion Status


14 requiredDate Timestamp Required By Date in milliseconds in DB timezone
15 expiryDate Timestamp Expiration Date in milliseconds in DB timezone
16 failureCompletionSt String Failure Status
atusId
17 failureDate Timestamp Failure Date in milliseconds in DB timezone
18 requirementID String Requirement ID
19 requirementDesc String Requirement Desc
20 requirementTypeID String Requirement Type
21 requirementSequence Number Requirement Sequence No. Primary key identifying a
Number requirement.
22 nextAction String Next Action Text
23 numberOfHours Number Total number of hours required to complete the requirement
24 numberOfComponents Number Total number of components required to complete the
requirement
25 completedNumberOfHo Number Total number of hours completed in this requirement
urs
26 completedNumberOfCo Number Total number of components completed in this requirement
mponents
27 assignedDate String Assignment Date in milliseconds in DB timezone
28 hourTypeID String Hour Type of the Requirement (Contact, Total, Credit or CPE
hours)
29 curriculaRequiremen CurriculumR Array of items in the requirement item DTO
tItems equirementIt (CurriculumRequirementItemDTO)
emDTO []

CurriculumRequirementItemDTO
No Parameter Name Data Type Description
1 itemTypeID String Item Type ID within the LMS

2 itemID String Item ID within the LMS

3 revDate Timestamp Item Revision Date in milliseconds in DB timezone

4 itemTitle String Item Title


5 completionDate Timestamp Completion Date of the item in milliseconds in DB timezone

6 completionStatus String Completion Status – either Complete or InComplete


7 completedHours Number Hours gained for completing this item. It could be Contact, Total,
Credit or CPE hours. You can get that information from the
hourTypeID of the requirement.
8 displayOrder Number The order of items with in the given requirement
9 globalDisplayOrder String The order of items with in the requirement but calculated from
the curricula. See the attached response where the
globalDisplayOrder is calculated from the first record in the
response.

The output will be like

{
restOperationStatusVOX: {
errors: null

SuccessFactors Confidential Page 4 of 7


User Curricula Item Status Web Service
status: "SUCCESS"
operation: null
data: {
REST_RETURN_DATA: [3]
0: {
hourTypeID: "Contact Hours"
curriculaID: "CR-001"
curriculaDesc: null
htmlCurriculaDesc: null
rootCurriculaID: "CR-001"
itemTypeID: null
itemID: null
revDate: null
itemTitle: null
assignmentType: null
displayOrder: 1
completionDate: 1381840860000
completionStatus: "Complete"
requiredDate: null
expiryDate: null
failureCompletionStatusId: null
failureDate: null
requirementID: "REQ-001"
requirementTypeID: "# Hours of specified Hour Type"
requirementDesc: "REQ-001-desc"
requirementSequenceNumber: 101
nextAction: null
assignedDate: 1381809600000
curriculaRequirementItems: null
numberOfHours: 12
numberOfComponents: null
completedNumberOfHours: 12
completedNumberOfComponents: null
globalDisplayOrder: "000001"
}-
1: {
hourTypeID: "Credit Hours"
curriculaID: "CR-001"
curriculaDesc: "CR-001-desc"
htmlCurriculaDesc: null
rootCurriculaID: "CR-001"
itemTypeID: null
itemID: null
revDate: null
itemTitle: null
assignmentType: null
displayOrder: 2
completionDate: 1380727800000
completionStatus: "Complete"
requiredDate: null
expiryDate: null
failureCompletionStatusId: null
failureDate: null
requirementID: "REQ-002"
requirementTypeID: "# Hours of specified Hour Type from Pool of Items"
requirementDesc: null
requirementSequenceNumber: 102
nextAction: null
assignedDate: 1381809600000
curriculaRequirementItems: [2]

SuccessFactors Confidential Page 5 of 7


User Curricula Item Status Web Service
0: {
itemTypeID: "Course"
itemID: "it1"
revDte: 1381345860000
itemTitle: "it1-title~`!@#$%^&*() _-+={[}]:; " <,'>?/|\"
completionDate: 1381159800000
completionStatus: "Complete"
completedHours: 4
displayOrder: 1
globalDisplayOrder: "000002.000001"
}-
1: {
itemTypeID: "Course"
itemID: "it2"
revDte: 1381401780000
itemTitle: "it2-title"
completionDate: 1380727800000
completionStatus: "Complete"
completedHours: 4
displayOrder: 2
globalDisplayOrder: "000002.000002"
}-
-
numberOfHours: 8
numberOfComponents: null
completedNumberOfHours: 8
completedNumberOfComponents: null
globalDisplayOrder: "000002"
}-
2: {
hourTypeID: null
curriculaID: "CR-001"
curriculaDesc: "CR-001-desc"
htmlCurriculaDesc: null
rootCurriculaID: "CR-001"
itemTypeID: null
itemID: null
revDate: null
itemTitle: null
assignmentType: null
displayOrder: 3
completionDate: 1380641400000
completionStatus: "Complete"
requiredDate: null
expiryDate: null
failureCompletionStatusId: null
failureDate: null
requirementID: "REQ-003"
requirementTypeID: "# Items from Pool of Items"
requirementDesc: "REQ-003-desc"
requirementSequenceNumber: 103
nextAction: null
assignedDate: 1381809600000
curriculaRequirementItems: [2]
0: {
itemTypeID: "Course"
itemID: "it3"
revDte: 1381402560000
itemTitle: "it3-t"
completionDate: 1380641400000

SuccessFactors Confidential Page 6 of 7


User Curricula Item Status Web Service
completionStatus: "Complete"
completedHours: 0
displayOrder: 1
globalDisplayOrder: "000003.000001"
}-
1: {
itemTypeID: "Course"
itemID: "it4"
revDte: 1381414440000
itemTitle: "it4-title"
completionDate: null
completionStatus: "Incomplete"
completedHours: 0
displayOrder: 2
globalDisplayOrder: "000003.000002"
}-
-
numberOfHours: null
numberOfComponents: 1
completedNumberOfHours: null
completedNumberOfComponents: 1
globalDisplayOrder: "000003"
}-
-
}-
warnings: null
}-
}

SuccessFactors Confidential Page 7 of 7

Potrebbero piacerti anche