Sei sulla pagina 1di 4

Specification for Item Prerequisites Web Service

1.1 Introduction
The Item Prerequisites web service is intended to externalize Item Prerequisite details for a customer’s portal. This web service will
return an Item’s Prerequisites listing, including prerequisite Groups and ordering of the Item Prerequisites. The design is based upon
the capabilities and constraints of Item Prerequisites in the SuccessFactors Learning user interface.

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, PUT, POST, or DELETE).
• 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 Get tem Prerequisites Service

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.
Authorization
The webservice check for the Item is available in User’s Catalog.

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
http://(learning server)/learning/public-api/rest/v1/current-user/learning-item/item/prerequisities?
Request URL
itemID={ itemID }&itemTypeID={ itemTypeID }&revisionDate ={revisionDate}
Request Method GET
Description Retrieves the Item Prerequisites
Request Header Accept: application/json (Optional)
itemID : Required, String;
itemTypeID : Required, String;
Parameters
revisionDate : : Required,Integer. timestampInMilliseconds. Same as the revision date in Item
details deeplink.
Request Body None.
RESPONSE HEADER 200: OK. or ERROR see HTTP error codes.
SuccessFactors Confidential Page 1 of 4
Item Prerequisites Web Service
RestOperationStatusVOX object (This response object will have List<ItemPrerequisitesDTO> put
RESPONSE Body in its "data" field. ItemPrerequisitesDTO will contain all the output parameters given below as
Key/value pair)

Inputs
Inputs are supplied to the REST API via request query-string parameters.
# Input Parameter Required? Description Details/Business Rules
1. Item Type Y Item Type Must align to the Item Type ID defined within
the LMS’ Reference Values
Data Type:
VARCHAR2(90)
2. Item ID Y Item ID Must be a valid Item ID in the LMS

Data Type:
VARCHAR2(90)
3. Item Revision Date Y Revision Date Must align to the revision date of the item
being queried.
Data Type:
Timestamp Format in
milliseconds: 13 Bytes

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
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 Item ID cannot be null
500 Item Type ID cannot be null
500 Revision Date cannot be null
500 No prerequisites found for Item
500 User does not have access to requested Item

SuccessFactors Confidential Page 2 of 4


Item Prerequisites Web Service
Output will be in JSON format and contains the following data elements:

No Parameter Name Data Type Description


1. prerequisiteCompleted Boolean Whether the prerequisite is complete

Data Type:
CHAR(1)
2. isAvailableInCatalog Boolean If prerequisite is available in user catalog

Data Type:
CHAR(1)
3. isExistsInLearningPlan Boolean If the Prerequisite exist in user learning plan

Data Type:
CHAR(1)
4. prerequisiteCompletedInfo String Prerequisite completed information

Data Type:

5. prerequisiteCompletedDate Timestamp Prerequisite completion date

Data Type:
Timestamp Format in milliseconds: 13
Bytes
6. prerequisiteGroupID String Prerequisite Group ID

Data Type:
VARCHAR2(90)
7. itemTypeID String Item Type ID

Data Type:
VARCHAR2(90)
8. itemID String Item ID

Data Type:
VARCHAR2(90)
9. itemRevisionDate Timestamp Item Revision Date

Data Type:
Timestamp Format in milliseconds: 13
Bytes
10. groupName String Group name

Data Type:
VARCHAR2(300)
11. groupOrder Long Group Order

Data Type:

12. prerequisiteItemOrder Long Prerequisite item order

Data Type:

13. prerequisiteRevisionNumber String Prerequisite revision number

Data Type:

14. prerequisiteTitle String Prerequisite Title

SuccessFactors Confidential Page 3 of 4


Item Prerequisites Web Service
Data Type:
VARCHAR2(300)
15. groupNameLabelValue String Group name Label value

Data Type:

16. prerequisiteItemClassificationType String Prerequisite Item Classification Type

Data Type: Will return one of the following: Instructor-Led,


See description column to the right. Online, Other, or Curricula

17. prerequisiteComponentTypeID String Prerequisite component type ID

Data Type:
VARCHAR2(90)
18. prerequisiteComponenetID String Prerequisite component ID

Data Type:
VARCHAR2(90)
19. prerequisiteRevisionDate Timestamp Prerequisite Component revision date

Data Type:
Timestamp Format in milliseconds: 13
Bytes

SuccessFactors Confidential Page 4 of 4

Potrebbero piacerti anche