custom/JumpCloud.SDK.DirectoryInsights.json
{
"basePath": "/insights/directory/v1/", "consumes": [ "application/json" ], "definitions": { "ErrorMessage": { "properties": { "message": { "description": "Text detailed error message returned by the service", "type": "string" } }, "title": "ErrorMessage", "type": "object" }, "EventCount": { "description": "EventCount JSON struct with count of matching events", "properties": { "count": { "format": "int64", "type": "integer", "x-go-name": "Count" } }, "title": "EventCount", "type": "object" }, "EventDistinctQuery": { "description": "EventDistinctQuery is the users' command to search our auth logs for distinct values of the specified field", "properties": { "end_time": { "description": "optional query end time, UTC in RFC3339 format", "format": "date-time", "type": "string" }, "field": { "description": "field is what they wish to query on", "type": "string", "x-go-name": "Field" }, "search_term": { "$ref": "#/definitions/SearchTerm" }, "service": { "description": "service name to query. Known services: systems,radius,sso,directory,ldap,all", "example": "[systems,radius,sso,directory,ldap,mdm,all]", "items": { "type": "string" }, "type": "array", "x-go-name": "Service" }, "start_time": { "description": "query start time, UTC in RFC3339 format", "format": "date-time", "type": "string" } }, "required": [ "service", "start_time" ], "title": "EventDistinctQuery", "type": "object" }, "EventIntervalQuery": { "description": "EventIntervalQuery is the users' command to search our auth logs for bucketed counts of values of the specified field", "properties": { "end_time": { "description": "optional query end time, UTC in RFC3339 format", "format": "date-time", "type": "string" }, "interval_unit": { "type": "string", "x-go-name": "IntervalUnit" }, "interval_value": { "description": "Interval Value. This specifies how many units you want to bucket the event counts by\noptional", "type": "string", "x-go-name": "IntervalValue" }, "search_term": { "$ref": "#/definitions/SearchTerm" }, "service": { "description": "service name to query. Known services: systems,radius,sso,directory,ldap,all", "example": "[systems,radius,sso,directory,ldap,mdm,all]", "items": { "type": "string" }, "type": "array", "x-go-name": "Service" }, "start_time": { "description": "query start time, UTC in RFC3339 format", "format": "date-time", "type": "string" }, "timezone": { "description": "TimeZone. Specify the timezone in which the user is in\noptional", "type": "string" } }, "required": [ "service", "start_time", "interval_unit" ], "title": "EventIntervalQuery", "type": "object" }, "EventQuery": { "description": "EventQuery is the users' command to search our auth logs", "properties": { "end_time": { "description": "optional query end time, UTC in RFC3339 format", "format": "date-time", "type": "string" }, "fields": { "description": "optional list of fields to return from query", "items": { "type": "string" }, "type": "array", "x-go-name": "Projection" }, "limit": { "description": "Max number of rows to return", "format": "int64", "type": "integer", "x-go-name": "Limit" }, "search_after": { "description": "Specific query to search after, see x-* response headers for next values", "items": { "type": "string" }, "type": "array", "x-go-name": "SearchAfter" }, "search_term": { "$ref": "#/definitions/SearchTerm" }, "service": { "description": "service name to query. Known services: systems,radius,sso,directory,ldap,all", "example": "[systems,radius,sso,directory,ldap,mdm,all]", "items": { "type": "string" }, "type": "array", "x-go-name": "Service" }, "sort": { "description": "ASC or DESC order for timestamp", "type": "string", "x-go-name": "Sort" }, "start_time": { "description": "query start time, UTC in RFC3339 format", "format": "date-time", "type": "string" } }, "required": [ "service", "start_time" ], "title": "EventQuery", "type": "object" }, "EventServiceTimeQuery": { "description": "EventServiceTimeQuery is the base struct for most event queries\nit includes the minimum-required fields of service and start/end times", "properties": { "end_time": { "description": "optional query end time, UTC in RFC3339 format", "format": "date-time", "type": "string" }, "service": { "description": "service name to query. Known services: systems,radius,sso,directory,ldap,all", "example": "[systems,radius,sso,directory,ldap,mdm,all]", "items": { "type": "string" }, "type": "array", "x-go-name": "Service" }, "start_time": { "description": "query start time, UTC in RFC3339 format", "format": "date-time", "type": "string" } }, "required": [ "service", "start_time" ], "title": "EventServiceTimeQuery", "type": "object" }, "SearchTerm": { "description": "SearchTerm is the filter portion of the query\nit contains only one of 'and' or 'or' conjunction maps", "properties": { "and": { "$ref": "#/definitions/TermConjunction" }, "or": { "$ref": "#/definitions/TermConjunction" } }, "title": "SearchTerm", "type": "object" }, "TermConjunction": { "additionalProperties": true, "description": "TermConjunction represents a conjunction (and/or)\nNOTE: the validator limits what the operator can be, not the object\nfor future-proof-ness\nand a list of sub-values", "title": "TermConjunction", "type": "object" } }, "host": "api.jumpcloud.com", "info": { "description": "The purpose of this API is to query Jumpcloud Directory Insights events", "title": "Directory Insights API", "version": "1.0" }, "paths": { "/events": { "post": { "description": "Query the API for Directory Insights events", "operationId": "Get-Event", "parameters": [ { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/EventQuery" } } ], "responses": { "200": { "description": "Array of Directory Insights events JSON objects", "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array" } }, "400": { "description": "Invalid/unknown query JSON body", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "401": { "description": "Unauthorized (Invalid API Key)", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "402": { "description": "Directory Insights is not enabled for your organization", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "500": { "description": "Technical difficulties processing your request", "schema": { "$ref": "#/definitions/ErrorMessage" } } }, "security": [ { "x-api-key": [] }, { "x-org-id": [] } ], "summary": "Query Events" } }, "/events/count": { "post": { "description": "Query the API for a count of matching events", "operationId": "Get-EventCount", "parameters": [ { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/EventQuery" } } ], "responses": { "200": { "description": "Count of matching event rows", "schema": { "$ref": "#/definitions/EventCount" } }, "400": { "description": "Invalid/unknown query JSON body", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "401": { "description": "Unauthorized (Invalid API Key)", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "402": { "description": "Directory Insights is not enabled for your organization", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "500": { "description": "Technical difficulties processing your request", "schema": { "$ref": "#/definitions/ErrorMessage" } } }, "security": [ { "x-api-key": [] }, { "x-org-id": [] } ], "summary": "Count Events" } }, "/events/distinct": { "post": { "description": "Query the API for a list of distinct values for a field", "operationId": "Get-EventDistinct", "parameters": [ { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/EventDistinctQuery" } } ], "responses": { "200": { "description": "List of distinct field values", "schema": { "$ref": "#/definitions/EventCount" } }, "400": { "description": "Invalid/unknown query JSON body", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "401": { "description": "Unauthorized (Invalid API Key)", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "402": { "description": "Directory Insights is not enabled for your organization", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "500": { "description": "Technical difficulties processing your request", "schema": { "$ref": "#/definitions/ErrorMessage" } } }, "security": [ { "x-api-key": [] }, { "x-org-id": [] } ], "summary": "Query event distinct field values" } }, "/events/interval": { "post": { "description": "Query the API for a list of counts by time interval", "operationId": "Get-EventInterval", "parameters": [ { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/EventIntervalQuery" } } ], "responses": { "200": { "description": "List of bucketed event counts", "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array" } }, "400": { "description": "Invalid/unknown query JSON body", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "401": { "description": "Unauthorized (Invalid API Key)", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "402": { "description": "Directory Insights is not enabled for your organization", "schema": { "$ref": "#/definitions/ErrorMessage" } }, "500": { "description": "Technical difficulties processing your request", "schema": { "$ref": "#/definitions/ErrorMessage" } } }, "security": [ { "x-api-key": [] }, { "x-org-id": [] } ], "summary": "Query event counts by bucketed by a time interval" } } }, "produces": [ "application/json" ], "schemes": [ "https" ], "securityDefinitions": { "x-api-key": { "in": "header", "name": "x-api-key", "type": "apiKey" }, "x-org-id": { "in": "header", "name": "x-org-id", "type": "apiKey" } }, "swagger": "2.0" } |