Set a Tag for a Researcher, Study, Participant, Activity, or Sensor, or its childen.
Tag
s act as a hierarchical key-value store localized to each Resource. That is to say, Participant
A has a completely different key-value store instance than Participant
B or Activity
X. Furthermore, the resource hierarchy also influences the contents of the key-value store. If a Researcher
sets a Tag
"hello.testing" on Participant
A with the contents "hello world"
, then Participant
A will be able to query their tags and see "hello.testing" exists, even though it was not created by Participant
A. The side-effect of this feature is called "tag masking": should Participant
A now attempt to create "hello.testing" with the contents "bye world"
, this Tag
will be successfully saved, but masked during retrieval by the version created by the Researcher
.
There are four target
types that act as a selector for which key-value store will be manipulated.
"me"
: Implicit self; Automatically substitute theid
parameter as thetarget
. See (2) for semantics.id
: Explicit self. Manually specify theid
parameter as thetarget
. This selects the key-value store corresponding to the resource itself.{type}
: Implicit child. This should be one of "Researcher", "Study", "Participant", "Activity", or "Sensor". This selects the key-value store that spans all children resources of that resource type!! For example, aResearcher
may create aTag
targettingParticipant
(allParticipant
children of allStudy
children of theResearcher
resource itself), such that theTag
applies to ANY childParticipant
.{id}
: Explicit child. This should be a specific child resource ID, and selects the key-value store of that specific child resource ONLY.
In most cases, either (1) or (2) are what you will want to use, as these select self's specific key-value store. There are, however, a few cases for (3) and (4). For example, if a study needs to manage delivered gift card codes, using (1)/(2) would be problematic, as this inadvertently allows the Participant
s to modify the delivered codes.
The deprecated name for this operation is Type.set_attachment
.
Path Parameters |
---|
id string — REQUIREDThe |
key string — REQUIREDThe |
target string — REQUIREDThe |
Request Body — REQUIRED |
---|
undefined |
Responses | ||
---|---|---|
200 Success
| ||
default Error
|