Leases

Create leases and send manifest

Changed on

Creates the leases, then sends each provider its manifest. If a provider refuses the manifest once its lease exists, the error carries code manifest_not_delivered and the status the provider path produced. Send the same request again to retry the manifest, or close the deployment to stop paying for it. If the provider found the manifest itself invalid, the error carries code provider_manifest_invalid with status 422 instead, and sending it again cannot help.

post/v1/leases

Request

  • Base URL
    https://console-api-sandbox.akash.network
  • URL
    https://console-api-sandbox.akash.network/v1/leases
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Query parameters

async'true' | 'false'

With true, the leases are created and the manifest sent in the background: the request answers 202 with an activityId to follow at GET /v1/activities/{id} once every check that could refuse it has passed. A second request by the same user for the same leases while they are still being created answers with the same activity, and any other request for that deployment meanwhile answers 409. It answers 200 as without it when background leases are unavailable, when the leases span more than one deployment, or when the manifest can only come from the request.

Headers

x-organization-idstring

Id or slug of the organization the request runs in. Defaults to the organization used last, or the caller's personal one. Answers 403 organization_forbidden when the caller is not a member, and 400 organization_mismatch when it names another organization than the API key's.

x-project-idstring uuid

Id of a project of the active organization to limit the request to. Answers 403 project_forbidden when the caller cannot reach the project, or the API key is limited to another one.

Request body

manifeststring

The manifest to send to the provider, in YAML format (deprecated)

Response

Leases created and manifest sent

Changes

    • info

      added the non-success response with the status

    • breaking

      the request property's minItems was increased to 1

    • info

      added the new optional query request parameter async

    • info

      added the success response with the status