POST api/v1/Users/Photo
Uploads a photo file to the instance that will be used to print the badge later.
Request Information
URI Parameters
None.
Body Parameters
PersonPhotoViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| PersonId | globally unique identifier |
None. |
|
| ImageData | Collection of byte |
None. |
|
| FileName | string |
None. |
|
| ThumbFileName | string |
None. |
|
| SetAsDefault | boolean |
None. |
Request Formats
application/json, text/json
Sample:
{
"PersonId": "403b11f9-8f02-43a8-937b-f85fb35b0525",
"ImageData": "QEA=",
"FileName": "sample string 2",
"ThumbFileName": "sample string 3",
"SetAsDefault": true
}
application/xml, text/xml
Sample:
<PersonPhotoViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <FileName>sample string 2</FileName> <ImageData>QEA=</ImageData> <PersonId>403b11f9-8f02-43a8-937b-f85fb35b0525</PersonId> <SetAsDefault>true</SetAsDefault> <ThumbFileName>sample string 3</ThumbFileName> </PersonPhotoViewModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Result| Name | Description | Type | Additional information |
|---|---|---|---|
| ResultCode |
Represents the result code |
integer |
None. |
| Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"ResultCode": 1,
"Description": "sample string 2"
}
application/xml, text/xml
Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 2</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>1</ResultCode> </Result>