naftiko: 1.0.0-alpha2 info: label: Discourse API Documentation — Admin description: 'Discourse API Documentation — Admin. 11 operations. Lead operation: List users. Self-contained Naftiko capability covering one Discourse business surface.' tags: - Discourse - Admin created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DISCOURSE_API_KEY: DISCOURSE_API_KEY capability: consumes: - type: http namespace: discourse-admin baseUri: https://{defaultHost} description: Discourse API Documentation — Admin business capability. Self-contained, no shared references. resources: - name: admin-users.json path: /admin/users.json operations: - name: adminlistusers method: GET description: List users outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: order in: query type: string - name: asc in: query type: string - name: page in: query type: integer - name: show_emails in: query type: boolean description: Include user email addresses in response. These requests will - name: stats in: query type: boolean description: Include user stats information - name: email in: query type: string description: Filter to the user with this email address - name: ip in: query type: string description: Filter to users with this IP address - name: admin-users-list-flag}.json path: /admin/users/list/{flag}.json operations: - name: adminlistusersflag method: GET description: List users by flag outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: flag in: path type: string required: true - name: order in: query type: string - name: asc in: query type: string - name: page in: query type: integer - name: show_emails in: query type: boolean description: Include user email addresses in response. These requests will - name: stats in: query type: boolean description: Include user stats information - name: email in: query type: string description: Filter to the user with this email address - name: ip in: query type: string description: Filter to users with this IP address - name: admin-users-id}.json path: /admin/users/{id}.json operations: - name: admingetuser method: GET description: Get a user by id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: deleteuser method: DELETE description: Delete a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: false - name: admin-users-id-activate.json path: /admin/users/{id}/activate.json operations: - name: activateuser method: PUT description: Activate a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: admin-users-id-anonymize.json path: /admin/users/{id}/anonymize.json operations: - name: anonymizeuser method: PUT description: Anonymize a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: admin-users-id-deactivate.json path: /admin/users/{id}/deactivate.json operations: - name: deactivateuser method: PUT description: Deactivate a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: admin-users-id-log_out.json path: /admin/users/{id}/log_out.json operations: - name: logoutuser method: POST description: Log a user out outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: admin-users-id-silence.json path: /admin/users/{id}/silence.json operations: - name: silenceuser method: PUT description: Silence a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: false - name: admin-users-id-suspend.json path: /admin/users/{id}/suspend.json operations: - name: suspenduser method: PUT description: Suspend a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: false - name: user_avatar-username-refresh_gravatar.json path: /user_avatar/{username}/refresh_gravatar.json operations: - name: refreshgravatar method: POST description: Refresh gravatar outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: username in: path type: string required: true exposes: - type: rest namespace: discourse-admin-rest port: 8080 description: REST adapter for Discourse API Documentation — Admin. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/admin/users-json name: admin-users-json description: REST surface for admin-users.json. operations: - method: GET name: adminlistusers description: List users call: discourse-admin.adminlistusers with: order: rest.order asc: rest.asc page: rest.page show_emails: rest.show_emails stats: rest.stats email: rest.email ip: rest.ip outputParameters: - type: object mapping: $. - path: /v1/admin/users/list/flag-json name: admin-users-list-flag-json description: REST surface for admin-users-list-flag}.json. operations: - method: GET name: adminlistusersflag description: List users by flag call: discourse-admin.adminlistusersflag with: flag: rest.flag order: rest.order asc: rest.asc page: rest.page show_emails: rest.show_emails stats: rest.stats email: rest.email ip: rest.ip outputParameters: - type: object mapping: $. - path: /v1/admin/users/id-json name: admin-users-id-json description: REST surface for admin-users-id}.json. operations: - method: GET name: admingetuser description: Get a user by id call: discourse-admin.admingetuser with: id: rest.id outputParameters: - type: object mapping: $. - method: DELETE name: deleteuser description: Delete a user call: discourse-admin.deleteuser with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/activate-json name: admin-users-id-activate-json description: REST surface for admin-users-id-activate.json. operations: - method: PUT name: activateuser description: Activate a user call: discourse-admin.activateuser with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/anonymize-json name: admin-users-id-anonymize-json description: REST surface for admin-users-id-anonymize.json. operations: - method: PUT name: anonymizeuser description: Anonymize a user call: discourse-admin.anonymizeuser with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/deactivate-json name: admin-users-id-deactivate-json description: REST surface for admin-users-id-deactivate.json. operations: - method: PUT name: deactivateuser description: Deactivate a user call: discourse-admin.deactivateuser with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/log-out-json name: admin-users-id-log-out-json description: REST surface for admin-users-id-log_out.json. operations: - method: POST name: logoutuser description: Log a user out call: discourse-admin.logoutuser with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/silence-json name: admin-users-id-silence-json description: REST surface for admin-users-id-silence.json. operations: - method: PUT name: silenceuser description: Silence a user call: discourse-admin.silenceuser with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/admin/users/{id}/suspend-json name: admin-users-id-suspend-json description: REST surface for admin-users-id-suspend.json. operations: - method: PUT name: suspenduser description: Suspend a user call: discourse-admin.suspenduser with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/user-avatar/{username}/refresh-gravatar-json name: user-avatar-username-refresh-gravatar-json description: REST surface for user_avatar-username-refresh_gravatar.json. operations: - method: POST name: refreshgravatar description: Refresh gravatar call: discourse-admin.refreshgravatar with: username: rest.username outputParameters: - type: object mapping: $. - type: mcp namespace: discourse-admin-mcp port: 9090 transport: http description: MCP adapter for Discourse API Documentation — Admin. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-users description: List users hints: readOnly: true destructive: false idempotent: true call: discourse-admin.adminlistusers with: order: tools.order asc: tools.asc page: tools.page show_emails: tools.show_emails stats: tools.stats email: tools.email ip: tools.ip outputParameters: - type: object mapping: $. - name: list-users-flag description: List users by flag hints: readOnly: true destructive: false idempotent: true call: discourse-admin.adminlistusersflag with: flag: tools.flag order: tools.order asc: tools.asc page: tools.page show_emails: tools.show_emails stats: tools.stats email: tools.email ip: tools.ip outputParameters: - type: object mapping: $. - name: get-user-id description: Get a user by id hints: readOnly: true destructive: false idempotent: true call: discourse-admin.admingetuser with: id: tools.id outputParameters: - type: object mapping: $. - name: delete-user description: Delete a user hints: readOnly: false destructive: true idempotent: true call: discourse-admin.deleteuser with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: activate-user description: Activate a user hints: readOnly: false destructive: false idempotent: true call: discourse-admin.activateuser with: id: tools.id outputParameters: - type: object mapping: $. - name: anonymize-user description: Anonymize a user hints: readOnly: false destructive: false idempotent: true call: discourse-admin.anonymizeuser with: id: tools.id outputParameters: - type: object mapping: $. - name: deactivate-user description: Deactivate a user hints: readOnly: false destructive: false idempotent: true call: discourse-admin.deactivateuser with: id: tools.id outputParameters: - type: object mapping: $. - name: log-user-out description: Log a user out hints: readOnly: false destructive: false idempotent: false call: discourse-admin.logoutuser with: id: tools.id outputParameters: - type: object mapping: $. - name: silence-user description: Silence a user hints: readOnly: false destructive: false idempotent: true call: discourse-admin.silenceuser with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: suspend-user description: Suspend a user hints: readOnly: false destructive: false idempotent: true call: discourse-admin.suspenduser with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: refresh-gravatar description: Refresh gravatar hints: readOnly: false destructive: false idempotent: false call: discourse-admin.refreshgravatar with: username: tools.username outputParameters: - type: object mapping: $.