/hoseassembly/{hoseAssemblyId}/rollback v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Hose Assembly
postHoseAssemblyIdRollBack
Code samples
const headers = {
Accept: "application/json",
};
fetch("https://goldleaf.app/api/v1/hoseassembly/{hoseAssemblyId}/rollback", {
method: "POST",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
POST /hoseassembly/{hoseAssemblyId}/rollback
Roll back a hose assembly to a previous version
Reverts the specified hose assembly to a prior version.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseAssemblyId | path | string | true | none |
Example responses
200 Response
{
"oneOf": [
{
"type": "string",
"example": "60c72b2f9b1e8b35d4f8e7a1"
},
{
"type": "string",
"example": "ok"
}
]
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Hose assembly rolled back successfully, returns the rolled back document ID or "ok" message | Inline |
| 204 | No Content | No content - rollback succeeded but no previous document found | string |
| 400 | Bad Request | Invalid hoseAssemblyId parameter | Inline |
| 401 | Unauthorized | Unauthorized - Authentication required | None |
| 403 | Forbidden | Forbidden - User role not permitted | None |
| 404 | Not Found | Hose assembly not found or cannot rollback | Inline |
| 500 | Internal Server Error | Server error | string |
Response Schema
Status Code 400
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
Status Code 404
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
