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 inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
      • POSTAdd AI models to the restricted list
      • POSTCreate a prompt snippet
      • POSTCreate agent optimization
      • POSTCreate agent optimization result
      • POSTCreate AI Config variation
      • POSTCreate an AI model config
      • POSTCreate an AI tool
      • POSTCreate new agent graph
      • POSTCreate new AI Config
      • DELDelete a prompt snippet
      • DELDelete agent graph
      • DELDelete AI Config
      • DELDelete AI Config variation
      • DELDelete AI tool
      • DELDelete an agent optimization
      • DELDelete an AI model config
      • GETGet a prompt snippet
      • GETGet agent graph
      • GETGet AI Config
      • GETGet AI Config metrics
      • GETGet AI Config metrics by variation
      • GETGet AI Config quick stats
      • GETGet AI Config variation
      • GETGet AI model config
      • GETGet AI tool
      • GETGet an agent optimization
      • GETList agent graphs
      • GETList agent optimization results for a run
      • GETList agent optimization runs
      • GETList agent optimization runs
      • GETList agent optimizations
      • GETList AI Configs
      • GETList AI model configs
      • GETList AI tool references
      • GETList AI tool versions
      • GETList AI tools
      • GETList all agent optimization results across versions
      • GETList prompt snippet references
      • GETList prompt snippet versions
      • GETList prompt snippets
      • DELRemove AI models from the restricted list
      • GETShow an AI Config's targeting
      • PATCHUpdate a prompt snippet
      • PATCHUpdate agent graph
      • PATCHUpdate AI Config
      • PATCHUpdate AI Config targeting
      • PATCHUpdate AI Config variation
      • PATCHUpdate AI tool
      • PATCHUpdate an agent optimization
      • PATCHUpdate an agent optimization result
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewAI Configs

List prompt snippets

GET
/api/v2/projects/:projectKey/ai-configs/prompt-snippets
GET
/api/v2/projects/:projectKey/ai-configs/prompt-snippets
$curl https://app.launchdarkly.com/api/v2/projects/projectKey/ai-configs/prompt-snippets \
> -H "Authorization: <apiKey>"
1{
2 "items": [
3 {
4 "key": "key",
5 "name": "name",
6 "text": "text",
7 "tags": [
8 "tags",
9 "tags"
10 ],
11 "version": 0,
12 "createdAt": 6,
13 "_access": {
14 "denied": [
15 {
16 "action": "action",
17 "reason": {
18 "effect": "allow",
19 "resources": [
20 "proj/*:env/*;qa_*:/flag/*"
21 ],
22 "notResources": [
23 "notResources",
24 "notResources"
25 ],
26 "actions": [
27 "*"
28 ],
29 "notActions": [
30 "string",
31 "string"
32 ],
33 "role_name": "role_name"
34 }
35 },
36 {
37 "action": "action",
38 "reason": {
39 "effect": "allow",
40 "resources": [
41 "proj/*:env/*;qa_*:/flag/*"
42 ],
43 "notResources": [
44 "notResources",
45 "notResources"
46 ],
47 "actions": [
48 "*"
49 ],
50 "notActions": [
51 "string",
52 "string"
53 ],
54 "role_name": "role_name"
55 }
56 }
57 ],
58 "allowed": [
59 {
60 "action": "action",
61 "reason": {
62 "effect": "allow",
63 "resources": [
64 "proj/*:env/*;qa_*:/flag/*"
65 ],
66 "notResources": [
67 "notResources",
68 "notResources"
69 ],
70 "actions": [
71 "*"
72 ],
73 "notActions": [
74 "string",
75 "string"
76 ],
77 "role_name": "role_name"
78 }
79 },
80 {
81 "action": "action",
82 "reason": {
83 "effect": "allow",
84 "resources": [
85 "proj/*:env/*;qa_*:/flag/*"
86 ],
87 "notResources": [
88 "notResources",
89 "notResources"
90 ],
91 "actions": [
92 "*"
93 ],
94 "notActions": [
95 "string",
96 "string"
97 ],
98 "role_name": "role_name"
99 }
100 }
101 ]
102 },
103 "_links": {
104 "self": {
105 "href": "href",
106 "type": "type"
107 },
108 "parent": {
109 "href": "href",
110 "type": "type"
111 }
112 },
113 "_maintainer": {
114 "_id": "string",
115 "email": "string",
116 "role": "string",
117 "kind": "kind"
118 },
119 "description": "description"
120 },
121 {
122 "key": "key",
123 "name": "name",
124 "text": "text",
125 "tags": [
126 "tags",
127 "tags"
128 ],
129 "version": 0,
130 "createdAt": 6,
131 "_access": {
132 "denied": [
133 {
134 "action": "action",
135 "reason": {
136 "effect": "allow",
137 "resources": [
138 "proj/*:env/*;qa_*:/flag/*"
139 ],
140 "notResources": [
141 "notResources",
142 "notResources"
143 ],
144 "actions": [
145 "*"
146 ],
147 "notActions": [
148 "string",
149 "string"
150 ],
151 "role_name": "role_name"
152 }
153 },
154 {
155 "action": "action",
156 "reason": {
157 "effect": "allow",
158 "resources": [
159 "proj/*:env/*;qa_*:/flag/*"
160 ],
161 "notResources": [
162 "notResources",
163 "notResources"
164 ],
165 "actions": [
166 "*"
167 ],
168 "notActions": [
169 "string",
170 "string"
171 ],
172 "role_name": "role_name"
173 }
174 }
175 ],
176 "allowed": [
177 {
178 "action": "action",
179 "reason": {
180 "effect": "allow",
181 "resources": [
182 "proj/*:env/*;qa_*:/flag/*"
183 ],
184 "notResources": [
185 "notResources",
186 "notResources"
187 ],
188 "actions": [
189 "*"
190 ],
191 "notActions": [
192 "string",
193 "string"
194 ],
195 "role_name": "role_name"
196 }
197 },
198 {
199 "action": "action",
200 "reason": {
201 "effect": "allow",
202 "resources": [
203 "proj/*:env/*;qa_*:/flag/*"
204 ],
205 "notResources": [
206 "notResources",
207 "notResources"
208 ],
209 "actions": [
210 "*"
211 ],
212 "notActions": [
213 "string",
214 "string"
215 ],
216 "role_name": "role_name"
217 }
218 }
219 ]
220 },
221 "_links": {
222 "self": {
223 "href": "href",
224 "type": "type"
225 },
226 "parent": {
227 "href": "href",
228 "type": "type"
229 }
230 },
231 "_maintainer": {
232 "_id": "string",
233 "email": "string",
234 "role": "string",
235 "kind": "kind"
236 },
237 "description": "description"
238 }
239 ],
240 "totalCount": 1,
241 "_links": {
242 "self": {
243 "href": "href",
244 "type": "type"
245 },
246 "first": {
247 "href": "href",
248 "type": "type"
249 },
250 "last": {
251 "href": "href",
252 "type": "type"
253 },
254 "next": {
255 "href": "href",
256 "type": "type"
257 },
258 "prev": {
259 "href": "href",
260 "type": "type"
261 }
262 }
263}
Get a list of all prompt snippets in the given project.
Was this page helpful?
Previous

Remove AI models from the restricted list

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired

Query parameters

limitintegerOptional
The number of resources to return.
offsetintegerOptional

Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.

filterstringOptional
A filter to apply to the list.

Response

Prompt snippets list
itemslist of objects
totalCountinteger
_linksobject

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error