API Methods

GET Method

GET method requests data from a specified resource without altering the state of the resource or causing any side effects.

GET Method

Deployment Details

GET Deployment Details

Code Samples for using the API

CURL

// Some code
curl -X GET https://GETMethod.zerve.cloud/output
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Python

// Some code
import requests
url = "https://GETMethod.zerve.cloud/output" 
api_token = "YOUR_API_TOKEN" # Replace with your actual API token
headers = { "Accept": "application/json", "Authorization": f"Bearer {api_token}" }
response = requests.get(url, headers=headers)
if response.status_code == 200:
    print(response.json())
else:
    print(f"Error: {response.status_code}, {response.text}")

Postman

GET in Postman

POST Method

POST Method

Deployment Details

GET Deployment Details

Code Samples for using the API

CURL

// Some code
curl -X GET https://ModelAPI.zerve.cloud/classifier
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Python

// Some code
import requests

url = 'https://ModelAPI.zerve.cloud/classifier'
data = {
    "payload" : {
    "realSum": [194.033698], 
    "room_shared": [false], 
    "room_private": [true],
    "person_capacity": [2.0]
    }
    }
response = requests.post(url, json=data)
if response.status_code == 200:
    print(response.json())
else:
    print(f"Error: {response.status_code}, {response.text}")

Postman

POST in Postman

API Method Responses

Status
Meaning
Description

200

OK

The request was successful, and the server is returning the requested data.

204

No Content

The server successfully processed the request but is not returning any content in the response body.

400

Bad Request

The server could not understand the request. This is usually due to malformed syntax, missing required parameters, or invalid data.

401

Unauthorized

The request requires user authentication.

403

Forbidden

The server understood the request, but the server refuses to authorize it.

404

Not Found

The requested resource could not be found on the server.

500

Internal Server Error

A generic error message indicating that an unexpected condition was encountered on the server (misconfiguration).

502

Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed.

Last updated