{"openapi":"3.0.4","info":{"title":"CluedIn REST API — Administration & configuration","description":"Settings, logs, and metered billing.","version":"v1"},"tags":[{"name":"Log"},{"name":"MeteredBilling"},{"name":"Setting"}],"paths":{"/api/v1/logs":{"get":{"tags":["Log"],"summary":"Stream logs (recent)","parameters":[{"name":"offset","in":"query","schema":{"type":"integer","format":"int64"},"description":"Optional starting offset (inclusive). When omitted, the server reads from `lastOffset - 999`."}],"responses":{"200":{"description":"OK"}},"description":"Returns the most recent application logs for the organisation by reading from the RabbitMQ log stream. With no `offset`, returns the last ~1000 entries; supply `offset` to continue from a previous read. The response is `{ consoleMessages: [...] }`. Requires the OrganizationalAdmin role."}},"/api/meteredbilling/counts":{"get":{"tags":["MeteredBilling"],"summary":" (Auth)","responses":{"200":{"description":"OK"}}}},"/api/v1/settings":{"post":{"tags":["Setting"],"summary":"Create user setting","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}}}},"responses":{"200":{"description":"OK"}},"description":"Creates a new user setting. Returns 202 Accepted when the setting has been persisted; 400 with validation details when the model is invalid."},"put":{"tags":["Setting"],"summary":"Create or update user setting","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}}}},"responses":{"200":{"description":"OK"}},"description":"Updates a user setting if a setting with the same key already exists for the caller; otherwise creates it. Returns 202 Accepted."},"get":{"tags":["Setting"],"summary":"List user settings","responses":{"200":{"description":"OK"}},"description":"Returns the user-level settings stored for the calling user. Includes the organisation and user identifiers on each entry."}},"/api/settings":{"post":{"tags":["Setting"],"summary":"Create user setting","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}}}},"responses":{"200":{"description":"OK"}},"description":"Creates a new user setting. Returns 202 Accepted when the setting has been persisted; 400 with validation details when the model is invalid."},"put":{"tags":["Setting"],"summary":"Create or update user setting","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel"}}}},"responses":{"200":{"description":"OK"}},"description":"Updates a user setting if a setting with the same key already exists for the caller; otherwise creates it. Returns 202 Accepted."},"get":{"tags":["Setting"],"summary":"List user settings","responses":{"200":{"description":"OK"}},"description":"Returns the user-level settings stored for the calling user. Includes the organisation and user identifiers on each entry."}}},"components":{"schemas":{"CluedIn.Server.WebApi.Controllers.UserSettings.Models.CreateOrUpdateSettingModel":{"required":["data","key"],"type":"object","properties":{"key":{"minLength":1,"type":"string"},"data":{"minLength":1,"type":"string"}},"additionalProperties":false}},"securitySchemes":{"Bearer":{"type":"http","description":"Please enter a valid token","scheme":"Bearer"}}}}