Skip to Content
ToDiagram

Import from URL

Fetch content from a URL once, or keep a read-only document that shows live content from its source.

Instead of pasting data into the editor, let ToDiagram fetch it. Point it at a URL that returns JSON, JSON Lines, YAML, CSV, XML, Mermaid or ToDiagram content.

There are two ways to use it:

ModeBest forResult
Quick importLooking at remote data onceAn editable tab. Nothing is stored
URL-backed documentData a team should always see up to dateA read-only cloud document that fetches its content from the URL every time it is opened

Quick Import

Fetch a URL once and open the content in the editor. No account is needed.

The Import from URL dialog with a URL, a name, the format and optional request headers

Open the menu at the top left of the editor and choose Open > From URL.

Paste the URL. The name is filled in from the URL and the format is set to Auto-detect. Change either if you need to.

If the source needs authentication, click Add header and add request headers, for example Authorization. They are used once for the fetch and are not stored.

Click Import. The content opens in a tab like any other document: edit it, and save it to the cloud if you want to keep it.

Paste a whole curl command into the URL field and ToDiagram fills in the URL and the headers from it.

URL-Backed Documents

When the data lives somewhere else, such as a config file in a repository, an API endpoint or a CMS export, a URL-backed document shows it live: the content is fetched from the URL every time the document is opened.

  • Always current. Share it with your team and everyone sees the latest version when they open it.
  • Read-only. The URL is the source of truth, so the document cannot be edited in the editor.
  • Works for everyone with access. When a teammate opens the document, the server fetches the source with your saved headers. They do not need the credentials and never see them.
  • If the source cannot be reached, the last saved copy is shown, so the document still opens. That copy is stored when the document is created and each time its source settings are saved, not on every open.

A URL-backed document shows Live at the top right of the editor, and a Live from URL icon next to its name in the Documents panel.

Create a URL-Backed Document

URL-backed documents are saved to your account, so you need to be signed in.

Open My documents from the menu at the top left of the editor.

Click the arrow next to the New button and choose Fetched from URL.

Enter the URL and any request headers the source needs, then click Import.

Refresh, change or disconnect the source

Click Live at the top right of the editor, or open ⋯ > Source on the document in the Documents panel. The Source dialog lets the owner:

  • Refresh now: fetch the latest content without reopening the document. Shown when the document is open in the current tab.
  • Change the URL or the request headers, then Save.
  • Disconnect: stop fetching. The document keeps its last saved copy and becomes a normal, editable document.

The same dialog can connect an existing document to a URL: open ⋯ > Source on a document that has no source, enter the URL and click Connect. Its content is then fetched from the URL and the document becomes read-only.

People you shared the document with see the source URL in this dialog without its query string, and not the headers.

URL-backed documents count toward your document limit and follow the same visibility and sharing rules as other cloud documents. See Sharing.

Authentication Headers

Private sources usually need credentials. Add them as request headers when you create the document, for example:

HeaderValue
AuthorizationBearer ghp_xxxxxxxxxxxx
X-Api-Keyyour-api-key

Headers are stored with the document and used only on the server when it fetches the source. Only the owner can see them. Because a shared document fetches the source with your credentials, a document with headers cannot be made public: that would show the private content to anyone with the link. Private and team sharing are allowed. Prefer tokens that are limited and can be revoked, such as a read-only API key or a fine-grained GitHub token.

Headers are sent only to the origin you entered. If the source redirects to another domain, the redirect is followed but your headers are not sent to it.

Security and Limits

Fetches run on the ToDiagram server with these limits:

LimitValue
Maximum content size5 MB
Request timeout10 seconds
Redirects followedup to 3
Protocolshttp and https
Request headersup to 20 per document
Fetch rate10 a minute for guests, 30 a minute when signed in

URLs that resolve to private or internal network addresses are rejected, and binary content is not supported.

Troubleshooting

On this page