> 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/lifecycle-manager/get-resource-instances-http/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Search resource instances GET http://localhost:3000/lifecycle-manager/resources/{modelId}/instances Searches resource instances. Reference: https://docs.itential.com/itential-platform/6/api-reference/lifecycle-manager/get-resource-instances-http ## Authentication - `Authorization` header (basic auth, required) — Basic authentication of the form `Basic `. ## Request ### Path parameters - `modelId` (string, required) — modelId ## Response ### 200 response - `data` (list of object, optional) - `_id` (any, required) - `name` (string, required) — The name of the resource instance - `description` (string, required, default: ) — Free-form text describing the resource instance - `modelId` (any, required) - `instanceData` (object, required, nullable) — The data for the resource instance - `lastAction` (object, required) — The last action that was run on this instance - `_id` (any, required) — The identifier of an action - `executionId` (any, required) - `name` (string, required) — The name of the action - `type` (enum, required) — The type of the action - Allowed values: `import`, `create`, `update`, `delete` - `status` (enum, required) — A single string describing the current activity status of this action - Allowed values: `running`, `error`, `complete`, `canceled`, `paused` - `created` (any, required) — An ISO date string denoting when this resource instance was created - `createdBy` (any, required) — The account identifier of the user who created this resource instance - `lastUpdated` (any, required) — An ISO date string denoting when this resource instance was last updated - `lastUpdatedBy` (any, required) — The account identifier of the user who last updated this resource instance - `metadata` (object, optional) — Properties describing search result pagination - `skip` (integer, optional) - `limit` (integer, optional) - `total` (integer, optional) - `nextPageSkip` (integer, optional) - `previousPageSkip` (integer, optional) - `currentPageSize` (integer, optional) ## Errors ### 500 Internal Server Error Error response from API - `any` ## Examples **Response** ```json { "data": [ { "name": "VLAN Service", "description": "EC2 Instance in US-EAST-1 with ID ec2-12345678", "instanceData": {}, "lastAction": { "_id": null, "name": "Create", "type": "import", "status": "running" }, "created": null, "createdBy": null, "lastUpdated": null, "lastUpdatedBy": null } ], "metadata": { "skip": 1, "limit": 1, "total": 1, "nextPageSkip": 1, "previousPageSkip": 1, "currentPageSize": 1 }, "message": "Successfully created the requested item" } ``` **SDK Code** ```python import requests url = "http://localhost:3000/lifecycle-manager/resources/modelId/instances" response = requests.get(url) print(response.json()) ``` ```javascript const url = 'http://localhost:3000/lifecycle-manager/resources/modelId/instances'; const options = {method: 'GET'}; 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" "net/http" "io" ) func main() { url := "http://localhost:3000/lifecycle-manager/resources/modelId/instances" req, _ := http.NewRequest("GET", url, nil) 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/lifecycle-manager/resources/modelId/instances") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("http://localhost:3000/lifecycle-manager/resources/modelId/instances") .asString(); ``` ```php request('GET', 'http://localhost:3000/lifecycle-manager/resources/modelId/instances'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("http://localhost:3000/lifecycle-manager/resources/modelId/instances"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:3000/lifecycle-manager/resources/modelId/instances")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" 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() ```