Back to Collection Items
#include <CkHttp.h>
#include <CkJsonObject.h>
#include <CkHttpResponse.h>
void ChilkatSample(void)
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http;
bool success;
CkJsonObject queryParams;
queryParams.UpdateInt("limit",100);
http.SetRequestHeader("api-key","{{api-key}}");
CkHttpResponse *resp = http.QuickRequestParams("GET","https://domain.com/api/v1/projects/{{project}}/3d/models",queryParams);
if (http.get_LastMethodSuccess() == false) {
std::cout << http.lastErrorText() << "\r\n";
return;
}
std::cout << resp->get_StatusCode() << "\r\n";
std::cout << resp->bodyStr() << "\r\n";
delete resp;
}
Curl Command
curl -G -d "limit=100"
-H "api-key: {{api-key}}"
https://domain.com/api/v1/projects/{{project}}/3d/models
Postman Collection Item JSON
{
"id": "get3DModels",
"name": "List 3D models",
"request": {
"url": {
"host": "{{baseUrl}}",
"path": [
"api",
"v1",
"projects",
"{{project}}",
"3d",
"models"
],
"query": [
{
"key": "cursor",
"description": "Cursor for paging through results.",
"disabled": true
},
{
"key": "limit",
"description": "Limits the number of results to be returned. The maximum results returned by the server is 1000 even if you specify a higher limit.",
"value": "100",
"disabled": true
},
{
"key": "published",
"description": "Filter based on whether or not it has published revisions.",
"disabled": true
}
],
"variable": [
]
},
"method": "GET",
"header": [
{
"key": "api-key",
"value": "{{api-key}}",
"description": "An admin can create API keys in the Cognite console."
}
],
"description": "Retrieves a list of all models in a project. This operation supports pagination. You can filter out all models without a published revision."
}
}