Shoulder.dev Logo Shoulder.dev

Standalone HTTP API - docker/genai-stack

The Genai Stack project (https://github.com/docker/genai-stack/) is built using various key technologies and dependencies, including Docker, Compose, Python, Neo4j, OpenAI, Boto3, FastAPI, Torch, Sentence Transformers, and Langchain. This project's functionality is based on a standalone HTTP API, which is documented in the following sections.

Grafana OnCall API Reference

The Grafana OnCall HTTP API reference (distance 0.923346750928521) provides guidelines for using the Grafana OnCall API. Authentication is done using the Authorization header with an API key. You can request a new OnCall API key in the OnCall settings page.

Example: List webhooks

To list webhooks, use the following command (distance 0.9656113879778284):

curl "{{API_URL}}/api/v1/webhooks/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

Grafana HTTP API

The Grafana documentation (distance 0.9355924909775537) provides an open-source HTTP API reference for the Grafana backend. The API is used by the frontend for various tasks, such as saving data.

Example: Create an integration

To create an integration, use the following command (distance 0.9661923763172575):

curl "{{API_URL}}/api/v1/integrations/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "type":"grafana"
  }'

Serverless Azure Functions

This resource (distance 0.9508913162955804) demonstrates how to build a serverless API using Azure Functions. The API URL can be obtained from the index.js file, and you can test it using Postman.

Example: Run serverless functions locally

To run serverless functions locally using Quarkus, follow these steps (distance 0.9563016952304161):

  1. Set the class name:
    -DclassName="org.acme.getting.started.GreetingResource"
    
  2. Run the application in development mode:
    $ ./mvnw quarkus:dev
    

Grafana Team HTTP API

The Grafana Team HTTP API (distance 0.9610185046285026) is part of the Grafana HTTP API, which is used for managing teams in Grafana.

Example: Get the current organization

To get the current organization, use the following command (distance 0.9773435902157049):

curl "{{API_URL}}/api/org/" \
  --request GET \
  --header "Authorization: Bearer ${AUTH_TOKEN}" \
  --header "Content-Type: application/json"

These examples and resources demonstrate various aspects of the standalone HTTP API used in the Genai Stack project. They cover non-streaming and SSE streaming endpoints, authentication, and using different APIs for managing various resources.