Skip to main content
PUT
/
v3
/
functions
/
{name}
Update function
import requests

url = "https://api.opper.ai/v3/functions/{name}"

payload = { "source": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "generated_at": "2023-11-07T05:31:56Z",
  "hit_count": 123,
  "input_schema": {},
  "name": "<string>",
  "output_schema": {},
  "schema_hash": "<string>",
  "source": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Path Parameters

name
string
required

Function name

Body

application/json
source
string
required

Response

Successful response

generated_at
string<date-time>
required
hit_count
integer
required
input_schema
object
required
name
string
required
output_schema
object
required
schema_hash
string
required
source
string
required