> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/2023-2/api-reference/prebuilts/update-prebuilt/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Update a prebuilt PUT http://localhost:3000/prebuilts/{id} Content-Type: application/json Updates a prebuilt in Itential Platform. Reference: https://docs.itential.com/itential-platform/6/api-reference/prebuilts/update-prebuilt ## Authentication - `Authorization` header (basic auth, required) — Basic authentication of the form `Basic `. ## Request ### Path parameters - `id` (string, required) — The object id of the selected prebuilt. ### Body (application/json) This endpoint expects an object. - `prebuilt` (object, optional) - `metadata` (object, required) - `name` (string, required) - `version` (string, required) - `description` (string, required) - `author` (string, required) - `license` (string, required) - `repository` (object, required) - `type` (enum, required) - Allowed values: `local`, `gitlab`, `git` - `hostname` (string, optional) - `path` (string, optional) - `IAPDependencies` (object, required) - `keywords` (list of string, optional) - `gitlabId` (integer, optional) - `manifest` (object, required) - `bundleName` (string, required) - `artifacts` (list of object, required) - `id` (string, optional) - `name` (string, optional) - `type` (enum, optional) - Allowed values: `automation`, `forms`, `golden-config`, `integration`, `integration-model`, `json-forms`, `mop-template`, `mop-analytic-template`, `service-catalog`, `template`, `transformation`, `workflow` - `location` (string, optional) - `fingerprint` (string, optional) - `createdEpoch` (string, optional) - `bundles` (list of object, required) - `type` (enum, required) - Allowed values: `automation`, `forms`, `golden-config`, `integration`, `integration-model`, `json-forms`, `mop-template`, `mop-analytic-template`, `service-catalog`, `template`, `transformation`, `workflow` - `data` (object, required) - `readme` (string, required) ## Response ### 200 The output of the prebuilt update process. - `status` (enum, optional) — The status of the API request. - Allowed values: `OK`, `Created` - `message` (string, optional) — Message containing either confirmation of the operation or the reason for the failure of the operation. - `data` (object, optional) - `metadata` (object, required) - `name` (string, required) - `version` (string, required) - `description` (string, required) - `author` (string, required) - `license` (string, required) - `repository` (object, required) - `type` (enum, required) - Allowed values: `local`, `gitlab`, `git` - `hostname` (string, optional) - `path` (string, optional) - `IAPDependencies` (object, required) - `keywords` (list of string, optional) - `gitlabId` (integer, optional) - `manifest` (object, required) - `bundleName` (string, required) - `artifacts` (list of object, required) - `id` (string, optional) - `name` (string, optional) - `type` (enum, optional) - Allowed values: `automation`, `forms`, `golden-config`, `integration`, `integration-model`, `json-forms`, `mop-template`, `mop-analytic-template`, `service-catalog`, `template`, `transformation`, `workflow` - `location` (string, optional) - `fingerprint` (string, optional) - `createdEpoch` (string, optional) - `bundles` (list of object, required) - `type` (enum, required) - Allowed values: `automation`, `forms`, `golden-config`, `integration`, `integration-model`, `json-forms`, `mop-template`, `mop-analytic-template`, `service-catalog`, `template`, `transformation`, `workflow` - `data` (object, required) - `readme` (string, required) ## Errors ### 500 Internal Server Error Error response from API - `any` ## Examples **Request** ```json {} ``` **Response** ```json { "status": "OK", "message": "A sample success message", "data": { "metadata": { "name": "@itentialopensource/aggregate-functions-for-arrays", "version": "0.0.1", "description": "A basic description", "author": "Itential Artifacts", "license": "Apache-2.0", "repository": { "type": "local", "hostname": "gitlab.com", "path": "/itentialopensource/pre-built-automations" }, "IAPDependencies": {}, "keywords": [ "Itential" ], "gitlabId": 17866482 }, "manifest": { "bundleName": "aggregateFunctions", "artifacts": [ { "id": "5e5ea3bd16da51d52b4a8f9f", "name": "aggregateFunctions", "type": "automation", "location": "/bundles/workflows/IAP Test Artifact Workflow.json" } ], "fingerprint": "5e84f892c5eab11ec2eee16d", "createdEpoch": "1585772690392" }, "bundles": [ { "type": "automation", "data": {} } ], "readme": "example of readme" } } ``` **SDK Code** ```python import requests url = "http://localhost:3000/prebuilts/id" payload = {} headers = {"Content-Type": "application/json"} response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'http://localhost:3000/prebuilts/id'; const options = {method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "http://localhost:3000/prebuilts/id" payload := strings.NewReader("{}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("http://localhost:3000/prebuilts/id") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Put.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("http://localhost:3000/prebuilts/id") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PUT', 'http://localhost:3000/prebuilts/id', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("http://localhost:3000/prebuilts/id"); var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:3000/prebuilts/id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```