SOP-20: Admin Daily Operations

API SOP

Dashboard stats, content moderation (hide/lock/pin), review author changes, and user management.

15 nodes · 4 edgesmedirank
apisopmedirankadmin
ex-sop-20-admin-operations.osop.yaml
# 原始:SOP-20: 管理員日常操作
osop_version: '1.0'
id: sop-20-admin-operations
name: 'SOP-20: Admin Daily Operations'
description: Dashboard stats, content moderation (hide/lock/pin), review author changes, and user management.
version: 1.0.0
tags:
- api
- sop
- medirank
- admin
nodes:
- id: dashboard_overview
  type: api
  subtype: rest
  name: GET /admin/dashboard
  description: 'Fetch overview stats: users, posts, comments, clinics, reviews, pending items.'
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /admin/dashboard
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: stats_users
  type: api
  subtype: rest
  name: GET /admin/stats/users
  description: Detailed user statistics.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /admin/stats/users
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: stats_posts
  type: api
  subtype: rest
  name: GET /admin/stats/posts
  description: Detailed post statistics.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /admin/stats/posts
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: stats_reviews
  type: api
  subtype: rest
  name: GET /admin/stats/reviews
  description: Detailed review statistics.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /admin/stats/reviews
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: stats_clinics
  type: api
  subtype: rest
  name: GET /admin/stats/clinics
  description: Detailed clinic statistics.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /admin/stats/clinics
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: post_visibility
  type: api
  subtype: rest
  name: POST /posts/{post_id}/visibility
  description: Hide or show a post.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /posts/{post_id}/visibility
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: post_lock
  type: api
  subtype: rest
  name: POST /posts/{post_id}/lock
  description: Lock or unlock a post to prevent edits.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /posts/{post_id}/lock
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: post_pin
  type: api
  subtype: rest
  name: POST /posts/{post_id}/pin
  description: Pin or unpin a post to the top.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /posts/{post_id}/pin
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: comment_lock
  type: api
  subtype: rest
  name: POST /comments/{comment_id}/lock
  description: Lock or unlock a comment.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /comments/{comment_id}/lock
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: change_review_author
  type: api
  subtype: rest
  name: POST /clinic-reviews/{review_id}/change-author
  description: Reassign a clinic review to a different user.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /clinic-reviews/{review_id}/change-author
    headers:
      Authorization: Bearer ${secrets.TOKEN}
    body:
      user_id: 10
- id: list_users
  type: api
  subtype: rest
  name: GET /users
  description: Fetch the list of all users.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /users
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: create_user
  type: api
  subtype: rest
  name: POST /users
  description: Create a new user account.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /users
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: update_user
  type: api
  subtype: rest
  name: PUT /users/{user_id}
  description: Modify user profile details.
  runtime:
    method: PUT
    url: https://medi-rank.com/api/v1
    endpoint: /users/{user_id}
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: delete_user
  type: api
  subtype: rest
  name: DELETE /users/{user_id}
  description: Remove a user account.
  runtime:
    method: DELETE
    url: https://medi-rank.com/api/v1
    endpoint: /users/{user_id}
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: upload_avatar
  type: api
  subtype: rest
  name: POST /users/{user_id}/avatar
  description: Upload or replace a user's profile avatar.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /users/{user_id}/avatar
    headers:
      Authorization: Bearer ${secrets.TOKEN}
    content_type: multipart/form-data
    body:
      avatar: (file)
edges:
- from: dashboard_overview
  to: stats_users
  mode: parallel
- from: dashboard_overview
  to: stats_posts
  mode: parallel
- from: dashboard_overview
  to: stats_reviews
  mode: parallel
- from: dashboard_overview
  to: stats_clinics
  mode: parallel