mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00
add activity spec to rest api
This commit is contained in:
@@ -89,7 +89,7 @@ paths:
|
||||
post:
|
||||
summary: Create multiple users
|
||||
parameters:
|
||||
- name: data
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
@@ -147,7 +147,7 @@ paths:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
- name: data
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
description: Updated user info. At least one key to be updated (name or admin) is required.
|
||||
@@ -176,6 +176,60 @@ paths:
|
||||
responses:
|
||||
'204':
|
||||
description: The user has been deleted
|
||||
/users/{name}/activity:
|
||||
post:
|
||||
summary:
|
||||
Notify Hub of activity for a given user.
|
||||
description:
|
||||
Notify the Hub of activity by the user,
|
||||
e.g. accessing a service or (more likely)
|
||||
actively using a server.
|
||||
parameters:
|
||||
- name: name
|
||||
description: username
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
- body:
|
||||
in: body
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
last_activity:
|
||||
type: string
|
||||
format: date-time
|
||||
description: |
|
||||
Timestamp of last-seen activity for this user.
|
||||
Only needed if this is not activity associated
|
||||
with using a given server.
|
||||
required: false
|
||||
servers:
|
||||
description: |
|
||||
Register activity for specific servers by name.
|
||||
The keys of this dict are the names of servers.
|
||||
The default server has an empty name ('').
|
||||
required: false
|
||||
type: object
|
||||
properties:
|
||||
'<server name>':
|
||||
description: |
|
||||
Activity for a single server.
|
||||
type: object
|
||||
properties:
|
||||
last_activity:
|
||||
required: true
|
||||
type: string
|
||||
format: date-time
|
||||
description: |
|
||||
Timestamp of last-seen activity on this server.
|
||||
example:
|
||||
last_activity: '2019-02-06T12:54:14Z'
|
||||
servers:
|
||||
'':
|
||||
last_activity: '2019-02-06T12:54:14Z'
|
||||
gpu:
|
||||
last_activity: '2019-02-06T12:54:14Z'
|
||||
|
||||
/users/{name}/server:
|
||||
post:
|
||||
summary: Start a user's single-user notebook server
|
||||
@@ -370,7 +424,7 @@ paths:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
- name: data
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
description: The users to add to the group
|
||||
@@ -395,7 +449,7 @@ paths:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
- name: data
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
description: The users to remove from the group
|
||||
@@ -453,7 +507,7 @@ paths:
|
||||
summary: Notify the Hub about a new proxy
|
||||
description: Notifies the Hub of a new proxy to use.
|
||||
parameters:
|
||||
- name: data
|
||||
- name: body
|
||||
in: body
|
||||
required: true
|
||||
description: Any values that have changed for the new proxy. All keys are optional.
|
||||
|
Reference in New Issue
Block a user