Workflows Schema API
Workflowの入力、出力、型ヒント、種類スキーマをプログラムで記述します。
目的と利点
APIの使用方法
import requests
WORKSPACE_NAME = "ワークスペース名"
WORKFLOW_ID = "ワークフローID"
INFERENCE_SERVER_URL = "https://serverless.roboflow.com"
WORKFLOW_SCHEMA_ENDPOINT = f"{INFERENCE_SERVER_URL}/{WORKSPACE_NAME}/workflows/{WORKFLOW_ID}/describe_interface"
ROBOFLOW_API_KEY = "あなたの Roboflow API キー"
headers = {
"Content-Type": "application/json",
}
data = {
"api_key": ROBOFLOW_API_KEY,
}
res = requests.post(WORKFLOW_SCHEMA_ENDPOINT, headers=headers, json=data)
schema = res.json()
inputs = schema["inputs"]
outputs = schema["outputs"]
kinds_schemas = schema["kinds_schemas"]
typing_hints = schema["typing_hints"]入力と出力
型ヒント
種類のスキーマ
最終更新
役に立ちましたか?