図の埋め込み(oEmbed)
oEmbedによる埋め込みのエンドポイントURL。iframeを使った図のビューアのURLが取得できます。
メソッド
GET
URL
https://cacoo.com/oembed.format?url=diagramURL
例 : https://cacoo.com/oembed.json?url=https%3A%2F%2Fcacoo.com%2Fdiagrams%2F00e77f4dc9973517
フォーマット
json, xml
認証
不要 (対象の図は公開されている必要があります)
パラメーター
パラメータ名 |
型 |
内容 |
デフォルト |
例 |
url(必須) |
文字列 |
図の詳細画面のURL |
|
https://cacoo.com/diagrams/00e77f4dc9973517 |
maxwidth |
数値 |
埋め込みビューアの最大の幅 |
450 |
600 |
maxheight |
数値 |
埋め込みビューアの最大の高さ |
350 |
400 |
レスポンス
フィールド |
型 |
説明 |
例 |
type |
文字列 |
種別
|
rich |
version |
文字列 |
oEmbedのバージョン |
1.0 |
title |
文字列 |
図のタイトル |
ワイヤーフレーム案 |
description |
文字列 |
図の説明 |
今回のプロジェクトのワイヤーフレームです。 |
author_name |
文字列 |
作者名 |
1MUJPfNEEeVUox35 |
provider_name |
文字列 |
プロバイダ名 |
Cacoo |
provider_url |
文字列 |
プロバイダのURL |
https://cacoo.com/ |
thumbnail_url |
文字列 |
サムネイル画像のURL |
https://cacoo.com/diagrams/00e77f4dc9973517-w450-h350.png |
thumbnail_width |
数値 |
サムネイル画像の幅 |
450 |
thumbnail_height |
文字列 |
サムネイル画像の高さ |
350 |
html |
文字列 |
埋め込み用HTML |
|
width |
数値 |
埋め込みビューアの幅 |
450 |
height |
数値 |
埋め込みビューアの高さ |
350 |
JSON形式のレスポンスの例
{
"type": "rich",
"version": "1.0",
"title": "ワイヤーフレーム案",
"description": "今回のプロジェクトのワイヤーフレームです。",
"author_name": "1MUJPfNEEeVUox35",
"provider_name": "Cacoo",
"provider_url": "https://cacoo.com/",
"thumbnail_url": "https://cacoo.com/diagrams/00e77f4dc9973517-w450-h350.png",
"thumbnail_width": 450,
"thumbnail_height": 350,
"html": "<iframe src="https://cacoo.com/diagrams/00e77f4dc9973517/view?w=448&h=320" width="450" height="350" frameborder="0" ></iframe>",
"width": 450,
"height": 350
}
XML形式のレスポンスの例
<?xml version="1.0" encoding="utf-8"?>
<oembed>
<type>rich</type>
<version>1.0</version>
<title>ワイヤーフレーム案</title>
<description>今回のプロジェクトのワイヤーフレームです。</description>
<author_name>1MUJPfNEEeVUox35</author_name>
<provider_name>Cacoo</provider_name>
<provider_url>https://cacoo.com/</provider_url>
<thumbnail_url>https://cacoo.com/diagrams/00e77f4dc9973517-w450-h350.png</thumbnail_url>
<thumbnail_width>450</thumbnail_width>
<thumbnail_height>350</thumbnail_height>
<html><iframe src="https://cacoo.com/diagrams/00e77f4dc9973517/view?w=448&h=320" width="450" height="350" frameborder="0" ></iframe></html>
<width>450</width>
<height>350</height>
</oembed>