Draft Network

Manage operation on a single network in draft mode.

Get

GET /draft/network/(string: id)?[key=(string: key)]

Get a network in draft mode.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer or mica-editor role. Other users may provide an temporary access key.

Example requests

Using cURL

curl --user administrator:password https://mica-demo.obiba.org/ws/draft/network/bioshare-eu

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method GET /draft/network/bioshare-eu --json

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "bioshare-eu",
  "name": [
    {
      "lang": "en",
      "value": "Biobank Standardisation and Harmonisation for Research Excellence in the European Union"
    }
  ],
  "acronym": [
    {
      "lang": "en",
      "value": "BioSHaRE-EU"
    }
  ],
  "description": [
    {
      "lang": "en",
      "value": "<p>&nbsp;</p>\r\n\r\n<p>BioSHaRE is a consortium of European leading biobanks and international researchers from all domains of biobanking science. The overall aim of the project is to build upon tools and methods available to achieve solutions for researchers to use pooled data from different cohort and biobank studies. This, in order to obtain the very large sample sizes needed to investigate current questions in multifactorial diseases. This aim is achieved through the development of harmonization and standardization tools, implementation of these tools and demonstration of their applicability.</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>As part of its mission, BioSHaRE will document information collected by participant biobanks and harmonize, integrate and co-analyse biobank-specific data to answer key research questions on chronic diseases.</p>\r\n"
    }
  ],
  "content": "{\"website\":\"http://www.bioshare.eu\",\"maelstromAuthorization\":{\"authorized\":false,\"authorizer\":null}}",
  "studyIds": [
    "finrisk-2007",
    "ship",
    "lifelines"
  ],
  "studySummaries": [],
  "logo": {
    "id": "9e000dc1-564b-4561-92f2-9484fb07054b",
    "fileName": "Bioshare.png",
    "type": "logo",
    "lang": "en",
    "size": 42718,
    "md5": "0c64fd3fb833e28abf8c97e6a8678615",
    "timestamps": {
      "created": "2021-04-12T06:38:04.502Z"
    }
  },
  "memberships": [],
  "permissions": {
    "view": true,
    "edit": true,
    "delete": true,
    "publish": true
  },
  "published": true,
  "timestamps": {
    "created": "2021-04-12T06:38:00.904Z",
    "lastUpdate": "2021-04-12T06:38:04.547Z"
  },
  "obiba.mica.EntityStateDto.state": {
    "publishedTag": "3",
    "revisionsAhead": 0,
    "revisionStatus": "DRAFT",
    "publicationDate": "2021-04-12T06:38:04.571Z",
    "publishedBy": "administrator",
    "publishedId": "57c9b73f7eec70a4ea471e96c741ddd4c41737e9",
    "permissions": {
      "view": true,
      "edit": true,
      "delete": true,
      "publish": true
    }
  }
}
Query Parameters:
 
  • key (string) – Optional temporary access key.
Response JSON Object:
 
  • id (string) – The document unique identifier.
  • acronym (object) – The acronym (short name) of the document, as an object that describes a localized string.
  • name (object) – The name of the document, as an object that describes a localized string.
  • description (object) – The description of the document, as an object that describes a localized string.
  • content (string) – The document’s model content, as a stringified JSON object.
  • logo (object) – The associated logo file.
  • studyIds (strings) – The identifiers of the studies that are part of the network.
  • studySummaries (array) – The list of the associated studies’ summary object.
  • memberships (array) – The list of the associated members object.
  • permissions (object) – The different actions that can be performed on this document.
  • published (boolean) – Whether the document is published.
  • timestamps (object) – The date times (format ISO-8601) at which the document was created and updated.
  • obiba.mica.EntityStateDto.state (object) – The publication state of the document.
Request Headers:
 
Response Headers:
 
Status Codes:

Upate

PUT /draft/network/(string: id)?[comment=(string: comment)]

Update a network.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer or mica-editor role.

Example requests

Using cURL

curl --user administrator:password -X PUT -H "Content-Type: application/json" --data-binary "@network.json" https://mica-demo.obiba.org/ws/draft/network/bioshare-eu

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT --content-type "application/json" /draft/network/bioshare-eu < network.json
Query Parameters:
 
  • comment (string) – Optional revision comment.
Request Headers:
 
Response Headers:
 
Status Codes:

Get Model

GET /draft/network/(string: id)/model

Get the model part of a network.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer or mica-editor role.

Example requests

Using cURL

curl --user administrator:password https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/model

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method GET /draft/network/bioshare-eu/model --json

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "website": "http://www.bioshare.eu",
  "maelstromAuthorization": {
    "authorized": false,
    "authorizer": null
  }
}
Request Headers:
 
Response Headers:
 
Status Codes:

Update Model

PUT /draft/network/(string: id)/model

Update the model part of a network.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer or mica-editor role.

Example requests

Using cURL

curl --user administrator:password -X PUT -H "Content-Type: application/json" --data-binary "@model.json" https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/model

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT --content-type "application/json" /draft/network/bioshare-eu/model < model.json

Index

PUT /draft/network/(string: id)/_index

Rebuild both draft and published indices for a network.

This entry point requires Authentication of a user with mica-administrator role.

Example requests

Using cURL

curl --user administrator:password -X PUT https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/_index

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT /draft/network/bioshare-eu/_index --json

Update Status

PUT /draft/network/(string: id)/_status?value=(string: status)

Update the edition status of a network: DRAFT when the document is being edited, UNDER_REVIEW when the document is to be reviewed for publication, DELETED when the document is marked for permanent removal.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer role.

Example requests

Using cURL

curl --user administrator:password -X PUT https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/_publish

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT /draft/network/bioshare-eu/_publish --json
Query Parameters:
 
  • status (string) – The edition status which can be one of DRAFT, UNDER_REVIEW, DELETED.

Publish

PUT /draft/network/(string: id)/_publish

Publish a network.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer role.

Example requests

Using cURL

curl --user administrator:password -X PUT https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/_publish

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT /draft/network/bioshare-eu/_publish --json

Unpublish

DELETE /draft/network/(string: id)/_publish

Unpublish a network.

This entry point requires Authentication of a user with mica-administrator or mica-reviewer role.

Example requests

Using cURL

curl --user administrator:password -X DELETE https://mica-demo.obiba.org/ws/draft/network/bioshare-eu/_publish

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method DELETE /draft/network/bioshare-eu/_publish --json

Remove

DELETE /draft/network/(string: id)

Remove a network (unpublish it if necessary).

This entry point requires Authentication of a user with mica-administrator or mica-reviewer role.

Example requests

Using cURL

curl --user administrator:password -X DELETE https://mica-demo.obiba.org/ws/draft/network/bioshare-eu

Using the Web Services Python command line tool

mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method DELETE /draft/network/bioshare-eu --json