curl --request GET \
--url https://api.promptlayer.com/workflows \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.promptlayer.com/workflows"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.promptlayer.com/workflows', 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.promptlayer.com/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.promptlayer.com/workflows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.promptlayer.com/workflows")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"workspace_id": 123,
"name": "<string>",
"is_deleted": true,
"release_labels": [
"<string>"
],
"user_id": 123,
"latest_version_number": 123,
"external_ids": [
{
"source": "<string>",
"external_id": "<string>"
}
]
}
],
"page": 123,
"per_page": 123,
"pages": 123,
"has_next": true,
"has_prev": true,
"total": 123,
"next_num": 123,
"prev_num": 123
}{
"success": false,
"message": "Invalid pagination parameters"
}{
"success": false,
"message": "Invalid API key"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List Workflows
curl --request GET \
--url https://api.promptlayer.com/workflows \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.promptlayer.com/workflows"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.promptlayer.com/workflows', 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.promptlayer.com/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.promptlayer.com/workflows"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.promptlayer.com/workflows")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptlayer.com/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"workspace_id": 123,
"name": "<string>",
"is_deleted": true,
"release_labels": [
"<string>"
],
"user_id": 123,
"latest_version_number": 123,
"external_ids": [
{
"source": "<string>",
"external_id": "<string>"
}
]
}
],
"page": 123,
"per_page": 123,
"pages": 123,
"has_next": true,
"has_prev": true,
"total": 123,
"next_num": 123,
"prev_num": 123
}{
"success": false,
"message": "Invalid pagination parameters"
}{
"success": false,
"message": "Invalid API key"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Query Parameters
Page number for pagination.
x >= 1Number of items per page.
1 <= x <= 100Filter by the creator's email address.
Filter resources created at or after this timestamp.
Filter resources created at or before this timestamp.
Filter resources updated at or after this timestamp.
Filter resources updated at or before this timestamp.
External ID source to filter by. Must be provided with external_id.
External ID value to filter by. Must be provided with external_source.
Sort field.
created_at, updated_at, name, id Sort direction.
asc, desc Response
List of workflows retrieved successfully
Show child attributes
Show child attributes
Current page number
Number of items per page
Total number of pages
Whether there is a next page
Whether there is a previous page
Total number of items
Next page number if available
Previous page number if available
Was this page helpful?

