diff --git a/_data/api/miscellaneous.yml b/_data/api/miscellaneous.yml new file mode 100644 index 00000000..038922cd --- /dev/null +++ b/_data/api/miscellaneous.yml @@ -0,0 +1,1097 @@ +openapi: 3.0.1 +category: + title: Miscellaneous Information + description: Just some generic information, such as information about the server and authenticated user. + version: "1.0.0" +servers: + - url: 'http://localhost:3000' +paths: + /api/v1/directory: + get: + description: Search by users or channels on all server. + authentication: true + parameters: + - name: query + required: true + description: When type is users you can send an additional workspace field, that can be local (default) or all. workspace=all will work only if Federation is enabled. + in: query + schema: + type: string + example: >- + %7B%22text%22%3A%20%22rocket%22%2C%20%22type%22%3A%20%22users%22%2C%20%22workspace%22%3A%20%22local%22%7D + - name: X-User-Id + in: header + schema: + type: string + example: bszJr4E8EHAtLqfX4 + - name: X-Auth-Token + in: header + schema: + type: string + example: ItYC6vCdugENsn2v8roajraPD55VisDDWcjD8Ya5C6t + responses: + '200': + description: Auto generated using Swagger Inspector + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + createdAt: + type: string + name: + type: string + _id: + type: string + username: + type: string + total: + type: integer + offset: + type: integer + success: + type: boolean + count: + type: integer + examples: + '0': + value: |- + { + "result": [ + { + "_id": "rocket.cat", + "createdAt": "2019-02-22T18:02:33.957Z", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + ], + "count": 1, + "offset": 0, + "total": 1, + "success": true + } + changelog: + - version: 1.0.0 + description: Added `workspace` query param + - version: 0.65.0 + description: Added Pagination fields':' `count`, `total`, `offset` + - version: 0.64.0 + description: Added + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' + /api/v1/shield.svg: + get: + description: Gets the shield svg(badge) to add in your website. + parameters: + - name: type + required: false + description: Can be one of `online`, `user`, `channel` + in: query + schema: + type: string + example: online + - name: icon + required: false + description: + in: query + schema: + type: boolean + example: false + - name: channel + required: false + description: Name of the channel + in: query + schema: + type: string + example: general + - name: name + required: false + description: Name to show + in: query + schema: + type: string + example: Rocket.Chat + responses: + '200': + description: A simple method, requires no authentication, that returns the shield svg(badge) to add in your website. It must have `API_Enable_Shields` enabled. + content: + image/svg+xml;charset=utf-8: + schema: + type: string + examples: {} + changelog: + - version: 0.55.0 + description: Added + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' + /api/info: + get: + description: Information about the Rocket.Chat server. + authentication: false + responses: + '200': + description: A simple method, requires no authentication, that returns information about the server including version information. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + version: + type: string + examples: + '0': + value: |- + { + "version": "1.1.0-develop", + "success": true + } + changelog: + - version: 0.13.0 + description: Added + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' + /api/v1/spotlight: + get: + description: Searches for users or rooms that are visible to the user. + authentication: true + parameters: + - name: query + required: true + description: The term to be searched. Supports `#` for channels and `@` for users + in: query + schema: + type: string + example: '%40test.user' + - name: X-User-Id + in: header + schema: + type: string + example: bszJr4E8EHAtLqfX4 + - name: X-Auth-Token + in: header + schema: + type: string + example: ItYC6vCdugENsn2v8roajraPD55VisDDWcjD8Ya5C6t + responses: + '200': + description: Searches for users or rooms that are visible to the user. WARNING':' It will only return rooms that user didn’t join yet. + content: + application/json: + schema: + type: object + properties: + rooms: + type: array + items: + type: string + success: + type: boolean + users: + type: array + items: + type: object + properties: + name: + type: string + _id: + type: string + status: + type: string + username: + type: string + examples: + '0': + value: |- + { + "users": [ + { + "_id": "bszJr4E8EHAtLqfX4", + "status": "offline", + "name": "Test User", + "username": "test.user" + } + ], + "rooms": [], + "success": true + } + changelog: + - version: 0.64.0 + description: Added support to `#` and `@` searches, for channels and users respectively. + - version: 0.61.0 + description: Added. + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' + /api/v1/statistics.list/: + get: + description: Selectable statistics about the Rocket.Chat server. + authentication: true + parameters: + - name: query + required: true + description: See Query Parameter + in: query + schema: + type: string + example: '%7B%22_id%22%3A%22j3rw9bKLktWtgmmiA%22%7D' + - name: offset + required: false + description: See Offset Parameter + in: query + schema: + type: integer + example: 0 + - name: count + required: false + description: See Count Parameter + in: query + schema: + type: integer + example: 1 + - name: fields + required: false + description: See Fields Parameter + in: query + schema: + type: string + example: '{"os":0,"migration":0,"deploy":0,"process":0}' + - name: sort + required: false + description: See Sort Query Parameter + in: query + schema: + type: string + example: '{"_id":1}' + - name: X-User-Id + in: header + schema: + type: string + example: MERRYtT6iA9ZghsdK + - name: X-Auth-Token + in: header + schema: + type: string + example: uhvKflfBEDN4jDDvIMVK1qVzEwSO2oWRAMAELlY2SeK + responses: + '200': + description: + content: + application/json: + schema: + type: object + properties: + total: + type: integer + offset: + type: integer + success: + type: boolean + count: + type: integer + statistics: + type: array + items: + type: object + properties: + totalDirectMessages: + type: integer + totalLivechatAgents: + type: integer + totalUsers: + type: integer + totalChannels: + type: integer + uploadsTotalSize: + type: integer + installedAt: + type: string + totalLivechatMessages: + type: integer + awayUsers: + type: integer + uniqueDevicesOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + deploy: + type: object + properties: + method: + type: string + platform: + type: string + createdAt: + type: string + totalLivechatVisitors: + type: integer + livechatEnabled: + type: boolean + _updatedAt: + type: string + totalPrivateGroups: + type: integer + process: + type: object + properties: + nodeVersion: + type: string + pid: + type: integer + uptime: + type: number + totalPrivateGroupMessages: + type: integer + oplogEnabled: + type: boolean + os: + type: object + properties: + cpus: + type: array + items: + type: object + properties: + times: + type: object + properties: + idle: + type: integer + irq: + type: integer + sys: + type: integer + user: + type: integer + nice: + type: integer + model: + type: string + speed: + type: integer + release: + type: string + totalmem: + type: number + arch: + type: string + freemem: + type: integer + type: + type: string + loadavg: + type: array + items: + type: number + platform: + type: string + uptime: + type: integer + offlineUsers: + type: integer + onlineUsers: + type: integer + activeUsers: + type: integer + uploadsTotal: + type: integer + uniqueUsersOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + version: + type: string + totalRooms: + type: integer + totalChannelMessages: + type: integer + mongoVersion: + type: string + uniqueOSOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + totalLivechat: + type: integer + uniqueUsersOfLastMonth: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + nonActiveUsers: + type: integer + instanceCount: + type: integer + totalMessages: + type: integer + migration: + type: object + properties: + _id: + type: string + locked: + type: boolean + version: + type: integer + totalDirect: + type: integer + wizard: + type: object + properties: + organizationType: + type: string + country: + type: string + website: + type: string + organizationName: + type: string + size: + type: string + serverType: + type: string + siteName: + type: string + industry: + type: string + language: + type: string + allowMarketingEmails: + type: boolean + _id: + type: string + uniqueId: + type: string + examples: + '0': + value: |- + { + "statistics": [ + { + "_id": "j3rw9bKLktWtgmmiA", + "wizard": { + "organizationType": "", + "organizationName": "", + "industry": "", + "size": "", + "country": "", + "website": "", + "siteName": "Rocket.Chat", + "language": "", + "serverType": "", + "allowMarketingEmails": true + }, + "uniqueId": "maWzifv5JWbsCXrum", + "installedAt": "2019-02-22T17:59:58.139Z", + "version": "0.74.0-develop", + "totalUsers": 1, + "activeUsers": 1, + "nonActiveUsers": 0, + "onlineUsers": 0, + "awayUsers": 0, + "offlineUsers": 1, + "totalRooms": 1, + "totalChannels": 1, + "totalPrivateGroups": 0, + "totalDirect": 0, + "totalLivechat": 0, + "totalLivechatVisitors": 0, + "totalLivechatAgents": 0, + "livechatEnabled": false, + "totalMessages": 0, + "totalChannelMessages": 0, + "totalPrivateGroupMessages": 0, + "totalDirectMessages": 0, + "totalLivechatMessages": 0, + "os": { + "type": "Linux", + "platform": "linux", + "arch": "x64", + "release": "4.18.0-15-generic", + "uptime": 145639, + "loadavg": [ + 9.0751953125, + 6.27197265625, + 4.82177734375 + ], + "totalmem": 3977756672, + "freemem": 120721408, + "cpus": [ + { + "model": "Intel(R) Celeron(R) CPU N3050 @ 1.60GHz", + "speed": 2160, + "times": { + "user": 79215200, + "nice": 165300, + "sys": 23987700, + "idle": 408054500, + "irq": 0 + } + }, + { + "model": "Intel(R) Celeron(R) CPU N3050 @ 1.60GHz", + "speed": 2160, + "times": { + "user": 75728600, + "nice": 196600, + "sys": 23065000, + "idle": 179959700, + "irq": 0 + } + } + ] + }, + "process": { + "nodeVersion": "v8.11.4", + "pid": 28379, + "uptime": 309.114 + }, + "deploy": { + "method": "tar", + "platform": "selfinstall" + }, + "uploadsTotal": 0, + "uploadsTotalSize": 0, + "migration": { + "_id": "control", + "locked": false, + "version": 137 + }, + "instanceCount": 1, + "oplogEnabled": true, + "mongoVersion": "4.0.2", + "uniqueUsersOfYesterday": { + "year": 2019, + "month": 2, + "day": 21, + "data": [] + }, + "uniqueUsersOfLastMonth": { + "year": 2019, + "month": 1, + "data": [] + }, + "uniqueDevicesOfYesterday": { + "year": 2019, + "month": 2, + "day": 21, + "data": [] + }, + "uniqueOSOfYesterday": { + "year": 2019, + "month": 2, + "day": 21, + "data": [] + }, + "createdAt": "2019-02-22T18:02:36.207Z", + "_updatedAt": "2019-02-22T18:02:36.207Z" + } + ], + "count": 1, + "offset": 0, + "total": 1, + "success": true + } + changelog: + - version: 0.51.0 + description: Added + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' + /api/v1/statistics: + get: + description: Statistics about the Rocket.Chat server. + authentication: true + parameters: + - name: refresh + required: false + description: Need to refresh statistics + in: query + schema: + type: boolean + example: false + - name: X-User-Id + in: header + schema: + type: string + example: MERRYtT6iA9ZghsdK + - name: X-Auth-Token + in: header + schema: + type: string + example: uhvKflfBEDN4jDDvIMVK1qVzEwSO2oWRAMAELlY2SeK + responses: + '200': + description: Statistics about the Rocket.Chat server. Requires `view-statistics` permission. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + statistics: + type: object + properties: + totalDirectMessages: + type: integer + lastLogin: + type: string + totalLivechatAgents: + type: integer + totalUsers: + type: integer + totalChannels: + type: integer + uploadsTotalSize: + type: integer + installedAt: + type: string + uniqueOSOfLastMonth: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + totalLivechatMessages: + type: integer + awayUsers: + type: integer + uniqueDevicesOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + lastSeenSubscription: + type: string + deploy: + type: object + properties: + method: + type: string + platform: + type: string + totalThreads: + type: integer + createdAt: + type: string + totalLivechatVisitors: + type: integer + livechatEnabled: + type: boolean + totalDiscussions: + type: integer + mongoStorageEngine: + type: string + _updatedAt: + type: string + totalPrivateGroups: + type: integer + process: + type: object + properties: + nodeVersion: + type: string + pid: + type: integer + uptime: + type: number + totalPrivateGroupMessages: + type: integer + oplogEnabled: + type: boolean + os: + type: object + properties: + cpus: + type: array + items: + type: object + properties: + times: + type: object + properties: + idle: + type: integer + irq: + type: integer + sys: + type: integer + user: + type: integer + nice: + type: integer + model: + type: string + speed: + type: integer + release: + type: string + totalmem: + type: number + arch: + type: string + freemem: + type: integer + type: + type: string + loadavg: + type: array + items: + type: number + platform: + type: string + uptime: + type: integer + lastMessageSentAt: + type: string + uniqueDevicesOfLastMonth: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + offlineUsers: + type: integer + onlineUsers: + type: integer + activeUsers: + type: integer + uploadsTotal: + type: integer + uniqueUsersOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + totalConnectedUsers: + type: integer + version: + type: string + totalRooms: + type: integer + totalChannelMessages: + type: integer + mongoVersion: + type: string + uniqueOSOfYesterday: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + totalLivechat: + type: integer + uniqueUsersOfLastMonth: + type: object + properties: + month: + type: integer + data: + type: array + items: + type: string + year: + type: integer + day: + type: integer + nonActiveUsers: + type: integer + instanceCount: + type: integer + totalMessages: + type: integer + migration: + type: object + properties: + buildAt: + type: string + lockedAt: + type: string + _id: + type: string + locked: + type: boolean + version: + type: integer + totalDirect: + type: integer + wizard: + type: object + properties: + country: + type: string + website: + type: string + organizationName: + type: string + contactEmail: + type: string + registerServer: + type: boolean + contactName: + type: string + siteName: + type: string + industry: + type: string + language: + type: string + allowMarketingEmails: + type: boolean + organizationType: + type: string + size: + type: string + serverType: + type: string + _id: + type: string + uniqueId: + type: string + examples: + '0': + value: |- + { + "statistics": { + "_id": "dcw7Yo7rzu5dseq89", + "wizard": { + "organizationType": "nonprofit", + "organizationName": "Talentals", + "industry": "other", + "size": "0", + "country": "cameroon", + "website": "talentals.org", + "siteName": "talentals", + "language": "en", + "serverType": "", + "allowMarketingEmails": false, + "registerServer": true, + "contactName": "Jaro", + "contactEmail": "talentals@mail.com" + }, + "uniqueId": "maWzifv5JWbsCXrum", + "installedAt": "2019-02-22T17:59:58.139Z", + "version": "1.1.0-develop", + "totalUsers": 11, + "activeUsers": 11, + "nonActiveUsers": 0, + "onlineUsers": 0, + "awayUsers": 1, + "totalConnectedUsers": 1, + "offlineUsers": 10, + "totalRooms": 11, + "totalChannels": 2, + "totalPrivateGroups": 2, + "totalDirect": 7, + "totalLivechat": 0, + "totalDiscussions": 0, + "totalThreads": 1, + "totalLivechatVisitors": 0, + "totalLivechatAgents": 1, + "livechatEnabled": false, + "totalMessages": 89, + "totalChannelMessages": 64, + "totalPrivateGroupMessages": 3, + "totalDirectMessages": 25, + "totalLivechatMessages": 0, + "lastLogin": "2019-05-16T15:30:54.103Z", + "lastMessageSentAt": "2019-05-03T08:37:18.460Z", + "lastSeenSubscription": "2019-05-03T08:37:18.834Z", + "os": { + "type": "Linux", + "platform": "linux", + "arch": "x64", + "release": "4.18.0-15-generic", + "uptime": 8226, + "loadavg": [ + 1.92333984375, + 2.30029296875, + 2.9765625 + ], + "totalmem": 3977764864, + "freemem": 249085952, + "cpus": [ + { + "model": "Intel(R) Celeron(R) CPU N3050 @ 1.60GHz", + "speed": 930, + "times": { + "user": 39443800, + "nice": 44400, + "sys": 8878600, + "idle": 25824500, + "irq": 0 + } + }, + { + "model": "Intel(R) Celeron(R) CPU N3050 @ 1.60GHz", + "speed": 636, + "times": { + "user": 39548100, + "nice": 57200, + "sys": 8701800, + "idle": 26173400, + "irq": 0 + } + } + ] + }, + "process": { + "nodeVersion": "v8.11.4", + "pid": 7595, + "uptime": 3942.587 + }, + "deploy": { + "method": "tar", + "platform": "selfinstall" + }, + "uploadsTotal": 3, + "uploadsTotalSize": 5080710, + "migration": { + "_id": "control", + "locked": false, + "version": 145, + "buildAt": "2019-05-16T14:40:34.096Z", + "lockedAt": "2019-05-16T14:51:41.122Z" + }, + "instanceCount": 1, + "oplogEnabled": true, + "mongoVersion": "4.0.2", + "mongoStorageEngine": "wiredTiger", + "uniqueUsersOfYesterday": { + "year": 2019, + "month": 5, + "day": 15, + "data": [] + }, + "uniqueUsersOfLastMonth": { + "year": 2019, + "month": 4, + "day": 16, + "data": [] + }, + "uniqueDevicesOfYesterday": { + "year": 2019, + "month": 5, + "day": 15, + "data": [] + }, + "uniqueDevicesOfLastMonth": { + "year": 2019, + "month": 5, + "day": 15, + "data": [] + }, + "uniqueOSOfYesterday": { + "year": 2019, + "month": 5, + "day": 15, + "data": [] + }, + "uniqueOSOfLastMonth": { + "year": 2019, + "month": 5, + "day": 15, + "data": [] + }, + "createdAt": "2019-05-16T15:53:01.430Z", + "_updatedAt": "2019-05-16T15:53:01.430Z" + }, + "success": true + } + changelog: + - version: 0.51.0 + description: Added + servers: + - url: 'http://localhost:3000' + servers: + - url: 'http://localhost:3000' +components: + securitySchemes: + basic: + type: http + scheme: basic