Actions
The ballerinax/sap.successfactors.ecglobalassignment package exposes the following clients:
Available clients:
| Client | Purpose |
|---|---|
Client | Manages ecglobalassignment objects: SecondaryAssignmentsItem, SecondaryAssignments, RightToReturn, EmpGlobalAssignment, over the SAP SuccessFactors OData v2 API. |
Client
You can use these APIs to manage the assignment information of the employees who are assigned to another company within the organization.
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.ecglobalassignment;
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;
ecglobalassignment:Client client = check new (
{
auth: { username, password }
},
hostname
);
Operations
SecondaryAssignmentsItem
listSecondaryAssignmentsItems
Queries the SecondaryAssignmentsItem 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 | ListSecondaryAssignmentsItemsQueries | No | Queries to be sent with the request |
Returns: ListSecondaryAssignmentsItemsResponse|error
Sample code:
ListSecondaryAssignmentsItemsResponse result = check client->listSecondaryAssignmentsItems();
Sample response:
{
"d": {
"results": [
{
"d": {}
}
]
}
}
createSecondaryAssignmentsItem
Creates a new SecondaryAssignmentsItem entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | SecondaryAssignmentsItem | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedSecondaryAssignmentsItem|error
Sample code:
CreatedSecondaryAssignmentsItem result = check client->createSecondaryAssignmentsItem(payload);
Sample response:
{
"d": {
"d": {}
}
}
getSecondaryAssignmentsItem
Retrieves a single SecondaryAssignmentsItem entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
SecondaryAssignments_effectiveStartDate | string | Yes | key: SecondaryAssignments_effectiveStartDate |
SecondaryAssignments_externalCode | string | Yes | key: SecondaryAssignments_externalCode |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetSecondaryAssignmentsItemQueries | No | Queries to be sent with the request |
Returns: SecondaryAssignmentsItem|error
Sample code:
SecondaryAssignmentsItem result = check client->getSecondaryAssignmentsItem(SecondaryAssignments_effectiveStartDate, SecondaryAssignments_externalCode, externalCode);
Sample response:
{
"d": {}
}
updateSecondaryAssignmentsItem
Updates the SecondaryAssignmentsItem identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
SecondaryAssignments_effectiveStartDate | string | Yes | key: SecondaryAssignments_effectiveStartDate |
SecondaryAssignments_externalCode | string | Yes | key: SecondaryAssignments_externalCode |
externalCode | string | Yes | key: externalCode |
payload | ModifiedSecondaryAssignmentsItem | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateSecondaryAssignmentsItem(SecondaryAssignments_effectiveStartDate, SecondaryAssignments_externalCode, externalCode, payload);
deleteSecondaryAssignmentsItem
Deletes the SecondaryAssignmentsItem identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
SecondaryAssignments_effectiveStartDate | string | Yes | key: SecondaryAssignments_effectiveStartDate |
SecondaryAssignments_externalCode | string | Yes | key: SecondaryAssignments_externalCode |
externalCode | string | Yes | key: externalCode |
headers | DeleteSecondaryAssignmentsItemHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteSecondaryAssignmentsItem(SecondaryAssignments_effectiveStartDate, SecondaryAssignments_externalCode, externalCode);
SecondaryAssignments
listSecondaryAssignmentss
Queries the SecondaryAssignments 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 | ListSecondaryAssignmentssQueries | No | Queries to be sent with the request |
Returns: ListSecondaryAssignmentssResponse|error
Sample code:
ListSecondaryAssignmentssResponse result = check client->listSecondaryAssignmentss();
Sample response:
{
"d": {
"results": [
{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"allSfProcesses": {}
}
]
}
}
createSecondaryAssignments
Creates a new SecondaryAssignments entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | SecondaryAssignments | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedSecondaryAssignments|error
Sample code:
CreatedSecondaryAssignments result = check client->createSecondaryAssignments(payload);
Sample response:
{
"d": {
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"allSfProcesses": {
"results": []
}
}
}
getSecondaryAssignments
Retrieves a single SecondaryAssignments entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
effectiveStartDate | string | Yes | key: effectiveStartDate |
externalCode | string | Yes | key: externalCode |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetSecondaryAssignmentsQueries | No | Queries to be sent with the request |
Returns: SecondaryAssignments|error
Sample code:
SecondaryAssignments result = check client->getSecondaryAssignments(effectiveStartDate, externalCode);
Sample response:
{
"effectiveStartDate": "2026-01-01",
"externalCode": "1000",
"allSfProcesses": {
"results": [
{
"d": {}
}
]
}
}
updateSecondaryAssignments
Updates the SecondaryAssignments identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
effectiveStartDate | string | Yes | key: effectiveStartDate |
externalCode | string | Yes | key: externalCode |
payload | ModifiedSecondaryAssignments | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateSecondaryAssignments(effectiveStartDate, externalCode, payload);
deleteSecondaryAssignments
Deletes the SecondaryAssignments identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
effectiveStartDate | string | Yes | key: effectiveStartDate |
externalCode | string | Yes | key: externalCode |
headers | DeleteSecondaryAssignmentsHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteSecondaryAssignments(effectiveStartDate, externalCode);
RightToReturn
listRightToReturns
Queries the RightToReturn 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 | ListRightToReturnsQueries | No | Queries to be sent with the request |
Returns: ListRightToReturnsResponse|error
Sample code:
ListRightToReturnsResponse result = check client->listRightToReturns();
Sample response:
{
"d": {
"results": [
{
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"code": "1000"
}
]
}
}
createRightToReturn
Creates a new RightToReturn entity from the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | RightToReturn | Yes | New entity |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CreatedRightToReturn|error
Sample code:
CreatedRightToReturn result = check client->createRightToReturn(payload);
Sample response:
{
"d": {
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"code": "1000"
}
}
getRightToReturn
Retrieves a single RightToReturn entity identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
code | string | Yes | key: code |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetRightToReturnQueries | No | Queries to be sent with the request |
Returns: RightToReturn|error
Sample code:
RightToReturn result = check client->getRightToReturn(Position_code, Position_effectiveStartDate, code);
Sample response:
{
"Position_code": "1000",
"Position_effectiveStartDate": "2026-01-01",
"code": "1000"
}
updateRightToReturn
Updates the RightToReturn identified by its key properties with the supplied payload.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
code | string | Yes | key: code |
payload | ModifiedRightToReturn | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->updateRightToReturn(Position_code, Position_effectiveStartDate, code, payload);
deleteRightToReturn
Deletes the RightToReturn identified by its key properties.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
Position_code | string | Yes | key: Position_code |
Position_effectiveStartDate | string | Yes | key: Position_effectiveStartDate |
code | string | Yes | key: code |
headers | DeleteRightToReturnHeaders | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->deleteRightToReturn(Position_code, Position_effectiveStartDate, code);
EmpGlobalAssignment
listEmpGlobalAssignments
Queries the EmpGlobalAssignment 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 | ListEmpGlobalAssignmentsQueries | No | Queries to be sent with the request |
Returns: ListEmpGlobalAssignmentsResponse|error
Sample code:
ListEmpGlobalAssignmentsResponse result = check client->listEmpGlobalAssignments();
Sample response:
{
"d": {
"results": [
{
"d": {}
}
]
}
}
getEmpGlobalAssignment
Retrieves a single EmpGlobalAssignment entity identified by its key property.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | key: userId |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | GetEmpGlobalAssignmentQueries | No | Queries to be sent with the request |
Returns: EmpGlobalAssignment|error
Sample code:
EmpGlobalAssignment result = check client->getEmpGlobalAssignment(userId);
Sample response:
{
"d": {}
}