openapi: 3.2.0 info: title: Ant Media Server Management Panel REST API Management API description: Ant Media Server Management Panel REST API contact: name: Ant Media Info url: https://antmedia.io email: contact@antmedia.io license: name: Apache 2.0 url: http://www.apache.org version: v2.0 servers: - url: https://{ant-media-server}:5443/rest/ description: Ant Media Server management panel REST base. Ant Media Server is self-hosted, so the host is the customer's own server; port 5443 and the /rest/ prefix are the values published in the Management Panel REST API guide. variables: ant-media-server: default: your-ant-media-server description: Hostname or IP of your Ant Media Server instance tags: - name: Management paths: /v2/users/initial: post: summary: Creates initial user description: Creates initial user. This is a one time scenario when initial user creation required and shouldn't be used otherwise. User object is required and can't be null operationId: addInitialUser requestBody: description: User object. If it is null, new user won't be created. content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/users: put: summary: Edit the user description: Edit the user in the server management panel's user list. It can change password or user type (admin, read-only). operationId: editUser requestBody: description: User to be edited. It finds the user with username. content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management post: summary: Creates a new user description: Creates a new user. If user object is null or if user is not authenticated, new user won't be created. operationId: addUser requestBody: description: User object. If it is null, new user won't be created. content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/users/authenticate: post: summary: Authenticates user description: Authenticates user with given username and password. Requires user object to authenticate. operationId: authenticateUser requestBody: description: User object to authenticate content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/server-settings: get: summary: Returns the server settings operationId: getServerSettings responses: '200': description: Server settings returned tags: - Management post: summary: Changes server settings operationId: changeServerSettings requestBody: description: Server settings content: application/json: schema: $ref: '#/components/schemas/ServerSettings' required: true responses: '200': description: Server settings changed tags: - Management /v2/applications/settings/{appname}: get: summary: Returns the specified application settings operationId: getSettings parameters: - name: appname in: path description: Application name required: true schema: type: string responses: '200': description: Application settings returned tags: - Management post: summary: Changes the application settings operationId: changeSettings parameters: - name: appname in: path description: Application name required: true schema: type: string requestBody: description: New application settings, null fields will be set to default values content: application/json: schema: $ref: '#/components/schemas/AppSettings' required: true responses: '200': description: Successful operation tags: - Management /v2/users/password: post: summary: Changes the given user's password operationId: changeUserPassword requestBody: description: User object to change the password content: application/json: schema: $ref: '#/components/schemas/User' required: true responses: '200': description: Successful operation tags: - Management /v2/ssl-settings: post: summary: Changes ssl settings operationId: configureSsl parameters: - name: domain in: query description: SSL settings required: true schema: type: string - name: type in: query schema: type: string requestBody: content: multipart/form-data: schema: type: object properties: fullChainFile: $ref: '#/components/schemas/FormDataContentDisposition' privateKeyFile: $ref: '#/components/schemas/FormDataContentDisposition' chainFile: $ref: '#/components/schemas/FormDataContentDisposition' responses: '200': description: SSL settings configured, server will be restarted tags: - Management /v2/applications/{appName}: put: summary: Creates a new application with given name and supports uploading custom WAR files operationId: createApplication_1 parameters: - name: appName in: path description: Name for the new application required: true schema: type: string requestBody: content: multipart/form-data: schema: required: - file type: object properties: file: type: object description: file responses: '200': description: Custom application created successfully tags: - Management post: summary: Creates a new application with given name operationId: createApplication parameters: - name: appName in: path description: Name for the new application required: true schema: type: string responses: '200': description: Application created successfully tags: - Management delete: summary: Deletes application with the given name operationId: deleteApplication parameters: - name: appName in: path description: Name of the application to delete required: true schema: type: string - name: deleteDB in: query description: Whether to delete associated database required: true schema: type: boolean responses: '200': description: Application deleted successfully tags: - Management /v2/users/logout: delete: operationId: deleteSession responses: default: description: default response content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/users/{username}: delete: summary: Delete the user description: Delete the user from the server management panel's user list operationId: deleteUser parameters: - name: username in: path description: User name or e-mail of the user to be deleted required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/applications/live-streams/{appname}: get: summary: Returns live streams in the specified application operationId: getAppLiveStreams parameters: - name: appname in: path description: Application name required: true schema: type: string responses: '200': description: Successful operation tags: - Management /v2/applications/{appName}/metrics-history: get: summary: Gets recent per-application metric history (viewers, live streams) operationId: getAppMetricsHistory parameters: - name: appName in: path description: Application name required: true schema: type: string responses: '200': description: Successful operation tags: - Management /v2/applications-info: get: summary: Gets application info operationId: getApplicationInfo responses: '200': description: Successful operation tags: - Management /v2/applications: get: summary: Gets the applications in the server operationId: getApplications responses: '200': description: Successful operation tags: - Management /v2/users/{usermail}/blocked: get: summary: Returns if user is blocked description: User is blocked for a specific time if there are login attempts operationId: getBlockedStatus parameters: - name: usermail in: path description: User name or e-mail of the user to check its status required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/cpu-status: get: summary: Returns system cpu load, process cpu load and process cpu time operationId: getCPUInfo responses: '200': description: Successful operation tags: - Management /v2/file-system-status: get: summary: Gets system file status operationId: getFileSystemInfo responses: '200': description: Successful operation tags: - Management /v2/gpu-status: get: summary: Gets GPU information operationId: getGPUInfo responses: '200': description: Successful operation tags: - Management /v2/heap-dump: get: summary: Returns heap dump operationId: getHeapDump responses: '200': description: Returns the heap dump tags: - Management /v2/jvm-memory-status: get: summary: Returns JVM memory information operationId: getJVMMemoryInfo responses: '200': description: Successful operation tags: - Management /v2/last-licence-status: get: summary: Returns the last checked license status operationId: getLicenceStatus responses: '200': description: Last checked license status returned tags: - Management /v2/licence-status: get: summary: Returns license status operationId: getLicenceStatus_1 parameters: - name: key in: query description: License key required: true schema: type: string responses: '200': description: License status returned tags: - Management /v2/log-file/{offsetSize}/{charSize}: get: summary: Gets log file operationId: getLogFile parameters: - name: charSize in: path description: Char size of the log required: true schema: type: integer format: int32 - name: logType in: query description: Log type. ERROR can be used to get only error logs required: true schema: type: string - name: offsetSize in: path description: Offset of the retrieved log required: true schema: type: integer format: int64 responses: '200': description: Log file retrieved successfully tags: - Management /v2/network-status: get: summary: Gets current network throughput across physical NICs operationId: getNetworkStatus responses: '200': description: Successful operation tags: - Management /v2/server-time: get: summary: Gets server time operationId: getServerTime responses: '200': description: Successful operation tags: - Management /v2/system-status: get: summary: Returns system information operationId: getSystemInfo responses: '200': description: Successful operation tags: - Management /v2/system-memory-status: get: summary: Gets system memory status operationId: getSystemMemoryInfo responses: '200': description: Successful operation tags: - Management /v2/system-resources/history: get: summary: Gets recent system resource usage history operationId: getSystemResourcesHistory responses: '200': description: Successful operation tags: - Management /v2/system-resources: get: summary: Gets system resource information operationId: getSystemResourcesInfo responses: '200': description: Successful operation tags: - Management /v2/thread-dump: get: summary: Gets thread dump in plain text operationId: getThreadDump responses: '200': description: Successful operation tags: - Management /v2/thread-dump-json: get: summary: Gets thread dump in json format operationId: getThreadDumpJSON responses: '200': description: Successful operation tags: - Management /v2/threads: get: summary: Returns processor's thread information operationId: getThreadsInfo responses: '200': description: Successful operation tags: - Management /v2/live-clients-size: get: summary: Returns total number of live streams operationId: getTotalLiveStreamSize responses: '200': description: Successful operation tags: - Management /v2/user-list: get: summary: Returns user list description: Returns user list in the server management panel operationId: getUserList responses: '200': description: Successful operation content: application/json: schema: type: string tags: - Management /v2/version: get: summary: Returns the version of Ant Media Server operationId: getVersion responses: '200': description: Successful operation tags: - Management /v2/admin-status: get: summary: Returns admin status description: Returns whether current user is admin or not. If user is admin, it can call POST/PUT/DELETE methods operationId: isAdmin responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/authentication-status: get: summary: Returns true if user is authenticated to call rest api operations operationId: isAuthenticatedRest responses: '200': description: Successful operation tags: - Management /v2/enterprise-edition: get: summary: Returns true if the server is enterprise edition operationId: isEnterpriseEdition responses: '200': description: Enterprise edition status tags: - Management /v2/first-login-status: get: summary: Checks first login status description: Checks first login status. If server being logged in first time, it returns true, otherwise false. operationId: isFirstLogin responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management /v2/shutdown-proper-status: get: summary: Checks whether application or applications have shutdown properly operationId: isShutdownProperly parameters: - name: appNames in: query description: Application name required: true schema: type: string responses: '200': description: Returns the shutdown status of entered applications. '400': description: Either entered in wrong format or typed incorrectly application names tags: - Management /v2/liveness: get: summary: Returns the hostname to check liveness with HTTP type healthcheck operationId: liveness responses: '200': description: Liveness check response tags: - Management /v2/applications/{appname}/reset: post: summary: Resets the viewer counts and broadcasts statuses in the db operationId: resetBroadcast parameters: - name: appname in: path description: Application name required: true schema: type: string responses: '200': description: Broadcasts reset successfully tags: - Management /v2/shutdown-properly: get: summary: Set application or applications shutdown property to true operationId: setShutdownStatus parameters: - name: appNames in: query description: Application name required: true schema: type: string responses: '200': description: Shutdown status set tags: - Management /v2/system/gc: post: summary: Trigger garbage collector operationId: triggerGc responses: '200': description: Garbage collection triggered tags: - Management /v2/support/request: post: operationId: sendSupportRequest requestBody: content: application/json: schema: $ref: '#/components/schemas/SupportRequest' responses: default: description: default response content: application/json: schema: $ref: '#/components/schemas/Result' tags: - Management components: schemas: AppSettings: type: object properties: remoteAllowedCIDR: type: string mp4MuxingEnabled: type: boolean webMMuxingEnabled: type: boolean addDateTimeToMp4FileName: type: boolean fileNameFormat: type: string hlsMuxingEnabled: type: boolean encoderSettingsString: type: string signalingEnabled: type: boolean signalingAddress: type: string hlsListSize: type: string hlsTime: type: string uploadExtensionsToS3: type: integer format: int32 s3StorageClass: type: string endpointHealthCheckPeriodMs: type: integer format: int32 endpointRepublishLimit: type: integer format: int32 endpointLiveEdgeEnabled: type: boolean dashSegDuration: type: string dashFragmentDuration: type: string targetLatency: type: string dashWindowSize: type: string dashExtraWindowSize: type: string hlsEnabledViaDash: type: boolean useTimelineDashMuxing: type: boolean webRTCEnabled: type: boolean useOriginalWebRTCEnabled: type: boolean deleteHLSFilesOnEnded: type: boolean deleteDASHFilesOnEnded: type: boolean tokenHashSecret: type: string hashControlPublishEnabled: type: boolean hashControlPlayEnabled: type: boolean listenerHookURL: type: string acceptOnlyStreamsInDataStore: type: boolean acceptOnlyRoomsInDataStore: type: boolean publishTokenControlEnabled: type: boolean playTokenControlEnabled: type: boolean enableTimeTokenForPlay: type: boolean timeTokenSecretForPlay: type: string enableTimeTokenForPublish: type: boolean timeTokenSecretForPublish: type: string timeTokenPeriod: type: integer format: int32 hlsPlayListType: type: string hlsSegmentType: type: string hlsSegmentFileSuffixFormat: type: string previewOverwrite: type: boolean createPreviewPeriod: type: integer format: int32 restartStreamFetcherPeriod: type: integer format: int32 startStreamFetcherAutomatically: type: boolean streamFetcherBufferTime: type: integer format: int32 hlsflags: type: string mySqlClientPath: type: string muxerFinishScript: type: string streamStartedScript: type: string streamEndedScript: type: string streamIdleTimeoutScript: type: string webRTCFrameRate: type: integer format: int32 webRTCPortRangeMin: type: integer format: int32 webRTCPortRangeMax: type: integer format: int32 stunServerURI: type: string turnServerUsername: type: string turnServerCredential: type: string webRTCTcpCandidatesEnabled: type: boolean webRTCSdpSemantics: type: string portAllocatorFlags: type: integer format: int32 encoderName: type: string encoderParameters: type: object additionalProperties: type: object additionalProperties: type: string encoderThreadCount: type: integer format: int32 encoderThreadType: type: integer format: int32 vp8EncoderThreadCount: type: integer format: int32 previewHeight: type: integer format: int32 generatePreview: type: boolean previewFormat: type: string previewQuality: type: integer format: int32 writeStatsToDatastore: type: boolean encoderSelectionPreference: type: string allowedPublisherCIDR: type: string excessiveBandwidthValue: type: integer format: int32 excessiveBandwidthCallThreshold: type: integer format: int32 excessiveBandwithTryCountBeforeSwitchback: type: integer format: int32 excessiveBandwidthAlgorithmEnabled: type: boolean packetLossDiffThresholdForSwitchback: type: integer format: int32 rttMeasurementDiffThresholdForSwitchback: type: integer format: int32 replaceCandidateAddrWithServerAddr: type: boolean appName: type: string webRTCClientStartTimeoutMs: type: integer format: int32 updateTime: type: integer format: int64 httpForwardingExtension: type: string httpForwardingBaseURL: type: string maxAnalyzeDurationMS: type: integer format: int32 disableIPv6Candidates: type: boolean rtspPullTransportType: type: string rtspTimeoutDurationMs: type: integer format: int32 maxFpsAccept: type: integer format: int32 maxResolutionAccept: type: integer format: int32 maxBitrateAccept: type: integer format: int32 h264Enabled: type: boolean vp8Enabled: type: boolean av1Enabled: type: boolean h265Enabled: type: boolean dataChannelEnabled: type: boolean dataChannelPlayerDistribution: type: string rtmpIngestBufferTimeMs: type: integer format: int64 dataChannelWebHookURL: type: string heightRtmpForwarding: type: integer format: int32 audioBitrateSFU: type: integer format: int32 dashMuxingEnabled: type: boolean aacEncodingEnabled: type: boolean gopSize: type: integer format: int32 webRTCViewerLimit: type: integer format: int32 appStatus: type: string appInstallationTime: type: integer format: int64 pullWarFile: type: boolean warFileOriginServerAddress: type: string jwtSecretKey: type: string jwtControlEnabled: type: boolean ipFilterEnabled: type: boolean ingestingStreamLimit: type: integer format: int32 webRTCKeyframeTime: type: integer format: int32 jwtStreamSecretKey: type: string publishJwtControlEnabled: type: boolean playJwtControlEnabled: type: boolean dashHttpStreaming: type: boolean subFolder: type: string s3StreamsFolderPath: type: string s3PreviewsFolderPath: type: string dashHttpEndpoint: type: string hlsHttpEndpoint: type: string forceDecoding: type: boolean addOriginalMuxerIntoHLSPlaylist: type: boolean s3RecordingEnabled: type: boolean s3AccessKey: type: string s3SecretKey: type: string s3BucketName: type: string s3RegionName: type: string s3Endpoint: type: string s3CacheControl: type: string s3PathStyleAccessEnabled: type: boolean s3Permission: type: string s3TransferBufferSizeInBytes: type: integer format: int32 hlsEncryptionKeyInfoFile: type: string jwksURL: type: string forceAspectRatioInTranscoding: type: boolean webhookAuthenticateURL: type: string maxAudioTrackCount: type: integer format: int32 maxVideoTrackCount: type: integer format: int32 vodUploadFinishScript: type: string contentSecurityPolicyHeaderValue: type: string rtmpPlaybackEnabled: type: boolean originEdgeIdleTimeout: type: integer format: int32 addDateTimeToHlsFileName: type: boolean playWebRTCStreamOnceForEachSession: type: boolean statsBasedABREnabled: type: boolean abrDownScalePacketLostRatio: type: number format: float abrUpScalePacketLostRatio: type: number format: float abrUpScaleRTTMs: type: integer format: int32 abrUpScaleJitterMs: type: integer format: int32 clusterCommunicationKey: type: string id3TagEnabled: type: boolean sendAudioLevelToViewers: type: boolean audioLevelThreshold: type: integer format: int32 hwScalingEnabled: type: boolean hwDecoderEnabled: type: boolean firebaseAccountKeyJSON: type: string subscriberAuthenticationKey: type: string apnsServer: type: string apnTeamId: type: string apnPrivateKey: type: string apnKeyId: type: string webhookRetryCount: type: integer format: int32 secureAnalyticEndpoint: type: boolean webhookRetryDelay: type: integer format: int64 webhookStreamStatusUpdatePeriodMs: type: integer format: int64 webhookPlayAuthUrl: type: string recordingSubfolder: type: string webhookContentType: type: string iceGatheringTimeoutMs: type: integer format: int64 participantVisibilityMatrix: type: object additionalProperties: type: array items: type: string customSettings: type: object additionalProperties: type: object relayRTMPMetaDataToMuxers: type: boolean dropWebRTCIngestIfNoPacketReceived: type: boolean srtReceiveLatencyInMs: type: integer format: int32 encodingQueueSize: type: integer format: int32 writeSubscriberEventsToDatastore: type: boolean disableAudio: type: boolean encoderSettings: type: array items: $ref: '#/components/schemas/EncoderSettings' lldashEnabled: type: boolean llhlsenabled: type: boolean ApplicationContext: type: object properties: parent: $ref: '#/components/schemas/ApplicationContext' id: type: string displayName: type: string startupDate: type: integer format: int64 applicationName: type: string autowireCapableBeanFactory: $ref: '#/components/schemas/AutowireCapableBeanFactory' environment: $ref: '#/components/schemas/Environment' beanDefinitionCount: type: integer format: int32 beanDefinitionNames: type: array items: type: string parentBeanFactory: $ref: '#/components/schemas/BeanFactory' classLoader: type: object properties: name: type: string registeredAsParallelCapable: type: boolean parent: type: object properties: name: type: string registeredAsParallelCapable: type: boolean unnamedModule: type: object properties: name: type: string classLoader: type: object properties: name: type: string registeredAsParallelCapable: type: boolean definedPackages: type: array items: type: object properties: name: type: string annotations: type: array items: type: object declaredAnnotations: type: array items: type: object sealed: type: boolean specificationTitle: type: string specificationVersion: type: string specificationVendor: type: string implementationTitle: type: string implementationVersion: type: string implementationVendor: type: string defaultAssertionStatus: type: boolean writeOnly: true descriptor: type: object properties: open: type: boolean automatic: type: boolean named: type: boolean annotations: type: array items: type: object declaredAnnotations: type: array items: type: object packages: uniqueItems: true type: array items: type: string nativeAccessEnabled: type: boolean layer: type: object definedPackages: type: array items: type: object properties: name: type: string annotations: type: array items: type: object declaredAnnotations: type: array items: type: object sealed: type: boolean specificationTitle: type: string specificationVersion: type: string specificationVendor: type: string implementationTitle: type: string implementationVersion: type: string implementationVendor: type: string defaultAssertionStatus: type: boolean writeOnly: true unnamedModule: type: object properties: name: type: string classLoader: type: object properties: name: type: string registeredAsParallelCapable: type: boolean definedPackages: type: array items: type: object properties: name: type: string annotations: type: array items: type: object declaredAnnotations: type: array items: type: object sealed: type: boolean specificationTitle: type: string specificationVersion: type: string specificationVendor: type: string implementationTitle: type: string implementationVersion: type: string implementationVendor: type: string defaultAssertionStatus: type: boolean writeOnly: true descriptor: type: object properties: open: type: boolean automatic: type: boolean named: type: boolean annotations: type: array items: type: object declaredAnnotations: type: array items: type: object packages: uniqueItems: true type: array items: type: string nativeAccessEnabled: type: boolean layer: type: object definedPackages: type: array items: type: object properties: name: type: string annotations: type: array items: type: object declaredAnnotations: type: array items: type: object sealed: type: boolean specificationTitle: type: string specificationVersion: type: string specificationVendor: type: string implementationTitle: type: string implementationVersion: type: string implementationVendor: type: string defaultAssertionStatus: type: boolean writeOnly: true AutowireCapableBeanFactory: type: object BeanFactory: type: object EncoderSettings: type: object properties: height: type: integer format: int32 videoBitrate: type: integer format: int32 audioBitrate: type: integer format: int32 forceEncode: type: boolean forceSameResolutionEncode: type: boolean Environment: type: object properties: activeProfiles: type: array items: type: string defaultProfiles: type: array items: type: string FormDataContentDisposition: type: object properties: type: type: string parameters: type: object additionalProperties: type: string fileName: type: string creationDate: type: string format: date-time modificationDate: type: string format: date-time readDate: type: string format: date-time size: type: integer format: int64 name: type: string Result: type: object properties: success: type: boolean description: The result of the operation message: type: string description: The message of the operation result dataId: type: string description: The id of the record if operation is about adding a record errorId: type: integer description: The id of error of the operation result format: int32 description: The basic result class ServerSettings: type: object properties: allowedDashboardCIDR: type: string hostAddress: type: string serverName: type: string licenceKey: type: string buildForMarket: type: boolean marketplace: type: string logLevel: type: string offlineLicense: type: boolean nativeLogLevel: type: string heartbeatEnabled: type: boolean useGlobalIp: type: boolean proxyAddress: type: string nodeGroup: type: string cpuMeasurementPeriodMs: type: integer format: int32 cpuMeasurementWindowSize: type: integer format: int32 metricsHistorySamplePeriodMs: type: integer format: int32 metricsHistorySize: type: integer format: int32 appMetricsHistorySamplePeriodMs: type: integer format: int32 appMetricsHistorySize: type: integer format: int32 streamMetricsHistorySize: type: integer format: int32 defaultHttpPort: type: integer format: int32 jwtServerControlEnabled: type: boolean jwtServerSecretKey: type: string jwksURL: type: string originServerPort: type: integer format: int32 srtPort: type: integer format: int32 appIngestsSrtStreamsWithoutStreamId: type: string sslEnabled: type: boolean rtmpPort: type: integer format: int32 serverStatusWebHookURL: type: string localLicenceServerIps: type: string applicationContext: $ref: '#/components/schemas/ApplicationContext' hostAddressFromEnvironment: type: string webRTCLogLevel: type: string enum: - LS_VERBOSE - LS_INFO - LS_WARNING - LS_ERROR - LS_NONE rtmpsEnabled: type: boolean writeOnly: true SupportRequest: type: object properties: name: type: string email: type: string title: type: string description: type: string sendSystemInfo: type: boolean User: type: object properties: email: type: string description: The email of the user password: type: string description: The password of the user writeOnly: true userType: type: string description: The type of the user enum: - ADMIN - READ_ONLY - USER - ADMIN - READ-ONLY - USER scope: type: string description: The scope of the user. If it's 'system', it can access system-level stuff. If it's an application name, it can access application-level stuff. appNameUserType: type: object additionalProperties: type: string description: Holds app -> scope of access data. After 2.9.1 users can have multiple app access with different access types. description: Holds app -> scope of access data. After 2.9.1 users can have multiple app access with different access types. newPassword: type: string description: The new password of the user writeOnly: true firstName: type: string description: The first name of the user lastName: type: string description: The last name of the user fullName: type: string description: The full name of the user picture: type: string description: The URL of the user's picture description: The user information externalDocs: url: https://docs.antmedia.io/guides/developer-sdk-and-api/rest-api-guide/management-rest-apis/ description: Management Panel REST API Services