Sessions Read/List/Cancel API and SDK (#369)
This commit is contained in:
1 parent
f7e48ec836
commit
e937b0ea27
22 files changed
+2852
-130
No files matched your search
@@ -1815,6 +1815,93 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/sessions": {
|
||||
"get": {
|
||||
"summary": "Lists all Sessions",
|
||||
"operationId": "SessionService_ListSessions",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.services.v1.ListSessionsResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "scope_id",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "view",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.SessionService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/sessions/{id}": {
|
||||
"get": {
|
||||
"summary": "Gets a single Session",
|
||||
"operationId": "SessionService_GetSession",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.Session"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "view",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.SessionService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/sessions/{id}:cancel": {
|
||||
"post": {
|
||||
"summary": "Cancels a Session",
|
||||
"operationId": "SessionService_CancelSession",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.Session"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"controller.api.services.v1.SessionService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/targets": {
|
||||
"get": {
|
||||
"summary": "Lists all Targets",
|
||||
@@ -2897,6 +2984,130 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.resources.sessions.v1.Session": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the resource\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"target_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the parent of this resource. This must be defined for creation\nof this resource, but is otherwise read only."
|
||||
},
|
||||
"scope": {
|
||||
"$ref": "#/definitions/controller.api.resources.scopes.v1.ScopeInfo",
|
||||
"description": "Scope information for this resource\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"created_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time this resource was created\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"updated_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time this resource was last updated.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"expiration_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"title": "After this time the connection will be expired, e.g. forcefully terminated"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The version can be used in subsequent write requests to ensure this\nresource has not changed and to fail the write if it has."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "Type of the session (e.g. tcp, ssh, etc.)"
|
||||
},
|
||||
"auth_token_id": {
|
||||
"type": "string",
|
||||
"description": "The id of the token used to authenticate."
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"title": "The ID of the user that requested the session"
|
||||
},
|
||||
"host_set_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"host_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"scope_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"endpoint": {
|
||||
"type": "string"
|
||||
},
|
||||
"states": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.SessionState"
|
||||
},
|
||||
"description": "The states of this session in descending from the current state to the\nfirst."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The name of the current status of this session."
|
||||
},
|
||||
"worker_info": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.WorkerInfo"
|
||||
},
|
||||
"description": "Worker information. The first worker in the slice should be prioritized."
|
||||
},
|
||||
"certificate": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Deprecated, to be moved to another proto by another PR:\nThe certificate to use when connecting (or if using custom certs, to\nserve as the \"login\"). Raw DER bytes."
|
||||
},
|
||||
"private_key": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The private key to use when connecting (or if using custom certs, to pass\nas the \"password\")."
|
||||
}
|
||||
},
|
||||
"title": "Session contains all fields related to a Session resource"
|
||||
},
|
||||
"controller.api.resources.sessions.v1.SessionState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "This is the status of the session. For example \"pending\", \"active\",\n\"canceling\", \"terminated\"."
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time the session entered this state.\nOutput only.",
|
||||
"readOnly": true
|
||||
},
|
||||
"end_time": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time the session stopped being in this state.\nOutput only.",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.resources.sessions.v1.WorkerInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string",
|
||||
"title": "The address of the worker"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.resources.targets.v1.HostSet": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3250,6 +3461,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.CancelSessionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.Session"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.ChangePasswordRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3491,6 +3710,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.GetSessionResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.Session"
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.GetTargetResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3606,6 +3833,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.ListSessionsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/controller.api.resources.sessions.v1.Session"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"controller.api.services.v1.ListTargetsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in new issue
Block a user