CINXE.COM

Command Line Interface (CLI) - EUDAT Documentation

<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="canonical" href="https://docs.eudat.eu/b2share/cli/"> <link rel="prev" href="../foradministrators/"> <link rel="next" href="../httpapi/"> <link rel="icon" href="../../assets/images/favicon.png"> <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.3"> <title>Command Line Interface (CLI) - EUDAT Documentation</title> <link rel="stylesheet" href="../../assets/stylesheets/main.d7758b05.min.css"> <link rel="stylesheet" href="../../assets/stylesheets/palette.06af60db.min.css"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"> <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style> <link rel="stylesheet" href="../../config/extra.css"> <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script> </head> <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#b2share-cli-commands" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> </div> <header class="md-header" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <a href="../.." title="EUDAT Documentation" class="md-header__button md-logo" aria-label="EUDAT Documentation" data-md-component="logo"> <img src="../../images/EUDAT_Partial_White.png" alt="logo"> </a> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> EUDAT Documentation </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Command Line Interface (CLI) </span> </div> </div> </div> <form class="md-header__option" data-md-component="palette"> <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0"> <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9z"/></svg> </label> <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1"> <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </label> <nav class="md-search__options" aria-label="Search"> <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg> </button> </nav> <div class="md-search__suggest" data-md-component="search-suggest"></div> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list" role="presentation"></ol> </div> </div> </div> </div> </div> </nav> </header> <div class="md-container" data-md-component="container"> <nav class="md-tabs" aria-label="Tabs" data-md-component="tabs"> <div class="md-grid"> <ul class="md-tabs__list"> <li class="md-tabs__item"> <a href="../.." class="md-tabs__link"> Documentation </a> </li> <li class="md-tabs__item"> <a href="../../b2access/" class="md-tabs__link"> B2ACCESS </a> </li> <li class="md-tabs__item"> <a href="../../b2drop/" class="md-tabs__link"> B2DROP </a> </li> <li class="md-tabs__item"> <a href="../../b2find/" class="md-tabs__link"> B2FIND </a> </li> <li class="md-tabs__item"> <a href="../../b2handle/" class="md-tabs__link"> B2HANDLE </a> </li> <li class="md-tabs__item"> <a href="../../b2inst/" class="md-tabs__link"> B2INST </a> </li> <li class="md-tabs__item"> <a href="../../b2safe/" class="md-tabs__link"> B2SAFE </a> </li> <li class="md-tabs__item md-tabs__item--active"> <a href="../overview/" class="md-tabs__link"> B2SHARE </a> </li> <li class="md-tabs__item"> <a href="../../datacite/" class="md-tabs__link"> DataCite </a> </li> <li class="md-tabs__item"> <a href="https://eudat.eu" class="md-tabs__link"> EUDAT website </a> </li> <li class="md-tabs__item"> <a href="https://eudat.eu/contact-support-request" class="md-tabs__link"> Feedback + Support </a> </li> </ul> </div> </nav> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary md-nav--lifted md-nav--integrated" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="../.." title="EUDAT Documentation" class="md-nav__button md-logo" aria-label="EUDAT Documentation" data-md-component="logo"> <img src="../../images/EUDAT_Partial_White.png" alt="logo"> </a> EUDAT Documentation </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../.." class="md-nav__link"> <span class="md-ellipsis"> Documentation </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" > <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0"> <span class="md-ellipsis"> B2ACCESS </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2"> <span class="md-nav__icon md-icon"></span> B2ACCESS </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2access/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/assurance/" class="md-nav__link"> <span class="md-ellipsis"> Assurance </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/concepts/" class="md-nav__link"> <span class="md-ellipsis"> Concepts </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_4" > <label class="md-nav__link" for="__nav_2_4" id="__nav_2_4_label" tabindex="0"> <span class="md-ellipsis"> For Users </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_2_4_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2_4"> <span class="md-nav__icon md-icon"></span> For Users </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2access/howto-mfa/" class="md-nav__link"> <span class="md-ellipsis"> Enabling MFA </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/howto-update-email/" class="md-nav__link"> <span class="md-ellipsis"> Updating Email </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/list-of-connected-organisations/" class="md-nav__link"> <span class="md-ellipsis"> List of connected organisations </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_4_4" > <label class="md-nav__link" for="__nav_2_4_4" id="__nav_2_4_4_label" tabindex="0"> <span class="md-ellipsis"> For group administrators </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_4_4_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2_4_4"> <span class="md-nav__icon md-icon"></span> For group administrators </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2access/howto-vos/" class="md-nav__link"> <span class="md-ellipsis"> Requesting a group </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/howto-vo-management/" class="md-nav__link"> <span class="md-ellipsis"> Managing a group </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_4_5" > <label class="md-nav__link" for="__nav_2_4_5" id="__nav_2_4_5_label" tabindex="0"> <span class="md-ellipsis"> For Service Providers </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_4_5_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2_4_5"> <span class="md-nav__icon md-icon"></span> For Service Providers </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2access/howto-services/" class="md-nav__link"> <span class="md-ellipsis"> Registering a services </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/attributes-sp/" class="md-nav__link"> <span class="md-ellipsis"> Available attributes </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_4_6" > <label class="md-nav__link" for="__nav_2_4_6" id="__nav_2_4_6_label" tabindex="0"> <span class="md-ellipsis"> For Identity Providers </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_4_6_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_2_4_6"> <span class="md-nav__icon md-icon"></span> For Identity Providers </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2access/howto-idps/" class="md-nav__link"> <span class="md-ellipsis"> Joining as an Identity Provider </span> </a> </li> <li class="md-nav__item"> <a href="../../b2access/attributes-idp/" class="md-nav__link"> <span class="md-ellipsis"> Consumed attributes </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../../b2access/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" > <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0"> <span class="md-ellipsis"> B2DROP </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_3"> <span class="md-nav__icon md-icon"></span> B2DROP </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2drop/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_2" > <label class="md-nav__link" for="__nav_3_2" id="__nav_3_2_label" tabindex="0"> <span class="md-ellipsis"> For Users </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_3_2"> <span class="md-nav__icon md-icon"></span> For Users </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2drop/user/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_2_2" > <label class="md-nav__link" for="__nav_3_2_2" id="__nav_3_2_2_label" tabindex="0"> <span class="md-ellipsis"> For groups </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="3" aria-labelledby="__nav_3_2_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_3_2_2"> <span class="md-nav__icon md-icon"></span> For groups </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2drop/groups/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_3" > <label class="md-nav__link" for="__nav_3_3" id="__nav_3_3_label" tabindex="0"> <span class="md-ellipsis"> For Administrators </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_3_3"> <span class="md-nav__icon md-icon"></span> For Administrators </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2drop/admin/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2drop/b2sharebridge/" class="md-nav__link"> <span class="md-ellipsis"> Enabling the B2SHAREbridge </span> </a> </li> <li class="md-nav__item"> <a href="../../b2drop/setup/" class="md-nav__link"> <span class="md-ellipsis"> Install B2DROP </span> </a> </li> <li class="md-nav__item"> <a href="../../b2drop/integration/" class="md-nav__link"> <span class="md-ellipsis"> Integrate with B2ACCESS </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../../b2drop/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" > <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0"> <span class="md-ellipsis"> B2FIND </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_4"> <span class="md-nav__icon md-icon"></span> B2FIND </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2find/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2find/forusers/" class="md-nav__link"> <span class="md-ellipsis"> For Users </span> </a> </li> <li class="md-nav__item"> <a href="../../b2find/forproviders/" class="md-nav__link"> <span class="md-ellipsis"> For Providers </span> </a> </li> <li class="md-nav__item"> <a href="../../b2find/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" > <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0"> <span class="md-ellipsis"> B2HANDLE </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> B2HANDLE </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2handle/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/foradministrators/" class="md-nav__link"> <span class="md-ellipsis"> For Administrators </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" > <label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex="0"> <span class="md-ellipsis"> For Developers </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5_3"> <span class="md-nav__icon md-icon"></span> For Developers </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2handle/fordevelopers/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/fordevelopers_pyhandle/" class="md-nav__link"> <span class="md-ellipsis"> PyHandle for Developers </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/fordevelopers_b2handle/" class="md-nav__link"> <span class="md-ellipsis"> B2Handle for Developers </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/fordevelopers_api/" class="md-nav__link"> <span class="md-ellipsis"> API for Developers </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_4" > <label class="md-nav__link" for="__nav_5_4" id="__nav_5_4_label" tabindex="0"> <span class="md-ellipsis"> Information </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_4_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5_4"> <span class="md-nav__icon md-icon"></span> Information </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2handle/ownership/" class="md-nav__link"> <span class="md-ellipsis"> Ownership </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/security/" class="md-nav__link"> <span class="md-ellipsis"> Security </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../../b2handle/more/" class="md-nav__link"> <span class="md-ellipsis"> More Info </span> </a> </li> <li class="md-nav__item"> <a href="../../b2handle/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" > <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0"> <span class="md-ellipsis"> B2INST </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_6"> <span class="md-nav__icon md-icon"></span> B2INST </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2inst/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_2" > <label class="md-nav__link" for="__nav_6_2" id="__nav_6_2_label" tabindex="0"> <span class="md-ellipsis"> For Users </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_6_2"> <span class="md-nav__icon md-icon"></span> For Users </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2inst/forusers/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2inst/advancedsearch/" class="md-nav__link"> <span class="md-ellipsis"> Advanced Search </span> </a> </li> <li class="md-nav__item"> <a href="../../b2inst/httpapi/" class="md-nav__link"> <span class="md-ellipsis"> HTTP REST API </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../../b2inst/foradministrators/" class="md-nav__link"> <span class="md-ellipsis"> For Administrators </span> </a> </li> <li class="md-nav__item"> <a href="../../b2inst/fordevelopers/" class="md-nav__link"> <span class="md-ellipsis"> For Developers </span> </a> </li> <li class="md-nav__item"> <a href="../../b2inst/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" > <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0"> <span class="md-ellipsis"> B2SAFE </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_7"> <span class="md-nav__icon md-icon"></span> B2SAFE </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../b2safe/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../b2safe/forusers/" class="md-nav__link"> <span class="md-ellipsis"> For Users </span> </a> </li> <li class="md-nav__item"> <a href="../../b2safe/foradministrators/" class="md-nav__link"> <span class="md-ellipsis"> For Administrators </span> </a> </li> <li class="md-nav__item"> <a href="../../b2safe/fordevelopers/" class="md-nav__link"> <span class="md-ellipsis"> For Developers </span> </a> </li> <li class="md-nav__item"> <a href="../../b2safe/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" checked> <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex=""> <span class="md-ellipsis"> B2SHARE </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="true"> <label class="md-nav__title" for="__nav_8"> <span class="md-nav__icon md-icon"></span> B2SHARE </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../overview/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_2" > <label class="md-nav__link" for="__nav_8_2" id="__nav_8_2_label" tabindex=""> <span class="md-ellipsis"> For Users </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_8_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_8_2"> <span class="md-nav__icon md-icon"></span> For Users </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../forusers/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../advancedsearch/" class="md-nav__link"> <span class="md-ellipsis"> Advance Search </span> </a> </li> <li class="md-nav__item"> <a href="../httpapi/" class="md-nav__link"> <span class="md-ellipsis"> HTTP REST API </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_3" > <label class="md-nav__link" for="__nav_8_3" id="__nav_8_3_label" tabindex=""> <span class="md-ellipsis"> For Developers </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_8_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_8_3"> <span class="md-nav__icon md-icon"></span> For Developers </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../fordevelopers/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8_4" checked> <label class="md-nav__link" for="__nav_8_4" id="__nav_8_4_label" tabindex=""> <span class="md-ellipsis"> For Administrators </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_8_4_label" aria-expanded="true"> <label class="md-nav__title" for="__nav_8_4"> <span class="md-nav__icon md-icon"></span> For Administrators </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../foradministrators/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc"> <label class="md-nav__link md-nav__link--active" for="__toc"> <span class="md-ellipsis"> Command Line Interface (CLI) </span> <span class="md-nav__icon md-icon"></span> </label> <a href="./" class="md-nav__link md-nav__link--active"> <span class="md-ellipsis"> Command Line Interface (CLI) </span> </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class="md-nav__title" for="__toc"> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix> <li class="md-nav__item"> <a href="#how-to-run-b2share-cli" class="md-nav__link"> <span class="md-ellipsis"> How to run B2SHARE CLI </span> </a> </li> <li class="md-nav__item"> <a href="#availables-cli-commands" class="md-nav__link"> <span class="md-ellipsis"> Availables CLI commands </span> </a> <nav class="md-nav" aria-label="Availables CLI commands"> <ul class="md-nav__list"> <li class="md-nav__item"> <a href="#b2share-access" class="md-nav__link"> <span class="md-ellipsis"> b2share access </span> </a> </li> <li class="md-nav__item"> <a href="#b2share-communities" class="md-nav__link"> <span class="md-ellipsis"> b2share communities </span> </a> </li> <li class="md-nav__item"> <a href="#b2share-index" class="md-nav__link"> <span class="md-ellipsis"> b2share index </span> </a> </li> <li class="md-nav__item"> <a href="#b2share-roles" class="md-nav__link"> <span class="md-ellipsis"> b2share roles </span> </a> </li> <li class="md-nav__item"> <a href="#b2share-schemas" class="md-nav__link"> <span class="md-ellipsis"> b2share schemas </span> </a> </li> <li class="md-nav__item"> <a href="#b2share-users" class="md-nav__link"> <span class="md-ellipsis"> b2share users </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../httpapi/" class="md-nav__link"> <span class="md-ellipsis"> HTTP REST API </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="../faq/" class="md-nav__link"> <span class="md-ellipsis"> F.A.Q.s </span> </a> </li> <li class="md-nav__item"> <a href="../about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" > <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0"> <span class="md-ellipsis"> DataCite </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_9"> <span class="md-nav__icon md-icon"></span> DataCite </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="../../datacite/" class="md-nav__link"> <span class="md-ellipsis"> Overview </span> </a> </li> <li class="md-nav__item"> <a href="../../datacite/forusers/" class="md-nav__link"> <span class="md-ellipsis"> For Users </span> </a> </li> <li class="md-nav__item"> <a href="../../datacite/about/" class="md-nav__link"> <span class="md-ellipsis"> About </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item"> <a href="https://eudat.eu" class="md-nav__link"> <span class="md-ellipsis"> EUDAT website </span> </a> </li> <li class="md-nav__item"> <a href="https://eudat.eu/contact-support-request" class="md-nav__link"> <span class="md-ellipsis"> Feedback + Support </span> </a> </li> </ul> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <h1 id="b2share-cli-commands">B2SHARE CLI Commands<a class="headerlink" href="#b2share-cli-commands" title="Permanent link">#</a></h1> <p>The B2SHARE command-line interface (<strong>b2share CLI</strong>) is a set of commands used to create and manage B2share instance. The B2SHARE CLI is an useful tool that allowes admins to set up and manage communities, records, indexes, etc..</p> <p>The document will show examples of usefull CLI commands available in the b2share CLI. For additional information check the <a href="https://github.com/inveniosoftware/invenio">Invenio v3 documentation</a>.</p> <h2 id="how-to-run-b2share-cli">How to run B2SHARE CLI<a class="headerlink" href="#how-to-run-b2share-cli" title="Permanent link">#</a></h2> <p><strong>B2SHARE CLI</strong> commands can be run inside the b2share running container. </p> <p><div class="highlight"><pre><span></span><code>docker-compose<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>-i<span class="w"> </span>b2share<span class="w"> </span>bash<span class="w"> </span><span class="c1"># if you are using docker-compose v1 </span> or<span class="w"> </span> docker<span class="w"> </span>compose<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>-i<span class="w"> </span>b2share<span class="w"> </span>bash<span class="w"> </span><span class="c1"># if you are using docker-compose v2</span> </code></pre></div> alternatively <div class="highlight"><pre><span></span><code>docker<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>-it<span class="w"> </span>&lt;b2share-container-id&gt;<span class="w"> </span>bash </code></pre></div></p> <h2 id="availables-cli-commands">Availables CLI commands<a class="headerlink" href="#availables-cli-commands" title="Permanent link">#</a></h2> <p>To run the b2share cli, execute in the docker container the following command: <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span><span class="o">[</span>COMMAND<span class="o">]</span><span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span><span class="o">[</span>ARGUMENTS<span class="o">]</span> </code></pre></div> The following commands are available at the moment:</p> <ul> <li><a href="#b2share-access"><strong>access</strong></a> : Account commands.</li> <li><strong>alembic</strong> : Perform database migrations.</li> <li><strong>assets</strong> : Web assets commands.</li> <li><strong>collect</strong> : Collect static files.</li> <li><a href="#b2share-communities"><strong>communities</strong></a> : communities management commands.</li> <li><strong>db</strong> : Database commands.</li> <li><strong>demo</strong> : Demonstration commands.</li> <li><strong>deposit</strong> : Deposit management commands.</li> <li><strong>files</strong> : Files management commands.</li> <li><a href="#b2share-index"><strong>index</strong></a> : Manage search indices.</li> <li><strong>instance</strong> : Instance commands.</li> <li><strong>linkset</strong> : linkset commands.</li> <li><strong>migrate</strong> : Migration commands.</li> <li><strong>npm</strong> : Generate a package.json file.</li> <li><strong>oai</strong> : OAI commands.</li> <li><strong>ownership</strong> : ownership management commands.</li> <li><strong>pid</strong> : PID-Store management commands.</li> <li><strong>queues</strong> : Manage events queue.</li> <li><strong>records</strong> : Record management commands.</li> <li><a href="#b2share-roles"><strong>roles</strong></a> : Role commands.</li> <li><strong>run</strong> : Runs a development server.</li> <li><strong>schemas</strong> : Schemas management commands.</li> <li><strong>shell</strong> : Runs a shell in the app context.</li> <li><strong>upgrade</strong> : B2SHARE upgrade commands.</li> <li><a href="#b2share-users"><strong>users</strong></a> : User commands.</li> </ul> <h3 id="b2share-access">b2share access<a class="headerlink" href="#b2share-access" title="Permanent link">#</a></h3> <p>All operations below will try to identify the user based on the email address. The user must have logged in into B2SHARE at least once, otherwise the email address will not be found in the database.</p> <p><strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> allow Allow actions. deny Deny actions. list List all registered actions. remove Remove existing action authorization. show Show all assigned actions. </code></pre></div></p> <h4 id="assign-superuser-access-to-a-user">Assign superuser-access to a user<a class="headerlink" href="#assign-superuser-access-to-a-user" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>access<span class="w"> </span>allow<span class="w"> </span>-e<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span><span class="w"> </span>superuser-access </code></pre></div> <h4 id="revoke-superadministrator-rights">Revoke superadministrator rights<a class="headerlink" href="#revoke-superadministrator-rights" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>access<span class="w"> </span>remove<span class="w"> </span>-e<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span><span class="w"> </span>superuser-access </code></pre></div> <h4 id="list-existing-rights">List existing rights<a class="headerlink" href="#list-existing-rights" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>access<span class="w"> </span>show<span class="w"> </span>-e<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span> </code></pre></div> <h3 id="b2share-communities">b2share communities<a class="headerlink" href="#b2share-communities" title="Permanent link">#</a></h3> <p><em>Communities management commands.</em></p> <p><strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> create Create a community in the database. edit Edit data of the specified community. list List all communities in this instances&#39; database policies Manage community policies roles Manage community roles set_schema Set the community block schema and/or root schema version. If a root schema version is given, but no JSON file, the latest known block schema will be used (if present). </code></pre></div></p> <p>Usage examples:</p> <h4 id="list-communities">List communities<a class="headerlink" href="#list-communities" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>communities<span class="w"> </span>list </code></pre></div> <h4 id="create-a-community">Create a community<a class="headerlink" href="#create-a-community" title="Permanent link">#</a></h4> <p>To create a community, make sure that <code>B2SHARE_UI_PATH</code> is defined in your environment. The <code>${COMMUNITY_LOGO}</code> parameter must be the filename of an image file, already located in the <code>$B2SHARE_UI_PATH/img/communities/</code>directory.</p> <p>If the file is not present in the running container, you can copy in the correct location usign the following command: <div class="highlight"><pre><span></span><code>docker<span class="w"> </span>cp<span class="w"> </span>&lt;IMAGE_NAME&gt;<span class="w"> </span>&lt;CONTAINER_ID&gt;:<span class="nv">$B2SHARE_UI_PATH</span>/img/communities/<span class="si">${</span><span class="nv">COMMUNITY_LOGO</span><span class="si">}</span> </code></pre></div> where <code>&lt;CONTAINER_ID&gt;</code> is the ID of the running b2share container.</p> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>communities<span class="w"> </span>create<span class="w"> </span><span class="si">${</span><span class="nv">COMMUNITY</span><span class="si">}</span><span class="w"> </span><span class="si">${</span><span class="nv">COMMUNITY_NAME</span><span class="si">}</span><span class="w"> </span><span class="si">${</span><span class="nv">COMMUNITY_LOGO</span><span class="si">}</span> </code></pre></div> <h4 id="edit-communities">Edit communities<a class="headerlink" href="#edit-communities" title="Permanent link">#</a></h4> <p>To edit a community, use the b2share communities edit command, with the necessary arguments. For more information run: <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>communities<span class="w"> </span>edit<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span>&lt;COMMUNITY_ID&gt; </code></pre></div> Where the options are: <div class="highlight"><pre><span></span><code><span class="w"> </span>-v,<span class="w"> </span>--verbose <span class="w"> </span>--name<span class="w"> </span>TEXT <span class="w"> </span>--description<span class="w"> </span>TEXT <span class="w"> </span>--logo<span class="w"> </span>TEXT <span class="w"> </span>--clear_fields<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nb">set</span><span class="w"> </span>edit<span class="w"> </span>nullifies<span class="w"> </span>unspecified<span class="w"> </span>value<span class="w"> </span>options </code></pre></div> <strong>Note</strong></p> <blockquote> <p>After a community name or description is updated, please make sure to also run the following command, which synchronizes the list of communities with the OAI-PMH declared sets: <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>oai<span class="w"> </span>update_sets </code></pre></div></p> </blockquote> <h4 id="set-community-schema">Set community schema<a class="headerlink" href="#set-community-schema" title="Permanent link">#</a></h4> <p>To update a root schema for a B2SHARE community, it is important to run all these commands in b2share container: <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>communities<span class="w"> </span>set_schema<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">COMMUNITY</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span>--no-block b2share<span class="w"> </span>communities<span class="w"> </span>set_schema<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">COMMUNITY</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span>--root-schema<span class="w"> </span>&lt;root<span class="w"> </span>schema<span class="w"> </span>version&gt;<span class="w"> </span> b2share<span class="w"> </span>communities<span class="w"> </span>set_schema<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">COMMUNITY</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span><span class="si">${</span><span class="nv">COMMUNITY_SPECIFIC_METADATA_JSON_SCHEMA</span><span class="si">}</span> </code></pre></div></p> <p><strong>Note:</strong> </p> <blockquote> <p>THERE IS A BUG IN b2share communities set_schema WHICH DELETES THE COMMUNITY SPECIFIC PART OF THE SCHEMA UNLESS YOU PROVIDE ONE EXPLICITLY.</p> </blockquote> <h3 id="b2share-index">b2share index<a class="headerlink" href="#b2share-index" title="Permanent link">#</a></h3> <p><em>Manage search indices.</em></p> <p><strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> create Create new index. delete Delete index by its name. destroy Destroy all indexes. init Initialize registered aliases and mappings. put Index input data. queue Manage indexing queue. reindex Reindex all records. run Run bulk record indexing. </code></pre></div></p> <h4 id="detroy-and-recreate-indexes-after-a-database-migration">Detroy and recreate indexes after a database migration<a class="headerlink" href="#detroy-and-recreate-indexes-after-a-database-migration" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>index<span class="w"> </span>destroy<span class="w"> </span>--force<span class="w"> </span>--yes-i-know b2share<span class="w"> </span>index<span class="w"> </span>init<span class="w"> </span>--force b2share<span class="w"> </span>index<span class="w"> </span>queue<span class="w"> </span>init<span class="w"> </span>purge b2share<span class="w"> </span>index<span class="w"> </span>reindex<span class="w"> </span>--yes-i-know b2share<span class="w"> </span>index<span class="w"> </span>run </code></pre></div> <h3 id="b2share-roles">b2share roles<a class="headerlink" href="#b2share-roles" title="Permanent link">#</a></h3> <p><em>Commands to manage roles.</em></p> <p><strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> add Add user to role. create Create a role. list List all known roles (for a user) remove Remove user from role. </code></pre></div></p> <h4 id="add-role-to-existing-user">Add role to existing user<a class="headerlink" href="#add-role-to-existing-user" title="Permanent link">#</a></h4> <p>Before running the command check if an user exixts. You can do that with the <a href="#find-user-b2share-v223">b2share-user cli</a>. <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>roles<span class="w"> </span>add<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span><span class="w"> </span><span class="si">${</span><span class="nv">ROLE_NAME</span><span class="si">}</span> </code></pre></div></p> <h3 id="b2share-schemas">b2share schemas<a class="headerlink" href="#b2share-schemas" title="Permanent link">#</a></h3> <p><em>Schemas management commands.</em></p> <p><strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> block_schema_add Adds a block schema to the database. block_schema_create_version Assign a json-schema file conforming to the... block_schema_edit block_schema_list Lists all block schemas for this b2share... block_schema_list_versions show the version number and release date of... block_schema_version_generate_json print json_schema of a particular block... community_schema_list Lists all community schema versions for this... community_schema_list_block_schema_versions Show the block schema versions in the... init CLI command loading Root Schema files in the... </code></pre></div></p> <h4 id="how-to-fetch-an-existing-schema">How to fetch an existing schema<a class="headerlink" href="#how-to-fetch-an-existing-schema" title="Permanent link">#</a></h4> <ol> <li>Get the <code>BLOCK SCHEMA ID</code> from an existing schema running: <code>bash b2share schemas block_schema list</code></li> <li>Generate the schema as json file running: <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>schemas<span class="w"> </span>block_schema_version_generate_json<span class="w"> </span>BLOCK_SCHEMA_ID </code></pre></div></li> </ol> <h3 id="b2share-users">b2share users<a class="headerlink" href="#b2share-users" title="Permanent link">#</a></h3> <p><em>User management commands.</em> <strong><em>Commands:</em></strong> <div class="highlight"><pre><span></span><code> activate Activate a user. anonymize delete a user given a user_id or a user_email. If you use both of them only the user_id will be used. Anonymize will not delete completely the user but will replace the real user with an anonymous fake one. create Create a user. deactivate Deactivate a user. delete delete a user given a user_id or a user_email. If you use both of them only the user_id will be used. find Get user info from user_id or user_email. list List all known users </code></pre></div></p> <h4 id="create-user">Create User<a class="headerlink" href="#create-user" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>users<span class="w"> </span>create<span class="w"> </span>--password<span class="w"> </span><span class="si">${</span><span class="nv">PASSWORD</span><span class="si">}</span><span class="w"> </span>--active<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span> </code></pre></div> <blockquote> <p>Remember to use the <code>--active</code> flag to activate the user immidiately after the creation.</p> </blockquote> <h4 id="list-users-b2share-v220">List Users (b2share-v2.2.0)<a class="headerlink" href="#list-users-b2share-v220" title="Permanent link">#</a></h4> <p>The following command will print for you <code>USER_ID</code>, <code>ACTIVE_FLAG</code>, <code>EMAIL</code>, <code>ROLES</code> for each user in the db. <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>users<span class="w"> </span>list </code></pre></div></p> <h4 id="find-user-b2share-v223">Find User (b2share-v2.2.3)<a class="headerlink" href="#find-user-b2share-v223" title="Permanent link">#</a></h4> <div class="highlight"><pre><span></span><code>b2share<span class="w"> </span>users<span class="w"> </span>find<span class="w"> </span>--user_id<span class="w"> </span><span class="si">${</span><span class="nv">USER_ID</span><span class="si">}</span> or b2share<span class="w"> </span>users<span class="w"> </span>find<span class="w"> </span>--user_email<span class="w"> </span><span class="si">${</span><span class="nv">USER_EMAIL</span><span class="si">}</span> </code></pre></div> <p>&nbsp; Last review : 29.1.2025</p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> <div class="md-copyright__highlight"> This documentation is licensed under <a href='https://creativecommons.org/licenses/by-sa/3.0/legalcode'>CC BY-SA 3.0 &nbsp; &nbsp; &nbsp;<img src='/images/cc-by-sa_icon.png'></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!-- a href=''>Imprint</a --> </div> </div> <div class="md-social"> <a href="https://gitlab.eudat.eu/sa.apweiler/eudat-documentation" target="_blank" rel="noopener" title="gitlab.eudat.eu" class="md-social__link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"base": "../..", "features": ["navigation.sections", "navigation.tabs", "navigation.top", "toc.integrate", "search.suggest"], "search": "../../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script> <script src="../../assets/javascripts/bundle.f1b6f286.min.js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10