Update a Time Bundle Status
Change the status of a time bundle.
Command
PATCH https://{server}/api/v1/{tenantId}/timeBundles/{id}
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 |
|
timeBundles-changeStatus |
Yes |
Object |
Payload of the request. See timeBundles-changeStatus. |
Request Body |
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 the ID of the record that was added. |
|
messages |
If the status is SUCCESS, this field is always blank. If the status is ERROR, one of the following validation errors occurred:
|
|
count |
The number of records returned. |
Examples
|
Sample API Call |
|---|
PATCH https://tps-api.cfapps.sap.hana.ondemand.com/api/v1/pX2f8122a19/timeBundles/z2011132219032001636478f X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840 Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB= |
Example Body Requests
|
Request Body Sample - Opening up a Time Bundle for Further Changes |
|---|
{
"_for": "revision",
"status": "CREATED"
} |
{
"_for": "verification",
"status": "PENDING_VERIFICATION"
} |
Successful Responses
|
Response Body Sample |
|---|
{
"hostId": "dbe68643cab38b7d4724b472eb3db166",
"status": "SUCCESS",
"content": "z2011132219032001636478f",
"messages": [],
"count": 1
} |
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
} |
|
Response Body Error Sample - Invalid action |
|---|
{
"hostId": "e75281c79cbdc8bad1bc6d656eadcd38",
"status": "ERROR",
"content": null,
"messages": [
{
"type": "ERROR",
"message": "Specified action is not supported: verify",
"code": "error.unknownControllerAction",
"arguments": {
"action": "verify"
},
"key": "global"
}
],
"count": -1
} |
|
Response Body Error Sample - Missing or Invalid Field |
|---|
{
"hostId": "b86022219056f3411bd2e8a099ea3c6a",
"status": "ERROR",
"content": null,
"messages": [
{
"type": "ERROR",
"message": "Invalid value for null",
"code": "error.invalidEnumValue",
"arguments": {
"value": "status",
"field": null
},
"key": null
}
],
"count": -1
} |