A haere i ni'a i te ihirangi
stayclean
Faatereraa i te mau faataaraa
API docsMau hape

Mau aratairaa tumu

Mau hape

Faatere i te mau tapa‘o HTTP, haapapuraa e otia aniraa.

A hi‘o noa i te tapa‘o HTTP. A faatano i te mau faufaa hape hou a tamata faahou ai, e hi‘o i te mau tapa‘o e tiaraa ia hape te haapapuraa. A faatura i te mau otia o te araraa tata‘itahi. Eiaha e tapiti noa i te ohipa papa‘iraa ia ore e papu te pahonoraa: a hi‘o na mua e ua manuïa anei, ia ore e tapiti i te aniraa.

Hi‘oraa aniraa

cURL

curl --request 'GET' 'https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc' \
  --header 'Authorization: Basic YOUR_API_TOKEN' \
  --header 'Accept: application/json'

JavaScript

const response = await fetch("https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc", {
    "method": "GET",
    "headers": {
        "Authorization": "Basic YOUR_API_TOKEN",
        "Accept": "application/json"
    }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();

PHP

<?php
$curl = curl_init('https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => array (
  0 => 'Authorization: Basic YOUR_API_TOKEN',
  1 => 'Accept: application/json',
),
]);
$response = curl_exec($curl);
if ($response === false) throw new RuntimeException(curl_error($curl));
curl_close($curl);
$data = json_decode($response, true, 512, JSON_THROW_ON_ERROR);

PYTHON

import json
from urllib.request import Request, urlopen

headers = {
    "Authorization": "Basic YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = None
request = Request("https://api.stayclean.io/api/v1/interventions?page=1&limit=25&sort=desc", data=data, headers=headers, method="GET")
with urlopen(request) as response:
    result = json.load(response)
Hi‘o i te mau faataaraa