Create an Equipment
curl --request POST \
--url https://api.siit.io/v1/equipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "<string>",
"holder": "<string>",
"office_location": "<string>",
"collection_date": "2023-12-25",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": true,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"vendor_name": "<string>"
}
'import requests
url = "https://api.siit.io/v1/equipments"
payload = {
"category": "<string>",
"holder": "<string>",
"office_location": "<string>",
"collection_date": "2023-12-25",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": True,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"vendor_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category: '<string>',
holder: '<string>',
office_location: '<string>',
collection_date: '2023-12-25',
depreciation_rate: 123,
equipment_issue_date: '2023-12-25',
firmware_version: '<string>',
guarantee_date: '2023-12-25',
ip_address: '<string>',
keyboard_layout: '<string>',
last_contact_date: '2023-12-25',
last_enrollment_date: '2023-12-25',
last_maintenance_date: '2023-12-25',
last_report_date: '2023-12-25',
leasing_buyout_option: true,
leasing_company: '<string>',
leasing_company_contact: '<string>',
leasing_contract_id: '<string>',
leasing_end_date: '2023-12-25',
leasing_monthly_cost: 123,
leasing_start_date: '2023-12-25',
lifecycle: 'in_service',
mac_address: '<string>',
model: '<string>',
name: '<string>',
notes: '<string>',
os_name: '<string>',
processor_type: '<string>',
purchase_cost: 123,
purchase_date: '2023-12-25',
purchase_number: '<string>',
serial_number: '<string>',
storage_capacity_mb: 123,
total_ram_mb: 123,
vendor_name: '<string>'
})
};
fetch('https://api.siit.io/v1/equipments', 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.siit.io/v1/equipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category' => '<string>',
'holder' => '<string>',
'office_location' => '<string>',
'collection_date' => '2023-12-25',
'depreciation_rate' => 123,
'equipment_issue_date' => '2023-12-25',
'firmware_version' => '<string>',
'guarantee_date' => '2023-12-25',
'ip_address' => '<string>',
'keyboard_layout' => '<string>',
'last_contact_date' => '2023-12-25',
'last_enrollment_date' => '2023-12-25',
'last_maintenance_date' => '2023-12-25',
'last_report_date' => '2023-12-25',
'leasing_buyout_option' => true,
'leasing_company' => '<string>',
'leasing_company_contact' => '<string>',
'leasing_contract_id' => '<string>',
'leasing_end_date' => '2023-12-25',
'leasing_monthly_cost' => 123,
'leasing_start_date' => '2023-12-25',
'lifecycle' => 'in_service',
'mac_address' => '<string>',
'model' => '<string>',
'name' => '<string>',
'notes' => '<string>',
'os_name' => '<string>',
'processor_type' => '<string>',
'purchase_cost' => 123,
'purchase_date' => '2023-12-25',
'purchase_number' => '<string>',
'serial_number' => '<string>',
'storage_capacity_mb' => 123,
'total_ram_mb' => 123,
'vendor_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siit.io/v1/equipments"
payload := strings.NewReader("{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.siit.io/v1/equipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/equipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"admin_permalink_url": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"added_by": "<string>",
"category": "<string>",
"category_uid": "<string>",
"collection_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"external_id": "<string>",
"external_url": "<string>",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"holder": "<string>",
"holder_uid": "<string>",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": true,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"office_location": "<string>",
"office_location_uid": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"source": "siit",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"updated_at": "2023-11-07T05:31:56Z",
"vendor_name": "<string>"
}
}Usage
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for creating or updating an Equipment. Pass UIDs (not objects) for relationship fields.
Category of this equipment. Defaults to "Other device". Pass the UID of the related object.
The user who holds this equipment. Pass the UID of the related object.
Office Location of this equipment. Pass the UID of the related object.
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
date formatted as ISO 8601 (e.g. "2020-12-15")
active, expired broken, in_order, in_service, lost, maintenance, outdated, reserved, sold, spare, stolen date formatted as ISO 8601 (e.g. "2020-12-15")
hdd, nvme, other, ssd Response
Equipment created
Show child attributes
Show child attributes
curl --request POST \
--url https://api.siit.io/v1/equipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "<string>",
"holder": "<string>",
"office_location": "<string>",
"collection_date": "2023-12-25",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": true,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"vendor_name": "<string>"
}
'import requests
url = "https://api.siit.io/v1/equipments"
payload = {
"category": "<string>",
"holder": "<string>",
"office_location": "<string>",
"collection_date": "2023-12-25",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": True,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"vendor_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category: '<string>',
holder: '<string>',
office_location: '<string>',
collection_date: '2023-12-25',
depreciation_rate: 123,
equipment_issue_date: '2023-12-25',
firmware_version: '<string>',
guarantee_date: '2023-12-25',
ip_address: '<string>',
keyboard_layout: '<string>',
last_contact_date: '2023-12-25',
last_enrollment_date: '2023-12-25',
last_maintenance_date: '2023-12-25',
last_report_date: '2023-12-25',
leasing_buyout_option: true,
leasing_company: '<string>',
leasing_company_contact: '<string>',
leasing_contract_id: '<string>',
leasing_end_date: '2023-12-25',
leasing_monthly_cost: 123,
leasing_start_date: '2023-12-25',
lifecycle: 'in_service',
mac_address: '<string>',
model: '<string>',
name: '<string>',
notes: '<string>',
os_name: '<string>',
processor_type: '<string>',
purchase_cost: 123,
purchase_date: '2023-12-25',
purchase_number: '<string>',
serial_number: '<string>',
storage_capacity_mb: 123,
total_ram_mb: 123,
vendor_name: '<string>'
})
};
fetch('https://api.siit.io/v1/equipments', 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.siit.io/v1/equipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category' => '<string>',
'holder' => '<string>',
'office_location' => '<string>',
'collection_date' => '2023-12-25',
'depreciation_rate' => 123,
'equipment_issue_date' => '2023-12-25',
'firmware_version' => '<string>',
'guarantee_date' => '2023-12-25',
'ip_address' => '<string>',
'keyboard_layout' => '<string>',
'last_contact_date' => '2023-12-25',
'last_enrollment_date' => '2023-12-25',
'last_maintenance_date' => '2023-12-25',
'last_report_date' => '2023-12-25',
'leasing_buyout_option' => true,
'leasing_company' => '<string>',
'leasing_company_contact' => '<string>',
'leasing_contract_id' => '<string>',
'leasing_end_date' => '2023-12-25',
'leasing_monthly_cost' => 123,
'leasing_start_date' => '2023-12-25',
'lifecycle' => 'in_service',
'mac_address' => '<string>',
'model' => '<string>',
'name' => '<string>',
'notes' => '<string>',
'os_name' => '<string>',
'processor_type' => '<string>',
'purchase_cost' => 123,
'purchase_date' => '2023-12-25',
'purchase_number' => '<string>',
'serial_number' => '<string>',
'storage_capacity_mb' => 123,
'total_ram_mb' => 123,
'vendor_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.siit.io/v1/equipments"
payload := strings.NewReader("{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.siit.io/v1/equipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/equipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category\": \"<string>\",\n \"holder\": \"<string>\",\n \"office_location\": \"<string>\",\n \"collection_date\": \"2023-12-25\",\n \"depreciation_rate\": 123,\n \"equipment_issue_date\": \"2023-12-25\",\n \"firmware_version\": \"<string>\",\n \"guarantee_date\": \"2023-12-25\",\n \"ip_address\": \"<string>\",\n \"keyboard_layout\": \"<string>\",\n \"last_contact_date\": \"2023-12-25\",\n \"last_enrollment_date\": \"2023-12-25\",\n \"last_maintenance_date\": \"2023-12-25\",\n \"last_report_date\": \"2023-12-25\",\n \"leasing_buyout_option\": true,\n \"leasing_company\": \"<string>\",\n \"leasing_company_contact\": \"<string>\",\n \"leasing_contract_id\": \"<string>\",\n \"leasing_end_date\": \"2023-12-25\",\n \"leasing_monthly_cost\": 123,\n \"leasing_start_date\": \"2023-12-25\",\n \"lifecycle\": \"in_service\",\n \"mac_address\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"os_name\": \"<string>\",\n \"processor_type\": \"<string>\",\n \"purchase_cost\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"purchase_number\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"storage_capacity_mb\": 123,\n \"total_ram_mb\": 123,\n \"vendor_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"admin_permalink_url": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"added_by": "<string>",
"category": "<string>",
"category_uid": "<string>",
"collection_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"depreciation_rate": 123,
"equipment_issue_date": "2023-12-25",
"external_id": "<string>",
"external_url": "<string>",
"firmware_version": "<string>",
"guarantee_date": "2023-12-25",
"holder": "<string>",
"holder_uid": "<string>",
"ip_address": "<string>",
"keyboard_layout": "<string>",
"last_contact_date": "2023-12-25",
"last_enrollment_date": "2023-12-25",
"last_maintenance_date": "2023-12-25",
"last_report_date": "2023-12-25",
"leasing_buyout_option": true,
"leasing_company": "<string>",
"leasing_company_contact": "<string>",
"leasing_contract_id": "<string>",
"leasing_end_date": "2023-12-25",
"leasing_monthly_cost": 123,
"leasing_start_date": "2023-12-25",
"lifecycle": "in_service",
"mac_address": "<string>",
"model": "<string>",
"name": "<string>",
"notes": "<string>",
"office_location": "<string>",
"office_location_uid": "<string>",
"os_name": "<string>",
"processor_type": "<string>",
"purchase_cost": 123,
"purchase_date": "2023-12-25",
"purchase_number": "<string>",
"serial_number": "<string>",
"source": "siit",
"storage_capacity_mb": 123,
"total_ram_mb": 123,
"updated_at": "2023-11-07T05:31:56Z",
"vendor_name": "<string>"
}
}
