GET
/
functions
from opperai import Opper

opper = Opper(http_bearer="YOUR_API_KEY")

# List all functions with pagination
functions = opper.functions.list(offset=0, limit=20, sort="name")

print(f"Total functions: {functions.meta.total_count}")
print(f"Showing {len(functions.data)} functions:")

for func in functions.data:
    print(f"- {func.name} (ID: {func.id})")
    if func.description:
        print(f"  Description: {func.description}")
    print(f"  Model: {func.model}")
    print(f"  Revision: {func.revision_id}")
    print("---")
{
  "meta": {
    "total_count": 1
  },
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "my-function",
      "description": "<string>",
      "instructions": "<string>",
      "model": [
        "openai/gpt-4o",
        "openai/gpt-4o-mini"
      ],
      "revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

name
string | null

Filter functions by name

Examples:

"my-function"

"my-namespace.my-sub-function"

"my-namespace/my-sub-function"

sort
string | null
default:name

Sort the functions by name or created_at, use '-' to sort in descending order

Examples:

"name"

"-name"

"created"

"-created"

offset
integer | null
default:0

The offset of the page of functions to return when paginating

Required range: x >= 0
limit
integer | null
default:20

The number of functions to return per page when paginating

Required range: 1 <= x <= 100

Response

200
application/json

Successful Response

The response is of type object.