PUT v1/Participant/{id}
Creates a new participant or updates an existing participant.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
Unique Identifier of the participant to update or create. |
string |
Required |
Body Parameters
An object representing the participant.
Participant| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | string |
None. |
|
| Metadata | Dictionary of string [key] and string [value] |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": "sample string 1",
"Metadata": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
}
}
text/html
Sample:
{"Id":"sample string 1","Metadata":{"sample string 1":"sample string 2","sample string 3":"sample string 4"}}
application/xml, text/xml
Sample:
<Participant xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Questionnaire.Api.Contracts.v1.Models">
<Id>sample string 1</Id>
<Metadata xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 1</d2p1:Key>
<d2p1:Value>sample string 2</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 3</d2p1:Key>
<d2p1:Value>sample string 4</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</Metadata>
</Participant>
Response Information
Resource Description
A response containing the new Participant's unique id, or validation errors if the participant could not be created or updated.
SetParticipantPostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Success | boolean |
None. |
Response Codes
- 200 OK: Participant successfully saved.
- 400 BadRequest: Data validation failed, see the response body for more information.
- 401 Unauthorized:
- 500 InternalServerError:
Response Formats
application/json, text/json
Sample:
{
"Success": true
}
text/html
Sample:
{"Success":true}
application/xml, text/xml
Sample:
<SetParticipantPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ITAGroup.Questionnaire.Api.Contracts.v1.Responses"> <Success>true</Success> </SetParticipantPostResponse>