Get resources
curl --request GET \
--url https://api.yume.cloud/v1/crm/metrics/workshops/resources/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yume.cloud/v1/crm/metrics/workshops/resources/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yume.cloud/v1/crm/metrics/workshops/resources/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yume.cloud/v1/crm/metrics/workshops/resources/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yume.cloud/v1/crm/metrics/workshops/resources/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yume.cloud/v1/crm/metrics/workshops/resources/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/crm/metrics/workshops/resources/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"inventory": {
"id": 123,
"name": "<string>",
"subleases": [
{
"id": 123,
"inventory": 123,
"user": 123,
"percent": "<string>",
"is_current": true,
"created_at": "2023-11-07T05:31:56Z",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
}
],
"group": 123,
"unique_id": "<string>",
"category": 123,
"image": "<string>",
"extra": "<unknown>",
"state": 123,
"disabled": 0,
"rental_point": 123
},
"inventory_group": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted": true,
"name": "<string>",
"category": 123,
"unit_price": "<string>",
"unit_count": "<string>",
"unit_type": "litre",
"unit_sum": "<string>",
"image": "<string>",
"unique_id": "<string>",
"barcode": "<string>",
"extra": "<unknown>",
"filters": [
"<string>"
],
"points": [
-1
],
"published": true,
"type": 0,
"price": "<string>",
"lifetime": -1
},
"resource": {
"id": 123,
"name": "<string>",
"type": 0,
"price": "<string>",
"count": "<string>",
"count_left": "<string>"
},
"inventory_group_count": "<string>",
"price": "<string>",
"tarif": 123,
"extra": "<unknown>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}workshops
Get resources
GET
/
v1
/
crm
/
metrics
/
workshops
/
resources
/
Get resources
curl --request GET \
--url https://api.yume.cloud/v1/crm/metrics/workshops/resources/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yume.cloud/v1/crm/metrics/workshops/resources/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yume.cloud/v1/crm/metrics/workshops/resources/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yume.cloud/v1/crm/metrics/workshops/resources/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yume.cloud/v1/crm/metrics/workshops/resources/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yume.cloud/v1/crm/metrics/workshops/resources/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/crm/metrics/workshops/resources/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 123,
"results": [
{
"id": 123,
"inventory": {
"id": 123,
"name": "<string>",
"subleases": [
{
"id": 123,
"inventory": 123,
"user": 123,
"percent": "<string>",
"is_current": true,
"created_at": "2023-11-07T05:31:56Z",
"start_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z"
}
],
"group": 123,
"unique_id": "<string>",
"category": 123,
"image": "<string>",
"extra": "<unknown>",
"state": 123,
"disabled": 0,
"rental_point": 123
},
"inventory_group": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted": true,
"name": "<string>",
"category": 123,
"unit_price": "<string>",
"unit_count": "<string>",
"unit_type": "litre",
"unit_sum": "<string>",
"image": "<string>",
"unique_id": "<string>",
"barcode": "<string>",
"extra": "<unknown>",
"filters": [
"<string>"
],
"points": [
-1
],
"published": true,
"type": 0,
"price": "<string>",
"lifetime": -1
},
"resource": {
"id": 123,
"name": "<string>",
"type": 0,
"price": "<string>",
"count": "<string>",
"count_left": "<string>"
},
"inventory_group_count": "<string>",
"price": "<string>",
"tarif": 123,
"extra": "<unknown>"
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}Авторизации
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Заголовки
Компания, в контексте которой выполняется запрос — её id из GET /v1/tenant/. Пользователь должен состоять в этой компании: чужой id доступа к данным не даёт. Без заголовка компания определяется по домену запроса.
Параметры запроса
Which field to use when ordering the results.
A page number within the paginated result set.
Number of results to return per page.
A search term.
0- Новый1- В работе2- Завершено3- Архив
Доступные опции:
0, 1, 2, 3 0- Внутренняя1- Внешняя
Доступные опции:
0, 1