-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathV1_PhotoService.yml
49 lines (47 loc) · 1.75 KB
/
V1_PhotoService.yml
1
2
3
4
5
6
7
8
9
10
11
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
swagger: '2.0'
info:
x-copyright: 'Copyright IBM Corp. 2017'
title: Photos
description: "The Photo microservice API supports the storage and retrieval of photos in IBM Watson Workspace. When working with photos in Watson Work Services, the Photo microservice provides the following endpoint:
* POST endpoint to upload a custom image to Watson Work Services.
* To retrieve a URL for a user’s photo please see details for getting their Person object and its PhotoURL at [IBM Watson Work Services People Service Documentation](../people)."
version: 1.0.0
host: api.watsonwork.ibm.com
schemes:
- https
parameters:
Authorization:
name: Authorization
in: header
type: string
description: "Authorization header, in the form of `Bearer {access_token}`"
required: true
paths:
'/photos/':
post:
summary: Upload a photo. This endpoint will allow the caller to update its own photo or icon. Updating someone else’s photo is not allowed.
consumes:
- "multipart/form-data"
produces:
- "application/json"
operationId: updatePhoto
description: Upload a photo to the current account.
parameters:
- name: file
in: formData
required: true
type: file
description: JPG photo file being uploaded, with a size of 300kb or less.
- $ref: '#/parameters/Authorization'
- name: Accept
in: header
required: true
type: string
description: must be set to `application/json`
responses:
'200':
description: Photo successfully uploaded.
'415':
description: Unsupported file media type.
'500':
description: Server error occurred on POST attempt.