/hoseassembly/{hoseAssemblyId}/saveas 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
postHoseAssemblyIdSaveAs
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": [
"partNumber",
"revision"
],
"properties": {
"partNumber": {
"type": "string",
"description": "The new part number for the cloned hose assembly."
},
"revision": {
"type": "string",
"description": "The revision identifier for the cloned hose assembly."
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassembly/{hoseAssemblyId}/saveas',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassembly/{hoseAssemblyId}/saveas
Clone an existing hose assembly
Clones an existing hose assembly using the given ID, and assigns it a new part number and revision.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"required": ["partNumber", "revision"],
"properties": {
"partNumber": {
"type": "string",
"description": "The new part number for the cloned hose assembly."
},
"revision": {
"type": "string",
"description": "The revision identifier for the cloned hose assembly."
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseAssemblyId | path | string | true | The ID of the hose assembly to clone. |
| body | body | object | true | none |
| » params | body | object | false | none |
| »» partNumber | body | string | true | The new part number for the cloned hose assembly. |
| »» revision | body | string | true | The revision identifier for the cloned hose assembly. |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | none | None |
| 500 | Internal Server Error | Server error | string |
