Todas los ordenes.
GET https://api.appsat.net/v1/Ordenes/ | GET https://api.appsat.net/v1/Ordenes/?upd=2020-09-27 13:00:00 | GET https://api.appsat.net/v1/Ordenes/?page=1&rowsPerPage=500
curl "https://api.appsat.net/v1/Ordenes/" \
-H "accept: */*" \
-H "key: " \
-H "Content-Type: application/json"
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function(e) {
var response = e.target.responseText;
console.log(response);
});
xhr.addEventListener('error', function(e) {
console.error('Request errored with status', e.target.status);
});
xhr.open('GET', 'https://api.appsat.net/v1/Ordenes/');
xhr.setRequestHeader('accept','*/*');
xhr.setRequestHeader('key','');
xhr.setRequestHeader('Content-Type','application/json');
xhr.send();
import requests
url = 'https://api.appsat.net/v1/Ordenes/'
headers = {'accept': '*/*','key': '','Content-Type': 'application/json'}
req = requests.get(url, headers=headers)
print(req.status_code)
print(req.headers)
print(req.text)
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "https://api.appsat.net/v1/Ordenes/");
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
/* if redirected, tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: */*");
headers = curl_slist_append(headers, "key: value");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
if (res != CURLE_OK) {
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
}
/* Clean up after yourself */
curl_easy_cleanup(curl);
return 0;
}
/* See: http://stackoverflow.com/a/2329792/1127848 of how to read data from the response. */
URL url = new URL("https://api.appsat.net/v1/Ordenes/");
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("accept", "*/*");
con.setRequestProperty("key", "value");
con.setRequestProperty("Content-Type", "application/json");
int status = con.getResponseCode();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer content = new StringBuffer();
while((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
con.disconnect();
System.out.println("Response status: " + status);
System.out.println(content.toString());
[{
"orden_id": 191,
"orden_estado_id": 5,
"empresa_id": 1,
"sucursal_id": 1,
"cliente_id": 5751,
"cliente_direccion_id": 6240,
"usuario_id": 1,
"forma_de_pago_id": 1,
"orden_creado_por_usuario_id": 1,
"orden_numero": "OT000001",
"orden_start_date": "2019-08-19 12:30:00",
"orden_end_date": "2019-08-19 14:30:00",
"orden_text": "Prindo S.L.",
"orden_descripcion_averia": "Se ha roto el grifo de una caldera de la marca Vaillant y hay que cambiarlo ya que no pueden llenar el circuito y el cliente esta sin calefacción.",
"orden_descripcion_trabajo": "Texto de ejemplo del trabajo realizado por el trabajador",
"orden_observaciones": "",
"orden_garantia": "0",
"orden_guardia": "0",
"orden_facturado": "1",
"orden_recibe_firma": "Pedro Rodríguez Font",
"orden_recibe_dni": "40300000P",
"orden_fecha_add": "2019-06-20 19:29:24",
"orden_fecha_upd": "2020-01-28 09:51:01",
"orden_delete": 0,
"orden_autorizacion_numero": "5555555555",
"proyecto_id": 0,
"presupuesto_id": 0,
"orden_tipo_id": 0,
"contrato_id": 0,
"orden_custom_id": "",
"ordenes_articulos": [],
"ordenes_articulos_stock": [],
"ordenes_checklist": [],
"ordenes_equipos": [],
"ordenes_fotos": [],
"ordenes_operarios": []
}]