SOP-01:建立論壇貼文
API SOP建立一篇新的論壇貼文,可附加圖片與標籤。
2 個節點 · 1 條連接medirank
apisopmedirankpostsforum
視覺化
ex-sop-01-create-forum-post.osop.yaml
# 原始:SOP-01: 發布一篇論壇文章
osop_version: '1.0'
id: sop-01-create-forum-post
name: "SOP-01:建立論壇貼文"
description: "建立一篇新的論壇貼文,可附加圖片與標籤。"
version: 1.0.0
tags:
- api
- sop
- medirank
- posts
- forum
nodes:
- id: step_1
type: api
subtype: rest
name: POST /posts
description: Create a new forum post with title, HTML content, type, optional clinic, tags, and cover image.
runtime:
method: POST
url: https://medi-rank.com/api/v1
endpoint: /posts
headers:
Authorization: Bearer ${secrets.TOKEN}
content_type: multipart/form-data
body:
title: Post Title
content: <p>Post HTML content</p>
post_type: experience
clinic_id: 1
tags[]:
- tag1
- tag2
image: (file)
user_id: 5
- id: step_2
type: api
subtype: rest
name: POST /posts/{post_id}/images
description: Optionally upload extra images to the post.
runtime:
method: POST
url: https://medi-rank.com/api/v1
endpoint: /posts/{post_id}/images
headers:
Authorization: Bearer ${secrets.TOKEN}
content_type: multipart/form-data
body:
image: (file)
edges:
- from: step_1
to: step_2
mode: conditional
when: additional_images_needed