Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 2.15 KB

SessionsService.md

File metadata and controls

78 lines (51 loc) · 2.15 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
createSession Create a new Devin session to start working on a task.
getSessionDetails Retrieve details about an existing session, including its status and any structured output.

createSession

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

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

Parameters

Name Type Required Description
body CreateSessionRequest The request body.

Return Type

CreateSessionOkResponse

Example Usage Code Snippet

import { CreateSessionRequest, Devin } from 'devin';

(async () => {
  const devin = new Devin({
    token: 'YOUR_TOKEN',
  });

  const createSessionRequest: CreateSessionRequest = {
    prompt: 'prompt',
  };

  const { data } = await devin.sessions.createSession(createSessionRequest);

  console.log(data);
})();

getSessionDetails

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
sessionId string

Return Type

GetSessionDetailsOkResponse

Example Usage Code Snippet

import { Devin } from 'devin';

(async () => {
  const devin = new Devin({
    token: 'YOUR_TOKEN',
  });

  const { data } = await devin.sessions.getSessionDetails('session_id');

  console.log(data);
})();