Sessions

Open a session and mint a data-plane grant

Changed on

Loads the project, holds it open, and returns the credential for reaching it directly.

A project unloads shortly after nothing is connected to it, so a session is what keeps it resident between your requests. Poll the session (getSession) to both refresh the grant and signal that you are still working.

The grant can never exceed the key that minted it. Omit scopes to inherit the key's own scopes; supply them to narrow the grant further, which is worth doing when one job needs less than the key can do.

post/api/v2/projects/{projectId}/sessions

Request

  • Base URL
    https://davinci-app.com
  • Auth
    HTTP bearer

Request body

branchstring nullable

Branch to open. Defaults to the branch in a compound project id, or main.

scopesstring[]

Narrow the grant below the key's own scopes. Omit to inherit them. Asking for a scope the key does not hold is refused rather than silently reduced.

ttlSecondsinteger

Grant lifetime. Capped at one hour regardless of what is requested.

Response

The session, with the grant needed to reach the data plane.

sessionIdstring uuid required
projectIdstring required

Bare project id, without the branch suffix.

branchNamestring required
ownerIdstring required

Account or organization that owns the project. Files live under the owner's storage namespace, not the caller's, which is why a shared or org-owned project needs this rather than your own user id.

Changes

    • info

      added the optional property / to the response with the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status