Vous êtes sur la page 1sur 33

REST Services/ATOM Feed

Overview

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted
Agenda
1 Overview REST Services
2 Overview ATOM Feed

3 Demonstrations

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |


REpresentational State Transfer (REST)
REST is a term coined by Roy Fielding to describe an architecture style of
networked systems. REST is an acronym standing for Representational State
Transfer.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 4
"Representational State Transfer is intended to evoke an image of
how a well-designed Web application behaves: a network of web
pages (a virtual state-machine), where the user progresses through an
application by selecting links (state transitions), resulting in the next
page (representing the next state of the application) being transferred
to the user and rendered for their use."
Roy Fielding.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 14
Media type: application/vnd.oracle.adf.resourceitem+json

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 16
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 17
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 18
Supported Resources

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 19
Operation Method Example URI Description

Describing all the resources GET /hcmRestApi/resources/11.13.0.0/emps/describe?expand Returns all the available resources.
=all

Filters Describing a resource collection GET /hcmRestApi/resources/11.13.0.0/emps/describe Returns the list of attributes associated with each person
resource.

Retrieving a resource by its primary key GET /hcmRestApi/resources/11.13.0.0/emps/{id} Returns the resource with the primary key value.

Retrieving a record by any field GET /hcmRestApi/resources/11.13.0.0/emps/?q=FirstName=Je Searches for persons with the first name, Jean.
an

Retrieving a record by a field, effective as of a specific date GET /hcmRestApi/resources/11.13.0.0/emps?effectiveDate=20 Returns the person records with first name John, effective
15-11-21&q=FirstName=John as of the date specified.

Retrieving only the resource collection data without links GET /hcmRestApi/resources/11.13.0.0/emps/?onlyData=true Retrieves only data with no self or href link details.

Getting the count of number of resources GET /hcmRestApi/resources/11.13.0.0/emps/?count=true Returns all the resources with metadata attribute
estimated count, indicating the total number of records.

Sorting resources by a specific field GET /hcmRestApi/resources/11.13.0.0/emps/?orderby=Person Returns resources in the ascending order of their person
Id ID.

Limiting the number of resources retrieved GET /hcmRestApi/resources/11.13.0.0/emps/?fields=PersonId, Returns only person ID and first name for all the records.
FirstName

Retrieving a range of items (paging) GET /hcmRestApi/resources/11.13.0.0/emps/?offset=5&limit= Returns the specified number of records. Offset is the
2 beginning record number.

Expanding nested child GET /hcmRestApi/resources/11.13.0.0/emps/?q=FirstName=<n Returns links to child resources. More than one accessors
ame>;LastName=<lastname>?expand=assignments can be specified using comma as the separator. Example:
value: "all" or "<accessor_name>" ?expand=Employees,Localizations

Querying child collection using a wildcard GET /hcmRestApi/resources/11.13.0.0/emps/{id}/child/assign Returns the assignment names of employee {id}, starting
ments?q=AssignmentName C* with C.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 20
Accessing REST APIs

• Controlled Availability to Oracle HCM Cloud REST Services/ATOM Feeds


(Doc ID 2060899.1)
• Get required privileges to edit the application user interface and
access REST resources. Contact your security administrator for
assistance.
• Select the tool to access the REST APIs. Use an internet-accessible
application or programming platform that supports protocols to
transfer data.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 21
Authentication and Authorization
REST APIs use the following global server-side security policy to ensure secure and encrypted data access over
a network:

oracle/multi_token_over_ssl_rest_service_policy

This policy enforces the following authentication mechanisms, based on the token a client uses:

• Basic authentication over SSL. Extracts username and password credentials from the HTTP header.
• SAML 2.0 Bearer token in the HTTP header over SSL. Extracts SAML 2.0 Bearer assertion in the HTTP
header.
• JWT token in the HTTP header over SSL. Extracts the user name from the JWT token in the HTTP header.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 23
Agenda
1 Overview REST Services
2 Overview ATOM Feeds

3 Demonstration

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |


Atom Feeds
Atom feeds enable you to keep track of any changes made to feed-enabled
resources in Oracle Global Human Resources Cloud.

For any updates that may be of interest for downstream applications, such as
new hires, terminations, employee transfers and promotions, Oracle Global
Human Resources Cloud publishes Atom feeds. Your applications will be able
to read these feeds and take appropriate action.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 25
ATOM Feeds vs Standard Extraction Tools(BIP/HCM Extract)
HCM Extracts has to create a full extract of employees and compare the XML
against the previous one to generate the differences.
BI Publisher has to run queries on several employee and child tables based on
the last update date.
For Atom feeds, even though the subscribing Java libraries poll the Atom
server for updates, the volume of data is much lower.
The Atom server data can be periodically purged, improving the performance
greatly(Purge Atom Feed Entries from Oracle Fusion Schema ESS job)

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 26
Oracle Global Human Resources Cloud currently supports creation of Atom feeds
for the emps and workstructures resources in the following scenarios:
When an employee is hired, updated, or terminated
When an assignment is created, updated, or end dated
When any of the following workstructures is created, updated, or end dated:
Grades
Jobs
Locations
Organizations
Positions

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 27
Query Parameter Description

Query Parameters
entryID Specified as part of the URI. If you specify an entry ID, you cannot specify any other
parameters. Use this format:
https://<host>:<port>/<context-
root>/atomservlet/<workspace>/<collection>/entryID/

updated-max Specify bounds on the entry update date. The lower bound is inclusive, whereas the
updated-min upper bound is exclusive.
Use the ISO 8601 time stamp format. For example: 2014-11-10T18:53:22.000Z

published-max Specifies bounds on the entry publication date. The lower bound is inclusive, whereas
the upper bound is exclusive.
Use the ISO 8601 time stamp format. For example: 2014-11-10T18:53:22.000Z

strict Specifies strict query parameter checking. The default value is false. You can set this
value to true to verify that each of your query parameters is recognized by the service.
An error is returned if a parameter is not recognized.

page Specifies the page number. Use this format: ?page=[value]. For example, ?page=2.

page-size Specifies the number of entries to be returned on a page. The default value is 10 and
the maximum value is 1000.
Use this format: ?page-size=[value]. For example, ?page-size=20.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 28
ATOM Feeds and HDL

• Generation of ATOM feeds (events) are done for each individual dat file
that you load
• Add the following command to the dat file where you want ATOM feeds.
SET ENABLE_INCREMENTAL_LOAD_EVENTS Y. See attached sample
• Globally ATOM feeds are not generated for HDL loads – due to
performance considerations
• Not all ATOM feeds may be triggered through HDL loads

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 29
Agenda
1 Overview REST Services
2 Overview ATOM Feeds

3 Demonstration

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |


Links
http://docs.oracle.com/cloud/latest/globalcs_gs/index.html
Controlled Availability to Oracle HCM Cloud REST
Services/ATOM Feeds (Doc ID 2060899.1)

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted 31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal 32

Vous aimerez peut-être aussi