GET Resources
Endpoint
GET
https://api.spacely.ai/api/v1/resource
This endpoint is used to fetch the resource list preset color, material, style residential, style commercial and ai model.
{
"data": {
"color": [
{
"id": "set_1",
"label": "",
"hex": ["#8c6140", "#b98d6b", "#362e2c", "#c3b869", "#676165"]
},
.........
],
"material": {
"wallpaper": [
{
"id": "paper_wallpaper",
"label": "Paper wallpaper"
},
.........
],
"metal": [
{
"id": "aluminum",
"label": "Aluminum"
},
.........
]
},
"styleResidential": [
{
"label": "Modern",
"id": "modern",
"preset": {
"bathroom": "https://storage.googleapis.com/spacely/public/image/roomstyle3/bathroom-modern.jpg",
"bed_and_living_room": "https://storage.googleapis.com/spacely/public/image/roomstyle3/bed_and_living_room-modern.jpg",
"bedroom": "https://storage.googleapis.com/spacely/public/image/roomstyle3/bedroom-modern.jpg",
"dining_and_kitchen": "https://storage.googleapis.com/spacely/public/image/roomstyle3/dining_and_kitchen-modern.jpg",
"dining_room": "https://storage.googleapis.com/spacely/public/image/roomstyle3/dining_room-modern.jpg",
"kitchen": "https://storage.googleapis.com/spacely/public/image/roomstyle3/kitchen-modern.jpg",
"living_and_dining_room": "https://storage.googleapis.com/spacely/public/image/roomstyle3/living_and_dining_room-modern.jpg",
"living_room": "https://storage.googleapis.com/spacely/public/image/roomstyle3/living_room-modern.jpg",
"working_room": "https://storage.googleapis.com/spacely/public/image/roomstyle3/working_room-modern.jpg"
},
"colors": [
"set_1",
"set_2",
"set_3",
"set_4",
"set_5",
"set_6",
"set_7"
],
"isTrending": true,
"isNew": false
},
.........
],
"styleCommercial": [
{
"label": "Modern",
"id": "modern",
"preset": {
"barber_shop": "https://storage.googleapis.com/spacely/public/image/commercial-room-style/barbershop-modern.png",
"cafe": "https://storage.googleapis.com/spacely/public/image/commercial-room-style/cafe-modern.png",
"office": "https://storage.googleapis.com/spacely/public/image/commercial-room-style/office-modern.png",
"spa": "https://storage.googleapis.com/spacely/public/image/commercial-room-style/spa-modern.png"
},
"colors": [
"set_1",
"set_2",
"set_3",
"set_4",
"set_5",
"set_6",
"set_7"
],
"isTrending": true,
"isNew": false
},
.........
],
"model": [
{
"id": "spacely-v1",
"name": "Spacely V1"
},
{
"id": "spacely-unfurnished-space",
"name": "Spacely Unfurnished Space"
},
{
"id": "spacely-style-transfer",
"name": "Spacely Style Transfer"
}
]
}
}
Example
curl --location 'https://api.spacely.ai/api/v1/resource'
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.spacely.ai/api/v1/resource", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.spacely.ai/api/v1/resource',
headers: { }
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacely.ai/api/v1/resource"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
url = "https://api.spacely.ai/api/v1/resource"
payload = {}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Last updated