Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 1.95 KB

SessionsService.md

File metadata and controls

70 lines (44 loc) · 1.95 KB

SessionsService

A list of all methods in the SessionsService service. Click on the method name to view detailed information about that method.

Methods Description
create_session Create a new Devin session to start working on a task.
get_session_details Retrieve details about an existing session, including its status and any structured output.

create_session

Create a new Devin session to start working on a task.

  • HTTP Method: POST
  • Endpoint: /v1/sessions

Parameters

Name Type Required Description
request_body CreateSessionRequest The request body.

Return Type

CreateSessionOkResponse

Example Usage Code Snippet

from devin import Devin

sdk = Devin(
    access_token="YOUR_ACCESS_TOKEN"
)

result = sdk.sessions.create_session()

print(result)

get_session_details

Retrieve details about an existing session, including its status and any structured output.

  • HTTP Method: GET
  • Endpoint: /v1/sessions/{session_id}

Parameters

Name Type Required Description
session_id str

Return Type

GetSessionDetailsOkResponse

Example Usage Code Snippet

from devin import Devin

sdk = Devin(
    access_token="YOUR_ACCESS_TOKEN"
)

result = sdk.sessions.get_session_details(session_id="session_id")

print(result)