Draft Networks¶
Manage operations on the list of networks in draft mode.
List¶
-
GET
/draft/networks
¶ List a summary of the networks in draft mode.
This entry point requires Authentication of a user with
mica-administrator
ormica-reviewer
ormica-editor
role, otherwise an empty list is returned.Example requests
Using cURL
curl --user administrator:password -H "Accept:application/json" https://mica-demo.obiba.org/ws/draft/networks
Using the Web Services Python command line tool
mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method GET /draft/networks --json
Example response
HTTP/1.1 200 OK Content-Type: application/json [ { "id": "bioshare-eu", "acronym": [ { "lang": "en", "value": "BioSHaRE-EU" } ], "name": [ { "lang": "en", "value": "Biobank Standardisation and Harmonisation for Research Excellence in the European Union" } ], "studyIds": [ "finrisk-2007", "ship", "lifelines" ], "permissions": { "delete": true, "edit": true, "publish": true, "view": true }, "published": true, "timestamps": { "created": "2021-04-12T06:38:00.904Z", "lastUpdate": "2021-04-12T06:38:04.547Z" }, "obiba.mica.EntityStateDto.networkSummaryState": { "permissions": { "delete": true, "edit": true, "publish": true, "view": true }, "publicationDate": "2021-04-12T06:38:04.571Z", "publishedBy": "administrator", "publishedId": "57c9b73f7eec70a4ea471e96c741ddd4c41737e9", "publishedTag": "3", "revisionStatus": "DRAFT", "revisionsAhead": 0 } } ]
Query Parameters: - study (string) – List networks linked to the study with provided identifier.
- query (string) – RQL search query.
- from (numeric) – List offset. Default value is
0
. - limit (numeric) – List maximum count of documents.
- sort (string) – Sorting field. Default value is
id
. - order (string) – Sorting order. Default value is
asc
. - exclude (strings) – Document identifiers to be excluded from the list.
- filter (string) – Document state filter which possible values are:
ALL
,PUBLISHED
,UNDER_REVIEW
,IN_EDITION
,TO_DELETE
. Default value isALL
.
Response JSON Array of Objects: - 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.
- studyIds (strings) – The identifiers of the studies that are part of the network.
- 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.networkSummaryState (object) – The publication state of the document.
Request Headers: - Authorization – As described in the Authentication section
- Accept –
*/*
Response Headers: - Content-Type –
application/json
Status Codes: - 200 OK – The documents list to which user has read access rights.
- 500 Internal Server Error – Server error.
Create¶
-
POST
/draft/networks
¶ Create a network in draft mode.
This entry point requires Authentication of a user with
mica-administrator
ormica-reviewer
ormica-editor
role.
Index¶
-
PUT
/draft/networks/_index
¶ Rebuild both draft and published indices for all networks.
This entry point requires Authentication of a user with
mica-administrator
role.Example requests
Using cURL
curl --user administrator:password -H "Accept:application/json" -X PUT https://mica-demo.obiba.org/ws/draft/networks/_index
Using the Web Services Python command line tool
mica rest -mk https://mica-demo.obiba.org -u administrator -p password --method PUT /draft/networks/_index --json
Request Headers: - Authorization – As described in the Authentication section
Status Codes: - 200 OK – The indices rebuild task is scheduled.
- 401 Unauthorized – User does not have the permission to perform this operation.
- 500 Internal Server Error – Server error.