Actions
The ballerinax/sap.successfactors.ecmasterdatareplication package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages 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.
| Field | Type | Default | Description |
|---|---|---|---|
auth | http:CredentialsConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | See default | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | See default | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | See default | Configurations related to HTTP/2 protocol |
timeout | decimal | See default | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | See default | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | Optional | Configurations associated with Redirection |
poolConfig | http:PoolConfiguration | Optional | Configurations associated with request pooling |
cache | http:CacheConfig | See default | HTTP caching related configurations |
compression | http:Compression | See default | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | Optional | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | Optional | Configurations associated with retrying |
cookieConfig | http:CookieConfig | Optional | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | See default | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | Optional | SSL/TLS-related options |
proxy | http:ProxyConfig | Optional | Proxy server related options |
socketConfig | http:ClientSocketConfig | See default | Provides settings related to client socket configuration |
validation | boolean | See default | Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default |
laxDataBinding | boolean | See default | Enables 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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDataReplicationConfirmationErrorMessagesQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDataReplicationConfirmationErrorMessagesResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeeDataReplicationConfirmationErrorMessage | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeeDataReplicationConfirmationErrorMessage|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:
| Name | Type | Required | Description |
|---|---|---|---|
EmployeeDataReplicationConfirmation_externalCode | string | Yes | key: EmployeeDataReplicationConfirmation_externalCode |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDataReplicationConfirmationErrorMessageQueries | No | Queries to be sent with the request |
Returns: EmployeeDataReplicationConfirmationErrorMessage_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDataReplicationElementsQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDataReplicationElementsResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDataReplicationElementQueries | No | Queries to be sent with the request |
Returns: EmployeeDataReplicationElement_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | DeleteEmployeeDataReplicationElementHeaders | No | Headers 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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDataReplicationNotificationsQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDataReplicationNotificationsResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeeDataReplicationNotification | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeeDataReplicationNotification|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:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDataReplicationNotificationQueries | No | Queries to be sent with the request |
Returns: EmployeeDataReplicationNotification_1|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:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | ListEmployeeDataReplicationConfirmationsQueries | No | Queries to be sent with the request |
Returns: ListEmployeeDataReplicationConfirmationsResponse|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:
| Name | Type | Required | Description |
|---|---|---|---|
payload | EmployeeDataReplicationConfirmation | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedEmployeeDataReplicationConfirmation|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:
| Name | Type | Required | Description |
|---|---|---|---|
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmployeeDataReplicationConfirmationQueries | No | Queries to be sent with the request |
Returns: EmployeeDataReplicationConfirmation_1|error
Sample code:
EmployeeDataReplicationConfirmation_1 result = check client->getEmployeeDataReplicationConfirmation(externalCode);
Sample response:
{
"d": {
"externalCode": "1000",
"employeeDataReplicationConfirmationErrorMessages": {
"results": []
}
}
}