Skip to main content
GET
/
v2
/
deployments
/
{deployment_id}
/
revisions
/
{revision_id}
Get Revision
curl --request GET \
  --url https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}
import requests

url = "https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v2/deployments/{deployment_id}/revisions/{revision_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "source_revision_config": {
    "repo_ref": "<string>",
    "langgraph_config_path": "<string>",
    "image_uri": "<string>",
    "source_tarball_path": "<string>",
    "repo_commit_sha": "<string>"
  }
}
{
  "detail": "Deployment ID {deployment_id} not found."
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Path Parameters

deployment_id
string<uuid>
required
revision_id
string<uuid>
required

Response

Successful Response

Revision resource.

id
string<uuid>
required

The ID of the revision.

This is a read-only field.

created_at
string<date-time>
required

The creation time of the revision.

This is a read-only field.

updated_at
string<date-time>
required

The last update time of the revision.

This is a read-only field.

status
enum<string>
required

The status of the revision.

This is a read-only field.

Available options:
CREATING,
QUEUED,
AWAITING_BUILD,
BUILDING,
AWAITING_DEPLOY,
DEPLOYING,
CREATE_FAILED,
BUILD_FAILED,
DEPLOY_FAILED,
DEPLOYED,
SKIPPED,
INTERRUPTED,
UNKNOWN
source
enum<string>
required

Deploy from a GitHub repository (github), an external Docker image (external_docker), a CLI-pushed image (internal_docker), uploaded source (internal_source), or a prebuilt LangChain template (internal_template).

Deploying from GitHub, internal Docker, internal source, or a template is only available for Cloud SaaS deployments. Deploying from an external Docker image is only available for self-hosted deployments. This cannot be changed once the deployment is created.

Available options:
github,
external_docker,
internal_docker,
internal_source,
internal_template
source_revision_config
SourceRevisionConfig · object
required

Source revision configuration.

For a Deployment resource, the field values refer to the latest revision of the Deployment. For a Revision resource, the field values refer to the Revision itself.