Get All Time Bundle Versions
Returns a list of time bundle versions for the specified tenant.
Command
GET https://{server}/api/v1/{tenantId}/timeBundles/{id}/versions
Parameters
| Name | Required | Data Type | Description | Parameter Type |
|---|---|---|---|---|
| tenantId | Yes | String | Unique identifier of the tenant. | Path |
| id | Yes | String | Unique identifier of the time bundle. | Path |
| expand | No | String |
Adds additional detail to the output. Valid options:
Can be comma-separated into the same query. For example: timeRecords?expand=timeBundleLineItems,statusDetail |
Query |
| filter | No | String |
Spring Expression Language (EL) filter. Allows you to filter by a set of records (for example: name eq 'name'). The following fields are filterable:
For more details on using the filter query parameter, see Filtering Guidelines. |
Query |
| offset | No | String | The number of items to skip before starting to collect the result set. Used with limit. | Query |
| limit | No | String |
The maximum number of results to return. Used with offset. Together, they determine the start index and number of records to return. For example, to return records 5 through 15 that have been sorted by name, use the following: versions?offset=5&limit=10&orderBy=name |
Query |
| orderBy | No | String | Order by fields, sort order. | Query |
| select | No | String | Select the specific fields to be returned. | Query |
| count | No | String | The number of records to fetch from the database. | Query |
| groupBy | No | String | Categorization of results (group by a field). | Query |
Responses
Status and Error Codes
Successful Response Body
| Field | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hostId | The identifier of the host instance that is returning the request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status |
The status of the request. Valid values:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| content |
Returns an array of records.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| messages | If the status is SUCCESS, this field is always blank. If the status is ERROR, a validation error occurred. For example, the time bundle ID in the URL is invalid. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| count | The number of records returned. |
Examples
| Sample API Call |
|---|
GET https://tps-api.cfapps.sap.hana.ondemand.com/api/v1/pX2f8122a19/timeBundles/z21102618042048126636012/versions X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840 Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB= |
Successful Responses
| Response Body Sample |
|---|
{
"hostId": "b473cba520ad6b57c9ca9153da135c58",
"status": "SUCCESS",
"content": [
{
"timeBundleRef": "z21102618042048126636012",
"timeTemplateId": "z21102518593527596892010",
"timeBundleChunkId": "z211025185332617032112bf.DAILY.2021-02-27+0000",
"totalHours": 9.2500000000,
"sourceId": "TPS",
"bundleFrequency": "DAILY",
"status": "PENDING_ATTRIBUTE",
"tenantId": "pX2f8122a19",
"startDate": "2021-02-27",
"lobExternalId": "C2039600",
"personId": "z211025185332617032112bf",
"template": "TimeBundleAutoverificationTemplateWithCombinerRule0009",
"createdTime": "2021-10-26 18:04:20.643 +0000",
"lastModifiedTime": "2021-10-26 18:31:11.900 +0000",
"createdBy": "tenant_admin",
"lastModifiedBy": "tenant_admin",
"version": 0,
"editStatus": "SYSTEM_GENERATED",
"chunkStatus": "ERROR"
},
{
"timeBundleRef": "z21102618042048126636012",
"timeTemplateId": "z21102518593527596892010",
"timeBundleChunkId": "z211025185332617032112bf.DAILY.2021-02-27+0000",
"totalHours": 9.2500000000,
"sourceId": "TPS",
"bundleFrequency": "DAILY",
"status": "VALIDATION_ERROR",
"tenantId": "pX2f8122a19",
"startDate": "2021-02-27",
"lobExternalId": "C2039600",
"personId": "z211025185332617032112bf",
"template": "TimeBundleAutoverificationTemplateWithCombinerRule0009",
"createdTime": "2021-10-27 22:16:38.490 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"version": 1,
"editStatus": "USER_EDITED",
"chunkStatus": "ERROR"
},
"timeBundleRef": "z21102618042048126636012",
"timeTemplateId": "z21102518593527596892010",
"timeBundleChunkId": "z211025185332617032112bf.DAILY.2021-02-27+0000",
"totalHours": 9.2500000000,
"sourceId": "TPS",
"bundleFrequency": "DAILY",
"status": "CREATED",
"tenantId": "pX2f8122a19",
"startDate": "2021-02-27",
"lobExternalId": "C2039600",
"personId": "z211025185332617032112bf",
"template": "TimeBundleAutoverificationTemplateWithCombinerRule0009",
"createdTime": "2021-10-27 22:29:38.560 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"version": 2,
"editStatus": "USER_EDITED",
"chunkStatus": "OK"
}
],
"messages": [],
"count": 3
} |
Error Responses
| Response Body Error Sample - Time Bundle ID in URL is Invalid |
|---|
{
"hostId": "4005c0068e886de442067ac16fa178c0",
"status": "ERROR",
"content": null,
"messages": [
{
"type": "ERROR",
"message": "Failed to load resource of type TimeBundle with Arguments [z20080415070308965427c0].",
"code": "error.resourceNotFound",
"arguments": {
"type": "TimeBundle",
"id": "z20080415070308965427c0"
},
"key": "TimeBundle"
}
],
"count": -1
} |