Christoph Fabianek
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Gateway API Endpoints and Data Structures ### Content * **[Service Discovery](#Service-Discovery1)** * [Retrieve Service Catalogue List](#Retrieve-Service-Catalogue-List) * [Query Service Catalogue List](#Query-Service-Catalogue-List) * [Read Service Description](#Read-Service-Description) * [Create Service Description](#Create-Service-Description) * [Update Service Description](#Update-Service-Description) * [Delete Service Description](#Delete-Service-Description) * **[Organisation and User Accounts](#Organisation-and-User-Accounts1)** * [Read Organisation](#Read-Organisation) * [List all Organisations](#List-Organisations) * [Create Organisation](#Create-Organisation) * [Update Organisation](#Update-Organisation) * [Delete Organisation](#Delete-Organisation) * [Retrieve User List for Organisation](#Retrieve-User-List-for-Organisation) * [Read User](#Read-User) * [Read User Wallet](#Read-User-Wallet) * [Create User](#Create-User) * [Update User](#Update-User) * [Delete User](#Delete-User) * **[Storage Services](#Storage-Service1)** * [Retrieve Collection List](#Retrieve-Collection-List) * [Read Collection](#Read-Collection) * [Create Collection](#Create-Collection) * [Update Collection](#Update-Collection) * [Delete Collection](#Delete-Collection) * [Check Object Access](#Check-Object-Acces) * [Read Object (meta data)](#Read-Object-meta-data) * [Read Object (object itself)](#Read-Object-object-itself) * [Create Object (meta data)](#Create-Object-meta-data) * [Write Object (object itself)](#Write-Object-object-itself) * [Update Object (meta data)](#Update-Object-meta-data) * [Delete Object](#Delete-Object) * **[Integration Helper](#Integration-Helper)** * [Match Usage Policies](#Match-Usage-Policies) * [Match D2A](#Match-D2A) * [Create D2A](#Create-D2A) * [Extract Usage Policy](#Extract-Usage-Policy) * [Authentication](#Authentication) * [Further Information](#Further-Information) ## Status last update: June 13, 2023 #### [Service Discovery](#Service-Discovery1) | tested | implemented | stub | draft | | ------:| -----------:| ----:| -----:| | 6 | 0 | 0 | 0 | #### [Organisation and User Accounts](#Organisation-and-User-Accounts1) | tested | implemented | stub | draft | | ------:| -----------:| ----:| -----:| | 11 | 0 | 0 | 0 | #### [Storage Service](#Storage-Service1) | tested | implemented | stub | draft | | ------:| -----------:| ----:| -----:| | 13 | 0 | 0 | 0 | ## Service Discovery ### Retrieve Service Catalogue List Info: * Requirement: *sd_1* * API: `GET /list?filter=value` available paging parameters are ([RFC-8288](https://tools.ietf.org/html/rfc8288) compliant http response headers) * page: page number * items: number of items per page * sort: field name to sort results, either 'service-id' (default) or 'name' * publicly available * Status: *tested* **Examples:** `curl https://babelfish.data-container.net/list` `curl https://babelfish.data-container.net/list?page=2&items=15&sort=name` Response: ```json= [ {"service-id": 1, "name": "DID Lint"}, {"service-id": 2, "name": "xyz"} ] ``` ### Query Service Catalogue List Info: * Requirement: *sd_2* * API: `GET /service/search?field1=value1&field2=value2` * publicly available * Status: *tested* The field names can be set to any of the fields listed under service description: * title * url * party * data **Example:** `curl https://babelfish.data-container.net/service/search?title=did%20lint` Response: ```json= [ {"service-id": 1, "name": "DID Lint"} ] ``` ### Read Service Description Info: * Requirement: *sd_3* * API: `GET <base-uri>/service/SERVICE_ID` * publicly available * Status: *tested* **Example:** `curl https://babelfish.data-container.net/service/1` Response: ```json= { "service-id": 1, "interface": { "info": { "title": "DID Lint" }, "servers": [{"url": "https://didlint.ownyourdata.eu"}], "party": "data_consumer", "paths": { "/api/validate": { "post": { "requestBody": { "content": { "application/json": { "schema": {} } } } } } } }, "data": null, "governance": { "dpv:hasProcessing": ["dpv:Use"], "dpv:hasPurpose": "dpv:Purpose", "dpv:hasExpiryTime": "6 months" } } ``` ### Create Service Description Info: * Requirement: *sd_4* * API: `POST <base-uri>/service/` * requires write permission * Status: *tested* **Example:** <details><summary>Service Description <code>service.json</code></summary> ```json= { "interface": { "info": { "title": "DID Lint" }, "servers": [{"url": "https://didlint.ownyourdata.eu"}], "party": "data_consumer", "paths": { "/api/validate": { "post": { "requestBody": { "content": { "application/json": { "schema": {} } } } } } } }, "data": null, "governance": { "dpv:hasProcessing": ["dpv:Use"], "dpv:hasPurpose": "dpv:Purpose", "dpv:hasExpiryTime": "6 months" } } ``` Comments: * `interface` follows [Open API Spec v3](https://spec.openapis.org/oas/v3.1.0) * `data` uses [SOyA (Semantic Overlay Architecture)](https://ownyourdata.github.io/soya) structure names * `governace` based on [Data Privacy Vocabulary v1](https://w3c.github.io/dpv/dpv/) </details> `cat service.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X POST https://babelfish.data-container.net/service` Response: ```json= {"name": "DID Lint", "service-id": 1} ``` ### Update Service Description Info: * Requirement: *sd_5* * API: `PUT <base-uri>/service/SERVICE_ID` * requires write permission for a user of the organisation that created the service * Status: *tested* **Example:** (`service.json` from above) `cat service.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/service/1` Response: ```json= {"name": "DID Lint", "service-id": 1} ``` ### Delete Service Description Info: * Requirement: *sd_6* * API: `DELETE <base-uri>/service/SERVICE_ID` * requires write permission for a user of the organisation that created the service * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" -X DELETE https://babelfish.data-container.net/service/1` Response: ```json= {"name": "DID Lint", "service-id": 1} ``` ## Organisation and User Accounts ### Read Organisation Info: * Requirement: *ou_3* * API: `GET <base-uri>/organization/ORGANIZATION_ID` * use `GET <base-uri>/organization/ORGANIZATION_ID/meta` for metadata access * requires read permission * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/organization/1` Response: ```json= { "organization-id": 1, "name": "ACME Inc.", "description": "information about organisation", "address": "street number, zip code, city, country" } ``` ### List Organisations Info: * API: `GET <base-uri>/organization/` * requires admin permission * Status: *tested* **Example:** `curl -H "Authorization: Bearer $MASTER_TOKEN" https://babelfish.data-container.net/organization/` Response: ```json= [ {"organization-id": 1, "name": "ACME Inc."}, {...} ] ``` ### Create Organisation Info: * Requirement: *ou_1* * API: `POST <base-uri>/organization/` * requires admin permission * Status: *tested* **Example:** <details><summary>Organisation information <code>org.json</code></summary> ```json= { "name": "ACME Inc." , "description": "information about organisation", "address": "street number, zip code, city, country" } ``` </details> `cat org.json | curl -H "Authorization: Bearer $MASTER_TOKEN" -H "Content-Type: application/json" -d @- -X POST https://babelfish.data-container.net/organization/` Response: ```json= {"organization-id": 1, "name": "ACME Inc.","admin-user-id":2} ``` ### Update Organisation Info: * Requirement: *ou_2* * API: `PUT <base-uri>/organization/ORGANIZATION_ID` * requires write permission from a user of this organisation * Status: *tested* **Example:** (`org.json` from above) `cat org.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/organization/1` Response: ```json= {"organization-id": 1, "name": "ACME Inc."} ``` ### Delete Organisation Info: * Requirement: *ou_5* * API: `DELETE <base-uri>/organization/ORGANIZATION_ID` * requires write permission from a user of this organisation * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" -X DELETE https://babelfish.data-container.net/organization/1` Response: ```json= {"organization-id": 1, "name": "ACME Inc."} ``` ### Retrieve User List for Organisation Info: * Requirement: *ou_4* * API: `GET <base-uri>/organization/ORGANIZATION_ID/list` * requires read permission from a user of this organisation * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/organization/1/list` Response: ```json= [ {"user-id": 2, "name": "John Doe", "organization-id": 1}, {"user-id": 3, "name": "Homer Simpson", "organization-id": 1} ] ``` ### Read User Info: * Requirement: *ou_8* * API: `GET <base-uri>/user/USER_ID` * use `GET <base-uri>/user/USER_ID/meta` for metadata access * requires read permission from a user of this organisation * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/user/2` Response: ```json= { "user-id": 2, "name": "Johne Doe", "organization-id": 1 } ``` ### Read User Wallet Info: * Requirement: *ou_10* * API: `GET <base-uri>/user/USER_ID/wallet` * requires read permission from this user * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/user/1/wallet` Response: ```json= { "user-id": 1, "oauth": { "client-id": "123...", "client-secret": "abc...", "scopes": "read write" } "dlt": [ { "type": "Convex", "network": "testnet", "address": 48, "public-key": "0x82AbBf6EBb20cB21dB02375270b9C2078c2e09e9D7C492be6439c61F23917022", "balance": 96816794 } ] } ``` ### Create User Info: * Requirement: *ou_6* * API: `POST <base-uri>/user/` * requires write permission from a user of this organisation * Status: *tested* **Example:** <details><summary>User information <code>user.json</code></summary> ```json= { "name": "John Doe", "email": "john@doe.com", "phone": "(555) 123 4567", "organization-id": 1, "meta": { "scope": "read" } } ``` </details> `cat user.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X POST https://babelfish.data-container.net/user/` Response: ```json= { "user-id": 1, "name": "John Doe", "email": "john@doe.com", "phone": "(555) 123 4567", "organization-id": 1 } ``` ### Update User Info: * Requirement: *ou_7* * API: `PUT <base-uri>/user/USER_ID` * requires write permission from a user of this organisation * Status: *tested* **Example:** (`user.json` from above) `cat user.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/user/1` Response: ```json= {"user-id": 1, "name": "John Doe"} ``` #### Provide DLT information for a User Use the following structure to store DLT information for a user ```json { "name":"admin", "meta": { "dlt": [{ "type": "Convex", "account":"123", "seed":"123abc" }] } } ``` and use the Update User command (`PUT <base-uri>/user/USER_ID`) to store the data. ### Delete User Info: * Requirement: *ou_9* * API: `DELETE <base-uri>/user/USER_ID` * requires write permission from a user of this organisation * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" -X DELETE https://babelfish.data-container.net/user/1` Response: ```json= {"user-id": 1, "name": "John Doe"} ``` ## Storage Service in this HackMD the various storage providers are demonstrated in a walkthrough: https://hackmd.io/l8aMfOrBRNq1qB6ZzQEFpA ### Retrieve Collection List Info: * Requirement: *ssr_4* * API: `GET <base-uri>/collection/list` * requires read permission from any user of the organisation that created the collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/collection/list` Response: ```json= [ {"collection-id": 1, "name": "My Repository"}, {"collection-id": 2, "name": "Repository 2"} ] ``` ### Read Collection Info: * Requirement: *ssr_3* * API: `GET <base-uri>/collection/COLLECTION-ID` * requires read permission from any user of the organisation that created the collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/collection/1` Response: ```json= { "collection-id": 1, "name": "My Repository", "storage": { "type": "Semantic Container", "url": "https://ontochain.data-container.net" }, "dlt": { "type": "Convex", "user-id": 1 } } ``` ### Create Collection Info: * Requirement: *ssr_1* * API: `POST <base-uri>/collection/` * requires write permission from a user * Status: *tested* **Example:** <details><summary>Collection information <code>col.json</code></summary> ```json= { "name": "My Repository" } ``` </details> `cat col.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X POST https://babelfish.data-container.net/collection/` Response: ```json= { "collection-id": 1, "name": "My Repository" } ``` #### AWS S3 Storage Provider To use AWS S3 (Amazon Web Services Simple Storage Service) as off-chain storage provider provide the following information when creating a collection: ```json= { "name": "My Semantic Container Repository", "storage": { "type": "AWS S3", "service-id": 340 } } ``` #### Semantic Container Storage Provider To use Semantic Container as off-chain storage provider provide the following information when creating a collection: ```json= { "name": "My Semantic Container Repository", "storage": { "type": "Semantic Container", "service-id": 339, "url": "https://storage-oc3.data-container.net" } } ``` #### Bellecour Storage Provider To use Semantic Container as off-chain storage provider provide the following information when creating a collection: ```json= { "name": "My Bellecour Repository", "dlt": { "type": "Bellecour", "service-id": 341 } } ``` #### Convex Storage Provider To use Semantic Container as off-chain storage provider provide the following information when creating a collection: ```json= { "name": "My Convex Repository", "dlt": { "type": "Convex", "service-id": 342, "url": "https://storage-oc3.data-container.net" } } ``` ### Update Collection Info: * Requirement: *ssr_2* * API: `PUT <base-uri>/collection/COLLECTION-ID` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** (`col.json` from above) `cat col.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/collection/1` Response: ```json= { "collection-id": 1, "name": "My Repository" } ``` ### Delete Collection Info: * Requirement: *ssr_5* * API: `DELETE <base-uri>/collection/COLLECTION-ID` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" -X DELETE https://babelfish.data-container.net/collection/1` Response: ```json= { "collection-id": 1, "name": "My Repository" } ``` ### Check Object Access Info: * Requirement: *ssr_12* * API: `POST <base-uri>/object/OBJECT_ID/USER_ID` * requires read permission from any user of the organisation that created this object * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/object/1/1` Response: ```json= { "object-id": 1, "collection-id": 1, "name": "My Object", "access": true } ``` ### List Objects Info: * Requirement: *none* * API: `GET <base-uri>/collection/COLLECTION-ID/objects` * requires read permission from any user of the organisation that created this collection * Status: *implemented* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/collection/1/objects` Response: ```json= [ {"object-id": 2, "name": "My Object"}, {"object-id": 3, "name": "object2"} ] ``` ### Read Object (meta data) Info: * Requirement: *ssr_8* * API: `GET <base-uri>/object/OBJECT_ID` * requires read permission from any user of the organisation that created this collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/object/1` Response: ```json= { "object-id": 1, "collection-id": 1, "name": "My Object" } ``` ### Read Object (object itself) Info: * Requirement: *ssr_10* * API: `GET <base-uri>/object/OBJECT_ID/read` * requires read permission from any user of the organisation that created this collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" https://babelfish.data-container.net/object/1/read` Response: ```json= ["payload"] ``` ### Create Object (metadata) Info: * Requirement: *ssr_6* * API: `POST <base-uri>/object/` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** <details><summary>Object information <code>obj.json</code></summary> ```json= { "name": "My Object", "collection-id": 1 } ``` </details> `cat obj.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X POST https://babelfish.data-container.net/object/` Response: ```json= { "object-id": 1, "collection-id": 1, "name": "My Object" } ``` ### Write Object (object itself) Info: * Requirement: *ssr_11* * API: `PUT <base-uri>/object/OBJECT_ID/write` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** <details><summary>Payload information <code>payload.json</code></summary> ```json= ["payload"] ``` </details> `cat payload.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/object/1/write` Response: ```json= { "object-id": 1, "collection-id": 1 } ``` ### Update Object (metadata) Info: * Requirement: *ssr_7* * API: `PUT <base-uri>/object/OBJECT_ID` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** (`obj.json` from above) `cat obj.json | curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d @- -X PUT https://babelfish.data-container.net/object/1` Response: ```json= { "object-id": 1, "collection-id": 1, "name": "My Object" } ``` ### Delete Object Info: * Requirement: *ssr_9* * API: `DELETE <base-uri>/object/OBJECT_ID` * requires write permission from any user of the organisation that created this collection * Status: *tested* **Example:** `curl -H "Authorization: Bearer $TOKEN" -X DELETE https://babelfish.data-container.net/object/1` Response: ```json= { "object-id": 1, "collection-id": 1, "name": "My Object" } ``` ## Authentication Most of the API endpoints require a *bearer token* in the HTTP request header. Retrieve this token using the client-id and client-secret for your user - example: ```bash= export APP_KEY="w76IhupHXHEMk_2ueVwLrKL4Lcw0OKrBYoG9xq3cEFc" export APP_SECRET="c6XNWeHwmDh8e7yl624Ss4QxrNz6Rxm97R3R3Y7iRqY" export TOKEN=`curl -s -d grant_type=client_credentials -d client_id=$APP_KEY -d client_secret=$APP_SECRET -d scope=write -X POST http://localhost:3100/oauth/token | jq -r '.access_token'` ``` > Note: the example KEY and SECRET above don't actually yield a token! Use `TOKEN` in the header: ```bash= curl -H "Authorization: Bearer $TOKEN" \ https://babelfish.data-container.net/user/2 ``` ## Further Information * Requirements document: https://eurodyn.proofhub.com/link/goproof?8FqSDh-vUd6Si-I7qpxSb-l * Status possbile values are: * *draft* - documented * *stub* - endpoint accessible and returns example response * *implemented* - endpoint implemented * *tested* - automated tests covering all scenarios available

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully