Chilkat Online Tools

Swift3 / Cognite API v1 / List entity matching models

Back to Collection Items

func chilkatTest() {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    let http = CkoHttp()!
    var success: Bool

    let queryParams = CkoJsonObject()!
    queryParams.updateInt("limit", value: 100)

    http.setRequestHeader("api-key", value: "{{api-key}}")

    var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://domain.com/api/v1/projects/{{project}}/context/entitymatching", json: queryParams)
    if http.lastMethodSuccess == false {
        print("\(http.lastErrorText!)")
        return
    }

    print("\(resp!.statusCode.intValue)")
    print("\(resp!.bodyStr!)")
    resp = nil

}

Curl Command

curl -G -d "limit=100"
	-H "api-key: {{api-key}}"
https://domain.com/api/v1/projects/{{project}}/context/entitymatching

Postman Collection Item JSON

{
  "id": "entityMatchingModels",
  "name": "List entity matching models",
  "request": {
    "url": {
      "host": "{{baseUrl}}",
      "path": [
        "api",
        "v1",
        "projects",
        "{{project}}",
        "context",
        "entitymatching"
      ],
      "query": [
        {
          "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
        }
      ],
      "variable": [
      ]
    },
    "method": "GET",
    "header": [
      {
        "key": "api-key",
        "value": "{{api-key}}",
        "description": "An admin can create API keys in the Cognite console."
      }
    ],
    "description": "List all available entity matching models."
  }
}