Skip to main content

Actions

The ballerinax/sap.successfactors.ecmasterdatareplication package exposes the following clients:

Available clients:

ClientPurpose
ClientManages ecmasterdatareplication objects: EmployeeDataReplicationConfirmationErrorMessage, EmployeeDataReplicationElement, EmployeeDataReplicationNotification, EmployeeDataReplicationConfirmation, over the SAP SuccessFactors OData v2 API.

Client​

You can use these APIs to access the information about the replication status of employee data from Employee Central to payroll systems. The APIs are used in the standard integrations from SAP SuccessFactors Employee Central to SAP ERP, SAP S/4HANA and SAP SuccessFactors Employee Central Payroll.

Configuration​

ConnectionConfig​

Provides a set of configurations for controlling the behaviours when communicating with the SAP SuccessFactors OData endpoint. Passed as the argument to the client initializer.

FieldTypeDefaultDescription
authhttp:CredentialsConfigRequiredConfigurations related to client authentication
httpVersionhttp:HttpVersionSee defaultThe HTTP version understood by the client
http1Settingshttp:ClientHttp1SettingsSee defaultConfigurations related to HTTP/1.x protocol
http2Settingshttp:ClientHttp2SettingsSee defaultConfigurations related to HTTP/2 protocol
timeoutdecimalSee defaultThe maximum time to wait (in seconds) for a response before closing the connection
forwardedstringSee defaultThe choice of setting forwarded/x-forwarded header
followRedirectshttp:FollowRedirectsOptionalConfigurations associated with Redirection
poolConfighttp:PoolConfigurationOptionalConfigurations associated with request pooling
cachehttp:CacheConfigSee defaultHTTP caching related configurations
compressionhttp:CompressionSee defaultSpecifies the way of handling compression (accept-encoding) header
circuitBreakerhttp:CircuitBreakerConfigOptionalConfigurations associated with the behaviour of the Circuit Breaker
retryConfighttp:RetryConfigOptionalConfigurations associated with retrying
cookieConfighttp:CookieConfigOptionalConfigurations associated with cookies
responseLimitshttp:ResponseLimitConfigsSee defaultConfigurations associated with inbound response size limits
secureSockethttp:ClientSecureSocketOptionalSSL/TLS-related options
proxyhttp:ProxyConfigOptionalProxy server related options
socketConfighttp:ClientSocketConfigSee defaultProvides settings related to client socket configuration
validationbooleanSee defaultEnables the inbound payload validation functionality which provided by the constraint package. Enabled by default
laxDataBindingbooleanSee defaultEnables relaxed data binding on the client side. When enabled, nil values are treated as optional, and absent fields are handled as nilable types. Enabled by default.

The client also accepts a hostname string parameter (the SAP SuccessFactors API server host) and an optional port (defaults to 443).

Initializing the client​

import ballerinax/sap.successfactors.ecmasterdatareplication;

configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;

ecmasterdatareplication:Client client = check new (
{
auth: { username, password }
},
hostname
);

Operations​

EmployeeDataReplicationConfirmationErrorMessage​

listEmployeeDataReplicationConfirmationErrorMessages

Queries the EmployeeDataReplicationConfirmationErrorMessage collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDataReplicationConfirmationErrorMessagesQueriesNoQueries to be sent with the request

Returns: ListEmployeeDataReplicationConfirmationErrorMessagesResponse&#124;error

Sample code:

ListEmployeeDataReplicationConfirmationErrorMessagesResponse result = check client->listEmployeeDataReplicationConfirmationErrorMessages();

Sample response:

{
"d": {
"results": [
{
"EmployeeDataReplicationConfirmation_externalCode": "1000",
"externalCode": "1000"
}
]
}
}
createEmployeeDataReplicationConfirmationErrorMessage

Creates a new EmployeeDataReplicationConfirmationErrorMessage entity from the supplied payload.

Parameters:

NameTypeRequiredDescription
payloadEmployeeDataReplicationConfirmationErrorMessageYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeeDataReplicationConfirmationErrorMessage&#124;error

Sample code:

CreatedEmployeeDataReplicationConfirmationErrorMessage result = check client->createEmployeeDataReplicationConfirmationErrorMessage(payload);

Sample response:

{
"d": {
"EmployeeDataReplicationConfirmation_externalCode": "1000",
"externalCode": "1000"
}
}
getEmployeeDataReplicationConfirmationErrorMessage

Retrieves a single EmployeeDataReplicationConfirmationErrorMessage entity identified by its key properties.

Parameters:

NameTypeRequiredDescription
EmployeeDataReplicationConfirmation_externalCodestringYeskey: EmployeeDataReplicationConfirmation_externalCode
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDataReplicationConfirmationErrorMessageQueriesNoQueries to be sent with the request

Returns: EmployeeDataReplicationConfirmationErrorMessage_1&#124;error

Sample code:

