Mica
latest
  • Introduction
  • Documents
  • Publication Flow

Administrator Guide

  • Installation
  • Configuration
  • Public Pages Configuration
  • Plugins

Web User Guide

  • Web Introduction
  • Documents Management
  • Data Access Requests Management
  • Administration

Python User Guide

  • Python Introduction
  • Authorization Commands
  • Document Commands
    • Update Collected Dataset
    • Update Collected Datasets
    • File Management
    • Search
      • Options
      • Credentials
      • Extras
      • Example
    • Import Zip
  • Other Commands

R User Guide

  • R Introduction
  • R Usage

REST API Guide

  • REST API Introduction
  • Draft Documents
Mica
  • Docs »
  • Document Commands »
  • Search
  • Edit on GitHub

Search¶

This command allows to extract published information from the search API of Mica server. The output is in CSV format.

mica search <CREDENTIALS> [OPTIONS] [EXTRA]

Options¶

Option Description
--target TARGET, -t TARGET The type of document to be listed: variable, dataset, study, population, dce (data collection event) or network.
--query QUERY, -q QUERY The search query, in RQL (Resource Query Language), that can be copied from the search page. If not specified, no filter is applied.
--start START, -s START Start search at document position (default is 0).
--limit LIMIT, -lm LIMIT Max number of documents to be listed (default is 100).
--locale LOCALE, -lc LOCALE The language of the labels (default is ‘en’).
--out OUT, -o OUT Output file path. If not specified, result is printed on the console.

Credentials¶

Authentication is done by username/password credentials.

Option Description
--mica MICA, -mk MICA Mica server base url.
--user USER, -u USER User name. User with appropriate permissions is expected depending of the REST resource requested.
--password PASSWORD, -p PASSWORD User password.

Extras¶

Option Description
-h, --help Show the command help’s message
--verbose, -v Verbose output

Example¶

Get 1000 published variables.

mica search -mk https://mica-demo.obiba.org -u anonymous -p password --target variable --limit 1000

Get 1000 (max) published variables about Alcohol from cohort studies:

mica search -mk https://mica-demo.obiba.org -u anonymous -p password --target variable --limit 1000 --query 'variable(in(Mlstr_area.Lifestyle_behaviours,(Alcohol))),study(in(Mica_study.methods-design,cohort_study))'

Get the cohort studies having collected data about Alcohol:

mica search -mk https://mica-demo.obiba.org -u anonymous -p password --target study --query 'variable(in(Mlstr_area.Lifestyle_behaviours,(Alcohol))),study(in(Mica_study.methods-design,cohort_study))'
Next Previous

© Copyright 2021, OBiBa Revision eb6c32eb.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
dev
Downloads
pdf
html
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.