@@ -1275,24 +1275,20 @@ In all cases, you initialize the SDK the same way as usual, and then call `raw_r
12751275``` python
12761276from openfga_sdk import ClientConfiguration, OpenFgaClient
12771277
1278- # Initialize the client, same as above
12791278configuration = ClientConfiguration(
12801279 api_url = FGA_API_URL ,
12811280 store_id = FGA_STORE_ID ,
12821281)
12831282
12841283async with OpenFgaClient(configuration) as fga_client:
1285- # Custom new endpoint that doesn't exist in the SDK yet
12861284 request_body = {
12871285 " user" : " user:bob" ,
12881286 " action" : " custom_action" ,
12891287 " resource" : " resource:123" ,
12901288 }
12911289
1292- # Make the request
1293- # Note: operation_name is required for telemetry/logging
12941290 response = await fga_client.raw_request(
1295- operation_name = " CustomEndpoint" , # Required: descriptive name for the operation
1291+ operation_name = " CustomEndpoint" ,
12961292 method = " POST" ,
12971293 path = " /stores/{store_id} /custom-endpoint" ,
12981294 path_params = {" store_id" : FGA_STORE_ID },
@@ -1348,7 +1344,6 @@ if result:
13481344 if " allowed" in result:
13491345 print (f " Allowed: { result[' allowed' ]} " )
13501346
1351- # You can still access raw response metadata:
13521347print (f " Status Code: { response.status} " )
13531348print (f " Headers: { response.headers} " )
13541349```
@@ -1395,7 +1390,6 @@ response = await fga_client.raw_request(
13951390 path_params = {
13961391 " model_id" : " your-model-id" ,
13971392 },
1398- # store_id will be automatically taken from configuration
13991393)
14001394```
14011395
0 commit comments