EmployeeDataReplicationConfirmationErrorMessage_1 result = check client->getEmployeeDataReplicationConfirmationErrorMessage(EmployeeDataReplicationConfirmation_externalCode, externalCode);

Sample response:

{
"d": {
"EmployeeDataReplicationConfirmation_externalCode": "1000",
"externalCode": "1000"
}
}

EmployeeDataReplicationElement​

listEmployeeDataReplicationElements

Queries the EmployeeDataReplicationElement collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDataReplicationElementsQueriesNoQueries to be sent with the request

Returns: ListEmployeeDataReplicationElementsResponse&#124;error

Sample code:

ListEmployeeDataReplicationElementsResponse result = check client->listEmployeeDataReplicationElements();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000",
"lastConfirmationNav": {},
"lastConfirmationWithSuccessNav": {},
"lastReplicationStartNotificationNav": {}
}
]
}
}
getEmployeeDataReplicationElement

Retrieves a single EmployeeDataReplicationElement entity identified by its key property.

Parameters:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDataReplicationElementQueriesNoQueries to be sent with the request

Returns: EmployeeDataReplicationElement_1&#124;error

Sample code:

EmployeeDataReplicationElement_1 result = check client->getEmployeeDataReplicationElement(externalCode);

Sample response:

{
"d": {
"externalCode": "1000",
"lastConfirmationNav": {
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {}
},
"lastConfirmationWithSuccessNav": {
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {}
},
"lastReplicationStartNotificationNav": {
"externalCode": "1000"
}
}
}
deleteEmployeeDataReplicationElement

Deletes the EmployeeDataReplicationElement identified by its key property.

Parameters:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
headersDeleteEmployeeDataReplicationElementHeadersNoHeaders to be sent with the request

Returns: error?

Sample code:

check client->deleteEmployeeDataReplicationElement(externalCode);

EmployeeDataReplicationNotification​

listEmployeeDataReplicationNotifications

Queries the EmployeeDataReplicationNotification collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDataReplicationNotificationsQueriesNoQueries to be sent with the request

Returns: ListEmployeeDataReplicationNotificationsResponse&#124;error

Sample code:

ListEmployeeDataReplicationNotificationsResponse result = check client->listEmployeeDataReplicationNotifications();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000"
}
]
}
}
createEmployeeDataReplicationNotification

Creates a new EmployeeDataReplicationNotification entity from the supplied payload.

Parameters:

NameTypeRequiredDescription
payloadEmployeeDataReplicationNotificationYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeeDataReplicationNotification&#124;error

Sample code:

CreatedEmployeeDataReplicationNotification result = check client->createEmployeeDataReplicationNotification(payload);

Sample response:

{
"d": {
"externalCode": "1000"
}
}
getEmployeeDataReplicationNotification

Retrieves a single EmployeeDataReplicationNotification entity identified by its key property.

Parameters:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDataReplicationNotificationQueriesNoQueries to be sent with the request

Returns: EmployeeDataReplicationNotification_1&#124;error

Sample code:

EmployeeDataReplicationNotification_1 result = check client->getEmployeeDataReplicationNotification(externalCode);

Sample response:

{
"d": {
"externalCode": "1000"
}
}

EmployeeDataReplicationConfirmation​

listEmployeeDataReplicationConfirmations

Queries the EmployeeDataReplicationConfirmation collection and returns a page of entities, optionally filtered, sorted, and paged via OData query options.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request
queriesListEmployeeDataReplicationConfirmationsQueriesNoQueries to be sent with the request

Returns: ListEmployeeDataReplicationConfirmationsResponse&#124;error

Sample code:

ListEmployeeDataReplicationConfirmationsResponse result = check client->listEmployeeDataReplicationConfirmations();

Sample response:

{
"d": {
"results": [
{
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {}
}
]
}
}
createEmployeeDataReplicationConfirmation

Creates a new EmployeeDataReplicationConfirmation entity from the supplied payload.

Parameters:

NameTypeRequiredDescription
payloadEmployeeDataReplicationConfirmationYesNew entity
headersmap<string|string[]>NoHeaders to be sent with the request

Returns: CreatedEmployeeDataReplicationConfirmation&#124;error

Sample code:

CreatedEmployeeDataReplicationConfirmation result = check client->createEmployeeDataReplicationConfirmation(payload);

Sample response:

{
"d": {
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {
"results": []
}
}
}
getEmployeeDataReplicationConfirmation

Retrieves a single EmployeeDataReplicationConfirmation entity identified by its key property.

Parameters:

NameTypeRequiredDescription
externalCodestringYeskey: externalCode
headersmap<string|string[]>NoHeaders to be sent with the request
queriesGetEmployeeDataReplicationConfirmationQueriesNoQueries to be sent with the request

Returns: EmployeeDataReplicationConfirmation_1&#124;error

Sample code:

EmployeeDataReplicationConfirmation_1 result = check client->getEmployeeDataReplicationConfirmation(externalCode);

Sample response:

{
"d": {
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {
"results": []
}
}
}