> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-cloud/api-reference/adapters/create-adapter/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Create a new adapter POST https://example.itential.io/adapters Content-Type: application/json Creates a new adapter in Itential Platform. Reference: https://docs.itential.com/itential-cloud/api-reference/adapters/create-adapter ## Authentication - `Authorization` header (basic auth, required) — Basic authentication of the form `Basic `. ## Request ### Body (application/json) This endpoint expects an object. - `properties` (object, optional) - `name` (string, required, default: ) — The name of the service - `type` (enum, required, default: Application) — If the service is an app or adapter - Allowed values: `Application`, `Adapter` - `properties` (object, required) - `loggerProps` (object, optional) - `log_directory` (string, required, default: /var/log/pronghorn) — The directory to store Pronghorn log files. - `log_filename` (string, required, default: pronghorn.log) — The name of the current Pronghorn log file. - `log_max_file_size` (integer, required, default: 1048576) — The maximum size of each Pronghorn log file in bytes. - `log_max_files` (integer, required, default: 100) — The maximum number of log files maintained on the server. - `log_level` (enum, required) - Allowed values: `error`, `warn`, `info`, `debug`, `trace`, `spam` - `console_level` (enum, required) - Allowed values: `error`, `warn`, `info`, `debug`, `trace`, `spam` - `description` (string, optional, default: Logger Settings) — The description property - `log_timezone_offset` (integer, optional, default: 0) — An integer specifying the offset from GMT/UTC time that will be used when writing to the log files. - `metrics_filename` (string, optional, default: metrics.log) — The name of the job metrics log file, if applicable. - `metrics_max_files` (integer, optional, default: 31) — The maximum number of job metrics log files maintained on the server, if applicable. - `metrics_rotation_interval` (string, optional, default: 7d) — The time until the metrics log is rotated in minutes, hours, days, or weeks, if applicable. - `metrics_rotation_size` (string, optional, default: 10M) — The maximum file size before the metrics log is rotated in kilobytes, megabytes, or gigabytes, if applicable. - `syslog` (object, optional) — The syslog properties allow Pronghorn to send log messages to a local or remote syslog daemon. - `level` (enum, optional) - Allowed values: `debug`, `info`, `warning`, `error` - `host` (string, optional, default: localhost) — The host running syslogd. - `port` (integer, optional, default: 514) — The port on the host that syslog is running on. - `protocol` (enum, optional, default: udp4) — The network protocol to log over. Can be one of tcp4, udp4, unix or unix-connect. - Allowed values: `tcp4`, `udp4`, `unix`, `unix-connect` - `facility` (string, optional, default: local0) — Syslog facility to use. - `type` (enum, optional, default: BSD) — The type of syslog protocol to use. Possible values are BSD and 5424. - Allowed values: `BSD`, `5424` - `path` (string, optional, default: ) — The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).If path is used, host, port and protocol do not need to be configured. - `pid` (string, optional, default: process.pid) — Process identifier (PID) of the process that log messages are coming from (Default is process.pid). - `localhost` (string, optional, default: ) — Host to indicate that log messages are coming from. - `app_name` (string, optional, default: ) — The name of the application. - `eol` (string, optional, default: ) — The end of line character to be added to the end of the message. - `isEncrypted` (boolean, optional, default: false) — Whether or not this service is encrypted - `model` (string, optional, default: ) — The model used by the service - `description` (string, optional) — A user-defined description of this adapter instance. ## Response ### 200 The result of the adapter creation 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 or object, optional) — All of the properties required for a service. - object - `type` (any, optional) - `properties` (object, optional) - object - `type` (any, optional) - `properties` (object, optional) - `id` (string, required, default: ) — The id for the service - `type` (string, required, default: ) — The type of service - `properties` (object, required) - `brokers` (list of enum, required) — Brokers which utilize this service - Allowed values: `aaa`, `compliance`, `device`, `fault`, `instance`, `inventory`, `method`, `notification`, `performance`, `persistence`, `service`, `topology` - `groups` (list of string, required) — Groups which can use this service ## Errors ### 500 Internal Server Error Error response from API - `any` ## Examples **Request** ```json {} ``` **Response** ```json { "status": "OK", "message": "A sample success message", "data": { "properties": {}, "type": null } } ``` **SDK Code** ```python import requests url = "https://example.itential.io/adapters" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://example.itential.io/adapters'; const options = {method: 'POST', 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 := "https://example.itential.io/adapters" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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("https://example.itential.io/adapters") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.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.post("https://example.itential.io/adapters") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://example.itential.io/adapters', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://example.itential.io/adapters"); var request = new RestRequest(Method.POST); 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: "https://example.itential.io/adapters")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```