getCurrentApp
When called by an authorized app, this endpoint will return metadata about the app. For any other caller, this endpoint is forbidden
Responses
Response samples
- 200
{- "connectionId": "string",
- "app": {
- "appId": "string",
- "name": "string",
- "iconUrl": "string",
- "description": "string",
- "introWarningMarkdown": "string",
- "createdAt": "string",
- "lastUpdatedAt": "string"
}, - "userId": "string",
- "userEmail": "string",
- "createdAt": "string"
}
createHeadlessAuthSession
Create a headless auth session, which allows certain LMK apps to retrieve oauth access tokens without any server component
Request Body schema: application/json
appId required | string |
scope required | string |
Responses
Request samples
- Payload
{- "appId": "string",
- "scope": "string"
}
Response samples
- 201
{- "sessionId": "string",
- "appId": "string",
- "scope": "string",
- "authorizeUrl": "string",
- "createdAt": "string"
}
retrieveHeadlessAuthSessionToken
Retrieve the oauth token for the headless auth session. If the session is complete, the access and refresh tokens will be returned. Otherwise, this endpoint will return an error code.
path Parameters
sessionId required | string |
Responses
Response samples
- 200
{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0,
- "scope": "string",
- "refresh_token": "string"
}
refreshHeadlessAuthToken
Refresh an oauth access token obtained through a headless auth session
Request Body schema: application/json
appId required | string |
refreshToken required | string |
Responses
Request samples
- Payload
{- "appId": "string",
- "refreshToken": "string"
}
Response samples
- 201
{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0,
- "scope": "string",
- "refresh_token": "string"
}
token
This is the oauth access token endpoint as defined by the oauth spec. After an access code is given to an oauth app, they use that access code as well as their client id and secret to get an access token and refresh token from this endpoint.
header Parameters
authorization required | string |
Request Body schema: application/json
grant_type required | string Enum: "authorization_code" "refresh_token" |
redirect_uri required | string |
code required | string |
refresh_token required | string |
Responses
Request samples
- Payload
{- "grant_type": "authorization_code",
- "redirect_uri": "string",
- "code": "string",
- "refresh_token": "string"
}
Response samples
- 201
{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0,
- "scope": "string",
- "refresh_token": "string"
}
listNotificationChannels
List the notification channels for the current user. If called by
an oauth app, the results will depend on what scopes have been
granted to the app. If channel.read
has not been granted,
this will return an empty list of channels. Otherwise, it will
return all of the channels unless the user limited the app's
visibillity during the oauth flow.
Responses
Response samples
- 200
{- "channels": [
- {
- "payload": {
- "type": "email",
- "emailAddress": "string"
}, - "notificationChannelId": "string",
- "name": "string",
- "order": 0,
- "isDefault": true,
- "isManaged": true,
- "isVerified": true,
- "verificationRequired": true,
- "createdAt": "string",
- "createdByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "lastUpdatedAt": "string",
- "lastUpdatedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}
}
]
}
postEvent
Post an event to LMK. This will appear in the LMK app and can optionally be used to notify the user on one of their configured notification channels.
Request Body schema: application/json
sessionId | string |
message required | string |
contentType | string Enum: "text/plain" "text/markdown" |
object (EventNotificationConfiguration) |
Responses
Request samples
- Payload
{- "sessionId": "string",
- "message": "string",
- "contentType": "text/plain",
- "notificationConfig": {
- "notify": true,
- "channelIds": [
- "string"
]
}
}
Response samples
- 201
{- "eventId": "string",
- "sessionId": "string",
- "userId": "string",
- "actor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "message": "string",
- "contentType": "text/plain",
- "channels": [
- {
- "notificationChannelId": "string",
- "type": "email",
- "name": "string",
- "status": "NOT_SENT"
}
], - "createdAt": "string"
}
createSession
Create an interactive session. This appears in the LMK app and allows both monitoring the state of a remote process and interacting with it, or configuring notifications to be send when it finishes running.
Request Body schema: application/json
required | JupyterSessionState (object) or ProcessSessionState (object) or NoneSessionState (object) |
name required | string |
Responses
Request samples
- Payload
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}, - "name": "string"
}
Response samples
- 201
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}, - "sessionId": "string",
- "name": "string",
- "type": "jupyter",
- "createdAt": "string",
- "createdByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "lastUpdatedAt": "string",
- "lastUpdatedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "endedAt": "string",
- "endedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}
}
Response samples
- 200
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}, - "sessionId": "string",
- "name": "string",
- "type": "jupyter",
- "createdAt": "string",
- "createdByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "lastUpdatedAt": "string",
- "lastUpdatedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "endedAt": "string",
- "endedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}
}
updateSession
Update the state of an interactive session.
path Parameters
sessionId required | string |
Request Body schema: application/json
PartialJupyterSessionState (object) or PartialProcessSessionState (object) or PartialNoneSessionState (object) | |||||||||||||||||||||||||
One of
|
Responses
Request samples
- Payload
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}
}
Response samples
- 200
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}, - "sessionId": "string",
- "name": "string",
- "type": "jupyter",
- "createdAt": "string",
- "createdByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "lastUpdatedAt": "string",
- "lastUpdatedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "endedAt": "string",
- "endedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}
}
endSession
Mark an interactive session as ended. This will not allow any further updates to the session.
path Parameters
sessionId required | string |
Responses
Response samples
- 201
{- "state": {
- "type": "jupyter",
- "url": "string",
- "notebookName": "string",
- "shellState": "string",
- "cellState": "string",
- "cellText": "string",
- "cellError": "string",
- "executionNum": 0,
- "cellStartedAt": "string",
- "cellFinishedAt": "string",
- "notifyOn": "string",
- "notifyChannel": "string"
}, - "sessionId": "string",
- "name": "string",
- "type": "jupyter",
- "createdAt": "string",
- "createdByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "lastUpdatedAt": "string",
- "lastUpdatedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}, - "endedAt": "string",
- "endedByActor": {
- "type": "USER",
- "actorId": "string",
- "iconUrl": "string",
- "name": "string"
}
}
sessionAction
Perform one of the available actions. If no client is connected to the interactive session, it will return a 412 error code.
path Parameters
sessionId required | string |
Request Body schema: application/json
ProcessSendSignalRequest (object) | |
action required | string |
Responses
Request samples
- Payload
{- "body": {
- "signal": 0
}, - "action": "string"
}