opencost.postman_collection.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. {
  2. "info": {
  3. "_postman_id": "bba454a2-641d-4481-9ccd-0395a6054a20",
  4. "name": "opencost",
  5. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  6. },
  7. "item": [
  8. {
  9. "name": "namespace costs/day",
  10. "request": {
  11. "method": "GET",
  12. "header": [],
  13. "url": {
  14. "raw": "{{host}}/allocation/compute?aggregate=namespace&window=1d&accumulate=false&step=1d",
  15. "host": [
  16. "{{host}}"
  17. ],
  18. "path": [
  19. "allocation",
  20. "compute"
  21. ],
  22. "query": [
  23. {
  24. "key": "aggregate",
  25. "value": "namespace"
  26. },
  27. {
  28. "key": "window",
  29. "value": "1d"
  30. },
  31. {
  32. "key": "accumulate",
  33. "value": "false"
  34. },
  35. {
  36. "key": "step",
  37. "value": "1d"
  38. }
  39. ]
  40. }
  41. },
  42. "response": []
  43. },
  44. {
  45. "name": "cluster total",
  46. "request": {
  47. "method": "GET",
  48. "header": [],
  49. "url": {
  50. "raw": "{{host}}/allocation/compute?aggregate=cluster&window=lastweek",
  51. "host": [
  52. "{{host}}"
  53. ],
  54. "path": [
  55. "allocation",
  56. "compute"
  57. ],
  58. "query": [
  59. {
  60. "key": "aggregate",
  61. "value": "cluster"
  62. },
  63. {
  64. "key": "window",
  65. "value": "lastweek"
  66. }
  67. ]
  68. }
  69. },
  70. "response": []
  71. },
  72. {
  73. "name": "namespace totals",
  74. "request": {
  75. "method": "GET",
  76. "header": [],
  77. "url": {
  78. "raw": "{{host}}/allocation/compute?aggregate=namespace&window=7d",
  79. "host": [
  80. "{{host}}"
  81. ],
  82. "path": [
  83. "allocation",
  84. "compute"
  85. ],
  86. "query": [
  87. {
  88. "key": "aggregate",
  89. "value": "namespace"
  90. },
  91. {
  92. "key": "window",
  93. "value": "7d"
  94. }
  95. ]
  96. }
  97. },
  98. "response": []
  99. },
  100. {
  101. "name": "pod totals",
  102. "request": {
  103. "method": "GET",
  104. "header": [],
  105. "url": {
  106. "raw": "{{host}}/allocation/compute?aggregate=pod&window=7d",
  107. "host": [
  108. "{{host}}"
  109. ],
  110. "path": [
  111. "allocation",
  112. "compute"
  113. ],
  114. "query": [
  115. {
  116. "key": "aggregate",
  117. "value": "pod"
  118. },
  119. {
  120. "key": "window",
  121. "value": "7d"
  122. }
  123. ]
  124. }
  125. },
  126. "response": []
  127. },
  128. {
  129. "name": "inference costs total by model (requires INFERENCE_COST_ENABLED=true)",
  130. "request": {
  131. "method": "GET",
  132. "header": [],
  133. "url": {
  134. "raw": "{{host}}/inferenceCost/total?window=7d&aggregate=model_name&costBasis=allocation",
  135. "host": [
  136. "{{host}}"
  137. ],
  138. "path": [
  139. "inferenceCost",
  140. "total"
  141. ],
  142. "query": [
  143. {
  144. "key": "window",
  145. "value": "7d"
  146. },
  147. {
  148. "key": "aggregate",
  149. "value": "model_name"
  150. },
  151. {
  152. "key": "costBasis",
  153. "value": "allocation"
  154. }
  155. ]
  156. }
  157. },
  158. "response": []
  159. },
  160. {
  161. "name": "inference costs daily timeseries by model (requires INFERENCE_COST_ENABLED=true)",
  162. "request": {
  163. "method": "GET",
  164. "header": [],
  165. "url": {
  166. "raw": "{{host}}/inferenceCost/timeseries?window=7d&accumulate=day&aggregate=model_name&costBasis=allocation",
  167. "host": [
  168. "{{host}}"
  169. ],
  170. "path": [
  171. "inferenceCost",
  172. "timeseries"
  173. ],
  174. "query": [
  175. {
  176. "key": "window",
  177. "value": "7d"
  178. },
  179. {
  180. "key": "accumulate",
  181. "value": "day"
  182. },
  183. {
  184. "key": "aggregate",
  185. "value": "model_name"
  186. },
  187. {
  188. "key": "costBasis",
  189. "value": "allocation"
  190. }
  191. ]
  192. }
  193. },
  194. "response": []
  195. }
  196. ],
  197. "event": [
  198. {
  199. "listen": "prerequest",
  200. "script": {
  201. "type": "text/javascript",
  202. "exec": [
  203. ""
  204. ]
  205. }
  206. },
  207. {
  208. "listen": "test",
  209. "script": {
  210. "type": "text/javascript",
  211. "exec": [
  212. ""
  213. ]
  214. }
  215. }
  216. ],
  217. "variable": [
  218. {
  219. "key": "host",
  220. "value": "http://localhost:9003",
  221. "type": "default"
  222. }
  223. ]
  224. }