GET
/
functions
/
{function_id}
/
revisions
/
{revision_id}
import requests

url = "https://api.opper.ai/v2/functions/{function_id}/revisions/{revision_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.request("GET", url, headers=headers)

print(response.text)
{
  "name": "my-function",
  "description": "This function is used to add two numbers and return the result.",
  "instructions": "You are a calculator that adds two numbers and returns the result.",
  "input_schema": {
    "properties": {
      "x": {
        "title": "X",
        "type": "integer"
      },
      "y": {
        "title": "Y",
        "type": "integer"
      }
    },
    "required": [
      "x",
      "y"
    ],
    "title": "OpperInputExample",
    "type": "object"
  },
  "output_schema": {
    "properties": {
      "sum": {
        "title": "Sum",
        "type": "integer"
      }
    },
    "required": [
      "sum"
    ],
    "title": "OpperOutputExample",
    "type": "object"
  },
  "model": {
    "extra_headers": {},
    "name": "openai/gpt-4o-mini",
    "options": {
      "temperature": 0.5
    }
  },
  "configuration": {
    "beta.evaluation.enabled": true,
    "invocation.cache.ttl": 0,
    "invocation.few_shot.count": 0,
    "invocation.structured_generation.max_attempts": 5
  },
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "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.

Path Parameters

function_id
string
required

The id of the function to retrieve

revision_id
string
required

The id of the revision to retrieve

Response

200
application/json

Successful Response

The response is of type object.