For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • Overview
    • Errors
  • SDK
    • Overview
    • Decorators
    • Run Evaluation
  • API
      • POSTLog to a Prompt
      • PATCHUpdate Prompt Log
      • STREAMCall Prompt
      • GETList Prompts
      • POSTUpsert Prompt
      • GETGet Prompt
      • DELDelete Prompt
      • PATCHMove Prompt
      • POSTPopulate Prompt template
      • GETList Versions of a Prompt
      • DELDelete Prompt Version
      • PATCHUpdate Prompt Version
      • POSTDeploy Prompt
      • DELRemove Deployment
      • GETList a Prompt's Environments
      • POSTUpdate Monitoring
      • GETSerialize
      • POSTDeserialize
LogoLogo
Sign inBook a demo
APIPrompts

List a Prompt's Environments

GET
https://api.humanloop.com/v5/prompts/:id/environments
GET
/v5/prompts/:id/environments
$curl https://api.humanloop.com/v5/prompts/pr_30gco7dx6JDq4200GVOHa/environments \
> -H "X-API-KEY: <apiKey>"
1[
2 {
3 "id": "pr_30gco7dx6JDq4200GVOHa",
4 "created_at": "2024-05-01T12:00:00Z",
5 "name": "production",
6 "tag": "default",
7 "file": {
8 "path": "Personal Projects/Coding Assistant",
9 "id": "pr_30gco7dx6JDq4200GVOHa",
10 "name": "Coding Assistant",
11 "version_id": "prv_7ZlQREDScH0xkhUwtXruN",
12 "type": "prompt",
13 "environments": [
14 {
15 "id": "env_ffSVxEBzJcBZ1H5jcNMVj",
16 "created_at": "2023-06-27T23:16:07.992339",
17 "name": "development",
18 "tag": "default"
19 }
20 ],
21 "created_at": "2024-07-08T22:40:35.656915",
22 "updated_at": "2024-07-08T22:40:35.656915",
23 "created_by": {
24 "id": "usr_01RJO1k2spBVqNUt1ASef",
25 "email_address": "raza@humanloop.com",
26 "full_name": "Raza Habib"
27 },
28 "last_used_at": "2024-07-08T22:40:35.656915",
29 "model": "gpt-4o",
30 "endpoint": "chat",
31 "template": [
32 {
33 "content": "You are a helpful coding assistant specialising in {{language}}",
34 "role": "system"
35 }
36 ],
37 "provider": "openai",
38 "max_tokens": -1,
39 "temperature": 0.7,
40 "version_name": "coding-assistant-v1",
41 "version_description": "Initial version",
42 "version_logs_count": 0,
43 "total_logs_count": 0,
44 "inputs": [
45 {
46 "name": "messages"
47 }
48 ],
49 "evaluator_aggregates": null
50 }
51 }
52]
List all Environments and their deployed versions for the Prompt.
Was this page helpful?
Previous

Update Monitoring

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequired
Unique identifier for Prompt.

Response

Successful Response
idstring
created_atdatetime
namestring
tagenum
An enumeration.
Allowed values:
fileobject
The version of the File that is deployed to the Environment, if one is deployed.

Errors

422
List Environments Prompts ID Environments Get Request Unprocessable Entity Error