Gamma API

Search model elements

POST
/api/projects/{projectId}/models/metadata/search

Per model, the elements matching the conditions, read left to right, each with its family name and type: a search set's results, saved or not. No conditions match nothing. Each model is read at its newest converted version; models with none are listed in notConverted instead of failing the request. 409 when the organization's storage the files are in is disconnected.

Who may call it: Anyone on the project whose permission profile allows model.read. API keys: yes, given model.read for this project.

Authorization

cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

Request Body

application/json
  1. body
modelIds*array<>
Items1 <= items <= 50
conditions*array<>

None matches nothing.

Itemsitems <= 50
limit?integer

At most this many elements back, across the models in order; each model's count is still every match.

Range0 < value <= 100000

Response Body

OK.

application/json
  1. response
models*array<>
notConverted*array<string>

The models asked for that have no converted version, and were not read.

Example Request
curl -X POST 'http://localhost:3000/api/projects/string/models/metadata/search' \  -H 'Content-Type: application/json' \  -d '{  "modelIds": [    "string"  ],  "conditions": [    {      "category": "string",      "name": "string",      "operator": "equals"    }  ]}'
Example Response
{  "models": [    {      "modelId": "string",      "versionId": "string",      "version": -9007199254740991,      "count": -9007199254740991,      "objects": [        {          "objectId": "string",          "modelObjectId": -9007199254740991,          "name": "string",          "category": "string",          "storeyId": -9007199254740991,          "storey": "string",          "relevantStoreyIds": "string",          "phaseCreated": "string",          "phaseDemolished": "string",          "material": "string",          "originalId": "string",          "originalCategory": "string",          "originalStorey": "string",          "apsId": "string",          "revitId": "string",          "centerX": 0,          "centerY": 0,          "centerZ": 0,          "familyName": "string",          "familyType": "string"        }      ]    }  ],  "notConverted": [    "string"  ]}