GET /api/v1/workflows/{workflow_id}
cURL
curl --request GET \
--url '/api/v1/workflows/{workflow_id}' \
--header 'Authorization: Bearer <token>'JavaScript
const response = await fetch('/api/v1/workflows/{workflow_id}', {
method: 'GET',
headers: {
"Authorization": "Bearer <token>"
}
});
const data = await response.json();Python
import requests
response = requests.request(
"GET",
"/api/v1/workflows/{workflow_id}",
headers={
"Authorization": "Bearer <token>"
},
)
print(response.json())PHP
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', '/api/v1/workflows/{workflow_id}', [
'headers' => [
'Authorization' => 'Bearer <token>',
],
]);
echo $response->getBody();Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "/api/v1/workflows/{workflow_id}", nil)
req.Header.Add("Authorization", "Bearer <token>")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}Ruby
require "net/http"
uri = URI("/api/v1/workflows/{workflow_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer <token>"
response = http.request(request)
puts response.bodyJava
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("/api/v1/workflows/{workflow_id}"))
.header("Authorization", "Bearer <token>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Authorization
A bearer token in the Authorization header.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
workflow_id | string | Yes |
Responses
200 · The published workflow.
| Name | Type | Required | Description |
|---|---|---|---|
data | Workflow | Yes | |
data.id | string | Yes | |
data.object | string | Yes | |
data.name | string | Yes | |
data.slug | string or null | No | |
data.description | string or null | No | |
data.status | string | Yes | |
data.published_version | object | Yes | |
data.published_version.number | integer | Yes | |
data.published_version.published_at | string (date-time) or null (date-time) | Yes | |
data.input | object | Yes | |
data.input.schema | object | Yes | |
data.input.example | object or null | Yes | |
data.created_at | string (date-time) or null (date-time) | Yes | |
data.updated_at | string (date-time) or null (date-time) | Yes | |
request_id | string | Yes |
{
"data": {
"id": "string",
"object": "workflow",
"name": "string",
"slug": "string",
"description": "string",
"status": "published",
"published_version": {
"number": 0,
"published_at": "2024-01-01T00:00:00Z"
},
"input": {
"schema": {},
"example": {}
},
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
},
"request_id": "string"
}401 · The Bearer token is missing, malformed, expired, or revoked.
| Name | Type | Required | Description |
|---|---|---|---|
error | object | Yes | |
error.code | string | Yes | |
error.message | string | Yes | |
error.details | object | No | |
request_id | string | Yes |
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"request_id": "string"
}403 · The token lacks the required ability.
| Name | Type | Required | Description |
|---|---|---|---|
error | object | Yes | |
error.code | string | Yes | |
error.message | string | Yes | |
error.details | object | No | |
request_id | string | Yes |
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"request_id": "string"
}404 · The resource was not found in the token workspace.
| Name | Type | Required | Description |
|---|---|---|---|
error | object | Yes | |
error.code | string | Yes | |
error.message | string | Yes | |
error.details | object | No | |
request_id | string | Yes |
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"request_id": "string"
}429 · A per-token rate limit was exceeded.
| Name | Type | Required | Description |
|---|---|---|---|
error | object | Yes | |
error.code | string | Yes | |
error.message | string | Yes | |
error.details | object | No | |
request_id | string | Yes |
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"request_id": "string"
}503 · The site administrator has disabled the Workspace API.
| Name | Type | Required | Description |
|---|---|---|---|
error | object | Yes | |
error.code | string | Yes | |
error.message | string | Yes | |
error.details | object | No | |
request_id | string | Yes |
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"request_id": "string"
}