Rest APIs¶
This section is for super users / developers only. These functions are subject to change as they are internal development functions. Use at your own risk.
The functions provided in these documents are generally direct representations of the Synapse REST API. They're used within the Synapse Python Client to interact with the Synapse servers. These will eventually be removed from the Synapse Python Client in favor of an auto-generated client derived from the Synapse Open API Spec.
synapseclient.api.entity_bundle_services_v2
¶
This module is responsible for exposing the services defined at: https://rest-docs.synapse.org/rest/#org.sagebionetworks.repo.web.controller.EntityBundleV2Controller
Classes¶
Functions¶
get_entity_id_bundle2(entity_id, request=None, *, synapse_client=None)
async
¶
PARAMETER | DESCRIPTION |
---|---|
entity_id |
The ID of the entity to which the bundle belongs
TYPE:
|
request |
The request for the bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleRequest.html. If not passed in or None, the default request will be used:
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
The requested entity bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundle.html |
Source code in synapseclient/api/entity_bundle_services_v2.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
get_entity_id_version_bundle2(entity_id, version, request=None, *, synapse_client=None)
async
¶
PARAMETER | DESCRIPTION |
---|---|
entity_id |
The ID of the entity to which the bundle belongs
TYPE:
|
version |
The version of the entity to which the bundle belongs
TYPE:
|
request |
The request for the bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleRequest.html. If not passed in or None, the default request will be used:
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
The requested entity bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundle.html |
Source code in synapseclient/api/entity_bundle_services_v2.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
post_entity_bundle2_create(request, generated_by=None, *, synapse_client=None)
async
¶
PARAMETER | DESCRIPTION |
---|---|
request |
The request for the bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleCreate.html
TYPE:
|
generated_by |
The ID of the activity to associate with the entity.
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
The requested entity bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundle.html |
Source code in synapseclient/api/entity_bundle_services_v2.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
put_entity_id_bundle2(entity_id, request, generated_by=None, *, synapse_client=None)
async
¶
PARAMETER | DESCRIPTION |
---|---|
entity_id |
The ID of the entity to which the bundle belongs.
TYPE:
|
request |
The request for the bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundleCreate.html
TYPE:
|
generated_by |
The ID of the activity to associate with the entity.
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
The requested entity bundle matching https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/entitybundle/v2/EntityBundle.html |
Source code in synapseclient/api/entity_bundle_services_v2.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
|
synapseclient.api.annotations
¶
The purpose of this module is to provide any functions that are needed to interact with annotations that are not cleanly provided by the synapseclient library.
Classes¶
Functions¶
set_annotations(annotations, *, synapse_client=None)
¶
Call to synapse and set the annotations for the given input.
PARAMETER | DESCRIPTION |
---|---|
annotations |
The annotations to set. This is expected to have the id, etag, and annotations filled in.
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
Returns: The annotations set in Synapse.
Source code in synapseclient/api/annotations.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
set_annotations_async(annotations, *, synapse_client=None)
async
¶
Call to synapse and set the annotations for the given input.
PARAMETER | DESCRIPTION |
---|---|
annotations |
The annotations to set. This is expected to have the id, etag, and annotations filled in.
TYPE:
|
synapse_client |
If not passed in and caching was not disabled by
TYPE:
|
Returns: The annotations set in Synapse.
Source code in synapseclient/api/annotations.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|