Skip to content

Commit 1b35761

Browse files
authored
Add User Group Instances endpoint (#406)
* Add User Group Instances endpoint * Add code sample
1 parent f656bbe commit 1b35761

5 files changed

Lines changed: 52 additions & 0 deletions

File tree

openapi/components/codeSamples/users.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@
5454
source: >-
5555
curl -X GET "https://api.vrchat.cloud/api/1/userNotes/{userNoteId}" \
5656
-b "auth={authCookie}"
57+
'/users/{userId}/instances/groups':
58+
get:
59+
- lang: cURL
60+
source: >-
61+
curl -X GET "https://api.vrchat.cloud/api/1/users/{userId}/instances/groups" \
62+
-b "auth={authCookie}"

openapi/components/paths.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@
270270
$ref: "./paths/users.yaml#/paths/~1userNotes"
271271
"/userNotes/{userNoteId}":
272272
$ref: "./paths/users.yaml#/paths/~1userNotes~1{userNoteId}"
273+
"/users/{userId}/instances/groups":
274+
$ref: "./paths/users.yaml#/paths/~1users~1{userId}~1instances~1groups"
273275

274276
# worlds
275277

openapi/components/paths/users.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,26 @@ paths:
274274
$ref: ../responses/MissingCredentialsError.yaml
275275
operationId: getUserNote
276276
description: Get a particular user note
277+
"/users/{userId}/instances/groups":
278+
parameters:
279+
- $ref: ../parameters.yaml#/userId
280+
get:
281+
summary: Get User Group Instances
282+
x-codeSamples:
283+
$ref: ../codeSamples/users.yaml#/~1users~1{userId}~1instances~1groups/get
284+
description: Returns a list of group instances for a user
285+
operationId: getUserGroupInstances
286+
tags:
287+
- users
288+
responses:
289+
'200':
290+
$ref: ../responses/users/UserGroupInstanceListResponse.yaml
291+
'401':
292+
$ref: ../responses/MissingCredentialsError.yaml
293+
'403':
294+
$ref: ../responses/users/UserMustBeOwnError.yaml
295+
security:
296+
- authCookie: []
277297
tags:
278298
$ref: ../tags.yaml
279299
components:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
description: Returns a list of Instance objects with a fetched at time.
2+
content:
3+
application/json:
4+
schema:
5+
type: object
6+
properties:
7+
fetchedAt:
8+
type: string
9+
format: date-time
10+
instances:
11+
type: array
12+
items:
13+
$ref: ../../schemas/Instance.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
description: Error response when trying get group instances of another user.
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../../schemas/Error.yaml
6+
examples:
7+
User Id must be your own:
8+
value:
9+
error:
10+
message: "User ID must be your own․"
11+
status_code: 403

0 commit comments

Comments
 (0)