### GET /v1alpha/{name=sources/**} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/get_hl=es Gets a single source. Stay organized with collections. Save and categorize content based on your preferences. ```APIDOC ## GET /v1alpha/{name=sources/**} ### Description Gets a single source. Stay organized with collections. Save and categorize content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sources/**}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the source to retrieve. Format: sources/{source} It takes the form `sources/{+source}`. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **Source** (object) - If successful, the response body contains an instance of `Source`. ``` -------------------------------- ### Jules API Session Response Example Source: https://developers.google.com/jules/api/index_hl=es This is an example of the immediate response received after creating a new session. It includes the session's name, ID, title, source context, and the initial prompt. ```json { "name": "sessions/31415926535897932384", "id": "31415926535897932384", "title": "Boba App", "sourceContext": { "source": "sources/github/bobalover/boba", "githubRepoContext": { "startingBranch": "main" } }, "prompt": "Create a boba app!" } ``` -------------------------------- ### Example ListActivities Response Structure (JSON) Source: https://developers.google.com/jules/api/index_hl=ru This is an example of the JSON response structure when listing activities in a session. It includes details about each activity, such as its name, creation time, originator, and the plan or progress updates associated with it. ```json { "activities": [ { "name": "sessions/14550388554331055113/activities/02200cce44f746308651037e4a18caed", "createTime": "2025-10-03T05:43:42.801654Z", "originator": "agent", "planGenerated": { "plan": { "id": "5103d604240042cd9f59a4cb2355643a", "steps": [ { "id": "705a61fc8ec24a98abc9296a3956fb6b", "title": "Setup the environment. I will install the dependencies to run the app." }, { "id": "bb5276efad354794a4527e9ad7c0cd42", "title": "Modify `src/App.js`. I will replace the existing React boilerplate with a simple Boba-themed component. This will include a title and a list of boba options.", "index": 1 }, { "id": "377c9a1c91764dc794a618a06772e3d8", "title": "Modify `src/App.css`. I will update the CSS to provide a fresh, modern look for the Boba app.", "index": 2 }, { "id": "335802b585b449aeabb855c722cd9c40", "title": "Frontend Verification. I will use the `frontend_verification_instructions` tool to get instructions on how to write a Playwright script to verify the frontend application and generate a screenshot of the changes.", "index": 3 }, { "id": "3e4cc97c7b2448668d1ac75b8c7b7d69", "title": "Submit the changes. Once the app is looking good and verified, I will submit my work.", "index": 4 } ] } }, "id": "02200cce44f746308651037e4a18caed" }, { "name": "sessions/14550388554331055113/activities/2918fac8bc54450a9cbda423b7688413", "createTime": "2025-10-03T05:43:44.954030Z", "originator": "user", "planApproved": { "planId": "5103d604240042cd9f59a4cb2355643a" }, "id": "2918fac8bc54450a9cbda423b7688413" }, { "name": "sessions/14550388554331055113/activities/5b3acd1b3ca2439f9cbaefaccf7f709a", "createTime": "2025-10-03T05:44:16.700231Z", "originator": "agent", "progressUpdated": { "title": "Ran bash command", "description": "Command: \nnpm install\nOutput: added 1326 packages, and audited 1327 packages in 25s\n\n268 packages are looking for fundingExit Code: 0" }, "artifacts": [ { "bashOutput": { "command": "\nnpm install", "output": "added 1326 packages, and audited 1327 packages in 25s\n\n268 packages are looking for funding" } } ], "id": "5b3acd1b3ca2439f9cbaefaccf7f709a" }, { "name": "sessions/14550388554331055113/activities/1ad545d812614a5b84c23a33f6120063", "createTime": "2025-10-03T05:44:19.502115Z", "originator": "agent", "progressUpdated": { "title": "I have installed the dependencies using `npm install`." }, "artifacts": [ { "changeSet": { "source": "sources/github/bobalover/boba", "gitPatch": { "baseCommitId": "36ead0a4caefc451b9652ed926a15af9570f4f35" } } } ], "id": "1ad545d812614a5b84c23a33f6120063" }, { "name": "sessions/14550388554331055113/activities/3a2b46329f894ebea1faf6b8fb956428", "createTime": "2025-10-03T05:44:29.265425Z", "originator": "agent", "progressUpdated": { "title": "I have replaced the boilerplate in `src/App.js` with a Boba-themed component." }, "artifacts": [ { "changeSet": { "source": "sources/github/bobalover/boba", "gitPatch": { "unidiffPatch": "", "baseCommitId": "36ead0a4caefc451b9652ed926a15af9570f4f35" } } } ], "id": "3a2b46329f894ebea1faf6b8fb956428" }, { "name": "sessions/14550388554331055113/activities/4e8dd66f15e247e3ae5e48eeff89ef47", "createTime": "2025-10-03T05:44:37.721013Z", "originator": "agent", "progressUpdated": { "title": "I have updated the CSS in `src/App.css` to give the app a fresh, modern look." }, "artifacts": [ { "changeSet": { "source": "sources/github/bobalover/boba", "gitPatch": { "unidiffPatch": "", "baseCommitId": "36ead0a4caefc451b9652ed926a15af9570f4f35" } } } ], "id": "4e8dd66f15e247e3ae5e48eeff89ef47" } ] } ``` -------------------------------- ### GET /sources Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources_hl=es Lists all available sources. ```APIDOC ## GET /sources ### Description Lists sources. ### Method GET ### Endpoint `/sources` ``` -------------------------------- ### GET /v1alpha/{name=sessions/*/activities/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/get_hl=de Retrieves a single activity. Activities can be saved and categorized based on user preferences. ```APIDOC ## GET /v1alpha/{name=sessions/*/activities/*} ### Description Gets a single activity. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*/activities/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the activity to retrieve. Format: sessions/{session}/activities/{activity}. It takes the form `sessions/{session}/activities/{activities}`. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **Activity** (object) - An instance of the Activity resource. #### Response Example ```json { "example": "Activity object" } ``` ``` -------------------------------- ### GET /v1alpha/{name=sources/**} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/get_hl=fr Retrieves a single source by its resource name. This method allows you to fetch organized content based on your preferences. ```APIDOC ## GET /v1alpha/{name=sources/**} ### Description Gets a single source. Stay organized with collections. Save and categorize content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sources/**}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the source to retrieve. Format: sources/{source}. It takes the form `sources/{+source}`. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **Source** (object) - An instance of the Source object containing the source details. #### Response Example ```json { "example": "Source object details" } ``` ``` -------------------------------- ### GET /v1alpha/{name=sessions/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get_hl=ja Retrieves a single session resource. Sessions can be organized and categorized based on user preferences. ```APIDOC ## GET /v1alpha/{name=sessions/*} ### Description Gets a single session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the session to retrieve. Format: `sessions/{session}`. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **Session** (object) - An instance of the `Session` resource if successful. #### Response Example ```json { "example": "Session object structure" } ``` ``` -------------------------------- ### List Sessions using HTTP GET Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/list_hl=zh-cn This snippet demonstrates how to list sessions using an HTTP GET request to the Jules API. It includes the base URL and explains the purpose of query parameters like `pageSize` and `pageToken` for pagination and controlling the number of results. The response body structure is also detailed. ```HTTP GET https://jules.googleapis.com/v1alpha/sessions # Query Parameters: # pageSize: integer (Optional) - Number of sessions to return (1-100, defaults to 30). # pageToken: string (Optional) - Token for retrieving the next page of results. ``` -------------------------------- ### Resource: GitHubRepoContext Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions_hl=ko Context to use a GitHub repository in a session, including the starting branch. ```APIDOC ## Resource: GitHubRepoContext Context to use a GitHubRepo in a session. ### JSON Representation ```json { "startingBranch": string } ``` ### Fields * `startingBranch` (string) - Required. The name of the branch to start the session from. ``` -------------------------------- ### GET /v1alpha/{name=sessions/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get_hl=de Retrieves a single session resource based on its name. The session can be organized and categorized according to user preferences. ```APIDOC ## GET /v1alpha/{name=sessions/*} ### Description Gets a single session. Stay organized with collections. Save and categorize content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the session to retrieve. Format: sessions/{session}. It takes the form `sessions/{session}`. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **Session** (object) - If successful, the response body contains an instance of `Session`. ``` -------------------------------- ### GET /v1alpha/sources Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/list Lists sources, allowing for organization and categorization of content. Supports filtering, pagination, and custom page sizes. ```APIDOC ## GET /v1alpha/sources ### Description Lists sources, allowing for organization and categorization of content. Supports filtering, pagination, and custom page sizes. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sources` ### Query Parameters #### Query Parameters - **filter** (string) - Optional. The filter expression for listing sources, based on AIP-160. If not set, all sources will be returned. Currently only supports filtering by name, which can be used to filter by a single source or multiple sources separated by OR. Example filters: - 'name=sources/source1 OR name=sources/source2' - **pageSize** (integer) - Optional. The number of sources to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sources.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sources** (array) - The sources from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sources": [ { "name": "sources/exampleSource1" }, { "name": "sources/exampleSource2" } ], "nextPageToken": "CAEQ" } ``` ``` -------------------------------- ### GET /v1alpha/{name=sources/**} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/get Retrieves a single source. This method is part of the Jules API for organizing and categorizing content. ```APIDOC ## GET /v1alpha/{name=sources/**} ### Description Gets a single source. Stay organized with collections. Save and categorize content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sources/**}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the source to retrieve. Format: sources/{source}. It takes the form `sources/{+source}`. #### Query Parameters None #### Request Body The request body must be empty. ### Request Example (No request body for this GET request) ### Response #### Success Response (200) - **Source** (object) - An instance of the Source object containing details of the requested source. #### Response Example ```json { "name": "sources/example-source-id", "displayName": "Example Source Name", "description": "This is an example source." } ``` ``` -------------------------------- ### HTTP GET Request for Jules API activities.list Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/list This snippet demonstrates how to make an HTTP GET request to the Jules API to list activities for a session. It includes the base URL and the required parent path parameter. The URL uses gRPC Transcoding syntax. ```HTTP GET https://jules.googleapis.com/v1alpha/{parent=sessions/*}/activities ``` -------------------------------- ### GET /v1alpha/{name=sessions/*/activities/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/get_hl=es Retrieves a single activity by its resource name. This endpoint allows you to fetch specific activity details, which can be useful for organizing and managing content based on user preferences. ```APIDOC ## GET /v1alpha/{name=sessions/*/activities/*} ### Description Gets a single activity. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*/activities/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the activity to retrieve. Format: sessions/{session}/activities/{activity}. It takes the form `sessions/{session}/activities/{activities}`. #### Query Parameters None #### Request Body The request body must be empty. ### Request Example ```json { "example": "request body is empty" } ``` ### Response #### Success Response (200) - **Activity** (object) - An instance of the Activity resource containing the details of the requested activity. #### Response Example ```json { "example": "{\n \"name\": \"sessions/sessionId1/activities/activityId1\",\n \"displayName\": \"Example Activity\",\n \"description\": \"This is an example activity.\"\n}" } ``` ``` -------------------------------- ### GET /v1alpha/sources Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/list_hl=de Lists sources, allowing for organization and categorization of content based on user preferences. Supports filtering by name and pagination. ```APIDOC ## GET /v1alpha/sources ### Description Lists sources, allowing for organization and categorization of content based on user preferences. Supports filtering by name and pagination. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sources` ### Query Parameters #### Query Parameters - **filter** (string) - Optional. The filter expression for listing sources, based on AIP-160. If not set, all sources will be returned. Currently only supports filtering by name, which can be used to filter by a single source or multiple sources separated by OR. Example filters: - 'name=sources/source1 OR name=sources/source2' - **pageSize** (integer) - Optional. The number of sources to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sources.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sources** (array of Source objects) - The sources from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sources": [ { "name": "sources/source1", "displayName": "Example Source 1" }, { "name": "sources/source2", "displayName": "Example Source 2" } ], "nextPageToken": "somePageToken" } ``` ``` -------------------------------- ### List Activities for a Session (HTTP GET) Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/list_hl=pt-br This snippet demonstrates how to make an HTTP GET request to the Jules API to list activities for a specific session. It includes the base URL and required path parameters. The response body will contain a list of activities and a token for pagination. ```HTTP GET https://jules.googleapis.com/v1alpha/{parent=sessions/*}/activities --- Path parameters: `parent` (string, required): The parent session, which owns this collection of activities. Format: sessions/{session} Query parameters: `pageSize` (integer, optional): The number of activities to return. Must be between 1 and 100, inclusive. Defaults to 50. `pageToken` (string, optional): A page token, received from a previous `activities.list` call. --- Response body structure: { "activities": [ { // object (Activity) } ], "nextPageToken": string } ``` -------------------------------- ### GET /v1alpha/{name=sessions/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get_hl=id Retrieves a single session. Sessions can be saved and categorized based on user preferences for better organization. ```APIDOC ## GET /v1alpha/{name=sessions/*} ### Description Gets a single session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the session to retrieve. Format: sessions/{session}. It takes the form `sessions/{session}`. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **Session** (object) - If successful, the response body contains an instance of `Session`. ``` -------------------------------- ### GET /v1alpha/{name=sessions/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get Retrieves a single session based on its resource name. Sessions can be saved and categorized for organization. ```APIDOC ## GET /v1alpha/{name=sessions/*} ### Description Gets a single session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the session to retrieve. Format: `sessions/{session}`. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **Session** (object) - An instance of the Session resource. #### Response Example ```json { "example": "Session object structure" } ``` ``` -------------------------------- ### GET /v1alpha/{parent=sessions/*}/activities Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/list_hl=de Lists activities for a session. This endpoint allows you to retrieve a collection of activities associated with a specific session, with options for pagination and controlling the number of results. ```APIDOC ## GET /v1alpha/{parent=sessions/*}/activities ### Description Lists activities for a session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{parent=sessions/*}/activities` ### Parameters #### Path Parameters - **parent** (string) - Required - The parent session, which owns this collection of activities. Format: `sessions/{session}`. #### Query Parameters - **pageSize** (integer) - Optional - The number of activities to return. Must be between 1 and 100, inclusive. If unset, defaults to 50. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional - A page token, received from a previous `activities.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **activities** (array of objects) - The activities from the specified session. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "activities": [ { "object": "Activity" } ], "nextPageToken": "string" } ``` ``` -------------------------------- ### GET /v1alpha/{name=sessions/*/activities/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/get_hl=fr Retrieves a single activity based on its resource name. This endpoint allows you to fetch specific activity data within a session. ```APIDOC ## GET /v1alpha/{name=sessions/*/activities/*} ### Description Gets a single activity. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*/activities/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the activity to retrieve. Format: sessions/{session}/activities/{activity}. It takes the form `sessions/{session}/activities/{activities}`. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **Activity** (object) - An instance of the Activity resource containing the details of the requested activity. #### Response Example ```json { "example": "Activity object structure" } ``` ``` -------------------------------- ### GET /v1alpha/sources Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/list_hl=id Lists sources, allowing for filtering, pagination, and specifying the number of results per page. The request body must be empty. ```APIDOC ## GET /v1alpha/sources ### Description Lists sources, allowing for filtering, pagination, and specifying the number of results per page. The request body must be empty. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sources` ### Query Parameters - **filter** (string) - Optional. The filter expression for listing sources, based on AIP-160. If not set, all sources will be returned. Currently only supports filtering by name, which can be used to filter by a single source or multiple sources separated by OR. Example filters: - 'name=sources/source1 OR name=sources/source2' - **pageSize** (integer) - Optional. The number of sources to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sources.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sources** (array of Source objects) - The sources from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sources": [ { "object (Source)" } ], "nextPageToken": "string" } ``` ``` -------------------------------- ### GET /v1alpha/{parent=sessions/*}/activities Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/list Lists activities for a given session. You can control the number of activities returned and use pagination tokens for retrieving subsequent pages. ```APIDOC ## GET /v1alpha/{parent=sessions/*}/activities ### Description Lists activities for a session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{parent=sessions/*}/activities` ### Parameters #### Path Parameters - **parent** (string) - Required - The parent session, which owns this collection of activities. Format: `sessions/{session}`. #### Query Parameters - **pageSize** (integer) - Optional - The number of activities to return. Must be between 1 and 100, inclusive. If unset, defaults to 50. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional - A page token, received from a previous `activities.list` call. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **activities** (array) - The activities from the specified session. Each element is an object of type `Activity`. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "activities": [ { "object": "Activity" } ], "nextPageToken": "string" } ``` ``` -------------------------------- ### GET /v1alpha/sources Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/list_hl=fr Lists sources, allowing for organization and categorization of content. Supports filtering by name, pagination, and specifying the number of results per page. ```APIDOC ## GET /v1alpha/sources ### Description Lists sources, allowing for organization and categorization of content. Supports filtering by name, pagination, and specifying the number of results per page. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sources` ### Query Parameters #### Query Parameters - **filter** (string) - Optional. The filter expression for listing sources, based on AIP-160. If not set, all sources will be returned. Currently only supports filtering by name, which can be used to filter by a single source or multiple sources separated by OR. Example filters: - 'name=sources/source1 OR name=sources/source2' - **pageSize** (integer) - Optional. The number of sources to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sources.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sources** (array of objects) - The sources from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sources": [ { "name": "sources/exampleSource1", "displayName": "Example Source One" }, { "name": "sources/exampleSource2", "displayName": "Example Source Two" } ], "nextPageToken": "CAEQAg" } ``` ``` -------------------------------- ### Jules API Session Response with Pull Request Output Source: https://developers.google.com/jules/api/index_hl=es This example shows a session response after a pull request has been automatically created. It includes the pull request details such as its URL, title, and description within the 'outputs' field. ```json { "name": "sessions/31415926535897932384", "id": "31415926535897932384", "title": "Boba App", "sourceContext": { "source": "sources/github/bobalover/boba", "githubRepoContext": { "startingBranch": "main" } }, "prompt": "Create a boba app!", "outputs": [ { "pullRequest": { "url": "https://github.com/bobalover/boba/pull/35", "title": "Create a boba app", "description": "This change adds the initial implementation of a boba app." } } ] } ``` -------------------------------- ### Get a Single Session using HTTP GET Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get_hl=pt-br Retrieves a single session using an HTTP GET request. The request requires a session name as a path parameter. The request body must be empty, and a successful response returns a Session object. ```HTTP GET https://jules.googleapis.com/v1alpha/{name=sessions/*} ``` -------------------------------- ### List Available Sources using Curl Source: https://developers.google.com/jules/api/index_hl=ru This code snippet demonstrates how to list all available sources connected to Jules using a curl command. It requires your API key to be passed in the `X-Goog-Api-Key` header. The output is a JSON object containing a list of sources and a nextPageToken if applicable. ```curl curl 'https://jules.googleapis.com/v1alpha/sources' \ -H 'X-Goog-Api-Key: YOUR_API_KEY' ``` -------------------------------- ### Create New Session Source: https://developers.google.com/jules/api/index_hl=ko Creates a new session to generate code for a specified project. Requires a source name and optionally accepts an automation mode and title. ```APIDOC ## POST /v1alpha/sessions ### Description Creates a new session to generate code for a specified project. You'll need the source name from a previous step. This request tells Jules to create a boba app in the specified repository. ### Method POST ### Endpoint https://jules.googleapis.com/v1alpha/sessions ### Parameters #### Query Parameters None #### Request Body - **prompt** (string) - Required - The prompt to guide the code generation. - **sourceContext** (object) - Required - Context about the source repository. - **source** (string) - Required - The identifier for the source repository (e.g., "sources/github/bobalover/boba"). - **githubRepoContext** (object) - Optional - Context specific to GitHub repositories. - **startingBranch** (string) - Optional - The branch to start from. - **automationMode** (string) - Optional - Specifies the automation mode for the session (e.g., "AUTO_CREATE_PR"). Defaults to no automatic PR creation. - **title** (string) - Optional - A title for the session. - **requirePlanApproval** (boolean) - Optional - If true, requires explicit plan approval. Defaults to false. ### Request Example ```json { "prompt": "Create a boba app!", "sourceContext": { "source": "sources/github/bobalover/boba", "githubRepoContext": { "startingBranch": "main" } }, "automationMode": "AUTO_CREATE_PR", "title": "Boba App" } ``` ### Response #### Success Response (200) - **name** (string) - The unique identifier for the created session. - **id** (string) - The ID of the session. - **title** (string) - The title of the session. - **sourceContext** (object) - The source context used for the session. - **prompt** (string) - The prompt used for the session. - **outputs** (array) - An array of outputs, which may include pull request details if automation was enabled. - **pullRequest** (object) - Details about the created pull request. - **url** (string) - The URL of the pull request. - **title** (string) - The title of the pull request. - **description** (string) - The description of the pull request. #### Response Example ```json { "name": "sessions/31415926535897932384", "id": "31415926535897932384", "title": "Boba App", "sourceContext": { "source": "sources/github/bobalover/boba", "githubRepoContext": { "startingBranch": "main" } }, "prompt": "Create a boba app!", "outputs": [ { "pullRequest": { "url": "https://github.com/bobalover/boba/pull/35", "title": "Create a boba app", "description": "This change adds the initial implementation of a boba app." } } ] } ``` ``` -------------------------------- ### Retrieve a Single Activity using GET Request Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions.activities/get This snippet demonstrates how to retrieve a single activity from the Jules API using an HTTP GET request. It requires specifying the resource name of the activity in the URL. The request body must be empty, and a successful response will return an Activity object. ```HTTP GET https://jules.googleapis.com/v1alpha/{name=sessions/*/activities/*} ``` -------------------------------- ### POST /v1alpha/sessions Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/create_hl=ru Creates a new session. Sessions can be used to organize and categorize content based on user preferences. ```APIDOC ## POST /v1alpha/sessions ### Description Creates a new session. Sessions allow users to stay organized by saving and categorizing content based on their preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/sessions` ### Request Body The request body should contain an instance of the `Session` object. ```json { "name": "string", "description": "string" } ``` ### Response #### Success Response (200) If successful, the response body contains the newly created instance of the `Session` object. ```json { "name": "string", "description": "string" } ``` ``` -------------------------------- ### GET /sources/{source} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources_hl=es Retrieves a single source by its ID. ```APIDOC ## GET /sources/{source} ### Description Gets a single source. ### Method GET ### Endpoint `/sources/{source}` ### Parameters #### Path Parameters * `source` (string) - Required - The identifier of the source to retrieve. ``` -------------------------------- ### Sources List API Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sources/list_hl=pt-br Lists sources. Stay organized with collections. Save and categorize content based on your preferences. ```APIDOC ## GET /v1alpha/sources ### Description Lists sources. Allows users to retrieve a collection of sources, with options to filter and paginate the results. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sources` ### Query Parameters #### Query Parameters - **filter** (string) - Optional. The filter expression for listing sources, based on AIP-160. If not set, all sources will be returned. Currently only supports filtering by name, which can be used to filter by a single source or multiple sources separated by OR. Example filters: - 'name=sources/source1 OR name=sources/source2' - **pageSize** (integer) - Optional. The number of sources to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sources.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sources** (array of Source objects) - The sources from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sources": [ { "name": "sources/source1", "displayName": "Example Source 1" }, { "name": "sources/source2", "displayName": "Example Source 2" } ], "nextPageToken": "CAEQ" } ``` ``` -------------------------------- ### POST /v1alpha/{session=sessions/*}:approvePlan Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/approvePlan_hl=fr Approves a plan in a session. This endpoint is used to confirm and save content based on user preferences. ```APIDOC ## POST /v1alpha/{session=sessions/*}:approvePlan ### Description Approves a plan in a session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/{session=sessions/*}:approvePlan` ### Parameters #### Path Parameters - **session** (string) - Required - The resource name of the session to approve the plan in. Format: sessions/{session} #### Request Body The request body must be empty. ### Response #### Success Response (200) If successful, the response body is empty. ``` -------------------------------- ### POST /v1alpha/{session=sessions/*}:approvePlan Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/approvePlan_hl=pt-br Approves a plan in a session. This endpoint is used to confirm and save content categorization based on user preferences. ```APIDOC ## POST /v1alpha/{session=sessions/*}:approvePlan ### Description Approves a plan in a session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/{session=sessions/*}:approvePlan` ### Parameters #### Path Parameters - **session** (string) - Required - The resource name of the session to approve the plan in. Format: sessions/{session} #### Query Parameters None #### Request Body - The request body must be empty. ### Request Example (No request body) ### Response #### Success Response (200) - The response body is empty if the operation is successful. #### Response Example (Empty response body) ``` -------------------------------- ### POST /v1alpha/{session=sessions/*}:approvePlan Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/approvePlan_hl=es Approves a plan in a session. This endpoint is used to confirm and save content categorization based on user preferences. ```APIDOC ## POST /v1alpha/{session=sessions/*}:approvePlan ### Description Approves a plan in a session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/{session=sessions/*}:approvePlan` ### Parameters #### Path Parameters - **session** (string) - Required - The resource name of the session to approve the plan in. Format: `sessions/{session}`. #### Query Parameters None #### Request Body - The request body must be empty. ### Request Example (No request body) ### Response #### Success Response (200) - The response body is empty if the operation is successful. #### Response Example (Empty response body) ``` -------------------------------- ### POST /v1alpha/sessions Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/create Creates a new session using the Jules API. This endpoint allows users to organize and save content based on their preferences. ```APIDOC ## POST /v1alpha/sessions ### Description Creates a new session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/sessions` ### Request Body The request body should contain an instance of `Session`. ### Response #### Success Response (200) If successful, the response body contains a newly created instance of `Session`. ``` -------------------------------- ### POST /v1alpha/sessions Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/create_hl=es Creates a new session using the Jules API. This endpoint allows users to organize and save content based on their preferences. ```APIDOC ## POST /v1alpha/sessions ### Description Creates a new session. Stay organized with collections. Save and categorize content based on your preferences. ### Method POST ### Endpoint `https://jules.googleapis.com/v1alpha/sessions` ### Request Body The request body contains an instance of `Session`. ### Response #### Success Response (200) If successful, the response body contains a newly created instance of `Session`. ``` -------------------------------- ### GET /v1alpha/sessions Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/list_hl=es Lists all sessions available through the Jules API. Supports pagination using `pageSize` and `pageToken`. ```APIDOC ## GET /v1alpha/sessions ### Description Lists all sessions. Stay organized with collections. Save and categorize content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/sessions` ### Query Parameters #### Query Parameters - **pageSize** (integer) - Optional. The number of sessions to return. Must be between 1 and 100, inclusive. If unset, defaults to 30. If set to greater than 100, it will be coerced to 100. - **pageToken** (string) - Optional. A page token, received from a previous `sessions.list` call. ### Request Body The request body must be empty. ### Response #### Success Response (200) - **sessions** (array of Session objects) - The sessions from the specified request. - **nextPageToken** (string) - A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. #### Response Example ```json { "sessions": [ { "session_id": "string", "name": "string", "description": "string", "createdAt": "timestamp", "updatedAt": "timestamp" } ], "nextPageToken": "string" } ``` ``` -------------------------------- ### GET /v1alpha/{name=sessions/*} Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions/get_hl=fr Retrieves a single session based on its resource name. This endpoint allows users to fetch organized session data. ```APIDOC ## GET /v1alpha/{name=sessions/*} ### Description Gets a single session. Stay organized with collections by saving and categorizing content based on your preferences. ### Method GET ### Endpoint `https://jules.googleapis.com/v1alpha/{name=sessions/*}` ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the session to retrieve. Format: `sessions/{session}`. #### Request Body The request body must be empty. ### Response #### Success Response (200) - **Session** (object) - If successful, the response body contains an instance of `Session`. #### Response Example ```json { "example": "Session object" } ``` ``` -------------------------------- ### PlanStep Object Source: https://developers.google.com/jules/api/reference/rest/v1alpha/sessions Represents a single step within a plan. Includes an ID, title, description, and its index within the plan. ```APIDOC ## PlanStep Object ### Description A step in a plan. ### JSON Representation ```json { "id": "string", "title": "string", "description": "string", "index": "integer" } ``` ### Fields - **id** (string) - Output only. ID for this step; unique within a plan. - **title** (string) - Output only. The title of the step. - **description** (string) - Output only. The description of the step. - **index** (integer) - Output only. 0-based index into the plan.steps. ```