Skip to content

Commit 5ce1e73

Browse files
committed
incorporate requested changes
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
1 parent e22b373 commit 5ce1e73

1 file changed

Lines changed: 105 additions & 4 deletions

File tree

api/openapi-spec/v1.0.yaml

Lines changed: 105 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,45 @@ paths:
9292
$ref: '#/components/responses/error'
9393
x-ms-docs-operation-type: operation
9494
/v1.0/me/photo:
95+
get:
96+
tags:
97+
- me.photo
98+
summary: Get the current user's profile photo metadata
99+
operationId: GetOwnUserPhotoMetadata
100+
responses:
101+
'200':
102+
description: Retrieve photo metadata
103+
content:
104+
application/json:
105+
schema:
106+
title: Collection of educationUser
107+
type: object
108+
properties:
109+
value:
110+
type: array
111+
items:
112+
$ref: '#/components/schemas/profilePhotoMetaData'
113+
example:
114+
- id: "240x240"
115+
width: 240
116+
height: 240
117+
'@odata.type': '#microsoft.graph.profilePhotoMetaData'
118+
'@odata.id': "https://graph.microsoft.com/v1.0/users('ddfcd489-628b-7d04-b48b-20075df800e5@1717622f-1d94-c0d4-9d74-f907ad6677b4')/photo"
119+
'@odata.mediaContentType': "image/jpeg"
120+
'@odata.mediaEtag': "\"BA09D118\""
121+
default:
122+
$ref: '#/components/responses/error'
123+
/v1.0/me/photo/$value:
95124
get:
96125
tags:
97126
- me.photo
98127
summary: Get the current user's profile photo
99128
operationId: GetOwnUserPhoto
100129
responses:
101130
'200':
102-
description: Retrieved entity
131+
description: Retrieved profile photo
103132
content:
104-
image/png:
133+
image/jpeg:
105134
schema:
106135
type: string
107136
format: binary
@@ -115,7 +144,7 @@ paths:
115144
requestBody:
116145
description: New user photo
117146
content:
118-
image/png:
147+
image/jpeg:
119148
schema:
120149
type: string
121150
format: binary
@@ -132,7 +161,7 @@ paths:
132161
requestBody:
133162
description: New user photo
134163
content:
135-
image/png:
164+
image/jpeg:
136165
schema:
137166
type: string
138167
format: binary
@@ -141,6 +170,16 @@ paths:
141170
description: Success
142171
default:
143172
$ref: '#/components/responses/error'
173+
delete:
174+
tags:
175+
- me.photo
176+
summary: Delete the current user's profile photo
177+
operationId: DeleteOwnUserPhoto
178+
responses:
179+
'204':
180+
description: Success
181+
default:
182+
$ref: '#/components/responses/error'
144183
'/v1beta1/extensions/org.libregraph/activities':
145184
get:
146185
tags:
@@ -2845,6 +2884,43 @@ paths:
28452884
schema:
28462885
type: string
28472886
'/v1.0/users/{user-id}/photo':
2887+
get:
2888+
tags:
2889+
- user.photo
2890+
summary: Get the photo metadata of a user
2891+
operationId: GetUserPhotoMetadata
2892+
parameters:
2893+
- name: user-id
2894+
in: path
2895+
description: 'key: id or name of user'
2896+
required: true
2897+
schema:
2898+
type: string
2899+
x-ms-docs-key-type: user
2900+
responses:
2901+
'200':
2902+
description: Retrieve photo metadata
2903+
content:
2904+
application/json:
2905+
schema:
2906+
title: Collection of ProfilePhotoMetaData
2907+
type: object
2908+
properties:
2909+
value:
2910+
type: array
2911+
items:
2912+
$ref: '#/components/schemas/profilePhotoMetaData'
2913+
example:
2914+
- id: "240x240"
2915+
width: 240
2916+
height: 240
2917+
'@odata.type': '#microsoft.graph.profilePhotoMetaData'
2918+
'@odata.id': "https://graph.microsoft.com/v1.0/users('ddfcd489-628b-7d04-b48b-20075df800e5@1717622f-1d94-c0d4-9d74-f907ad6677b4')/photo"
2919+
'@odata.mediaContentType': "image/jpeg"
2920+
'@odata.mediaEtag': "\"BA09D118\""
2921+
default:
2922+
$ref: '#/components/responses/error'
2923+
'/v1.0/users/{user-id}/photo/$value':
28482924
get:
28492925
tags:
28502926
- user.photo
@@ -4006,6 +4082,31 @@ paths:
40064082
$ref: '#/components/responses/error'
40074083
components:
40084084
schemas:
4085+
profilePhotoMetaData:
4086+
type: object
4087+
properties:
4088+
"@odata.context":
4089+
type: string
4090+
description: The OData context URL for the resource.
4091+
"@odata.id":
4092+
type: string
4093+
description: The OData ID URL for the resource.
4094+
"@odata.mediaContentType":
4095+
type: string
4096+
description: The media content type of the resource.
4097+
"@odata.mediaEtag":
4098+
type: string
4099+
description: The ETag for the resource.
4100+
id:
4101+
type: string
4102+
description: The unique identifier for an entity. Read-only.
4103+
readOnly: true
4104+
width:
4105+
type: integer
4106+
description: The width of the photo in pixels.
4107+
height:
4108+
type: integer
4109+
description: The height of the photo in pixels.
40094110
tagAssignment:
40104111
type: object
40114112
required:

0 commit comments

Comments
 (0)