Skip to content

annosaurus 0.12.1

Compare
Choose a tag to compare
@hohonuuli hohonuuli released this 09 Nov 20:15
· 272 commits to master since this release

This release adds additional parameters to a query to constrain using missionContacts, missionId, and platformName. Some examples:

Search by platformName (e.g. ROV name) and a missionContact (e.g. A Chief Scientist)

In this query, we're searching for all annotations on dives by the ROV Doc Ricketts when Bruce Robison was the Chief Scientist. Because there's 1,019,079 annotations that match that query, we'll limit the number of returned annotations to 2 for this example.

Request

POST http://dsg.mbari.org/anno/v1/fast/
Content-Type: application/json

{
  "platformName": "Doc Ricketts",
  "missionContacts": ["Bruce Robison"],
  "limit": 2
}

Response

HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Tue, 09 Nov 2021 20:07:17 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: close
Access-Control-Allow-Origin: *
Content-Encoding: gzip

{
  "query_constraints": {
    "video_reference_uuids": [],
    "concepts": [],
    "observers": [],
    "groups": [],
    "activities": [],
    "limit": 2,
    "offset": 0,
    "data": false,
    "mission_contacts": [
      "Bruce Robison"
    ],
    "platform_name": "Doc Ricketts"
  },
  "content": [
    {
      "observation_uuid": "b8bec2c2-f755-4140-ff65-00000e76b81e",
      "concept": "Aegina",
      "observer": "mbassett",
      "observation_timestamp": "2021-03-17T20:39:30.920Z",
      "video_reference_uuid": "8e963a90-a7f0-49fc-8af6-1b0a23b2dd3a",
      "imaged_moment_uuid": "3fb36025-abe4-408a-a06c-18000e76b81e",
      "timecode": "09:56:04:27",
      "recorded_timestamp": "2013-11-12T00:42:59Z",
      "group": "ROV",
      "associations": [],
      "image_references": []
    },
    {
      "observation_uuid": "72c8cbba-4664-4296-a51f-0000285cb073",
      "concept": "Aegina",
      "observer": "svonthun",
      "observation_timestamp": "2014-02-10T20:09:00Z",
      "video_reference_uuid": "12948865-0f9e-4edc-8c88-db34746ea74e",
      "imaged_moment_uuid": "c6c36eb2-e833-4f9d-b4d4-60bd2c2ab5be",
      "timecode": "02:26:04:23",
      "recorded_timestamp": "2012-10-27T23:14:00Z",
      "group": "ROV",
      "associations": [],
      "image_references": []
    }
  ]
}

Search by missionId

A missionId is a unique id for the mission or deployment. (In VampireSquid, this is a deploymentId). In this query, we're searching for Ventana's 1234 dive.

Request

POST http://dsg.mbari.org/anno/v1/fast/
Content-Type: application/json

{
  "missionId": "Ventana 1234",
  "limit": "2"
}

Response

HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Tue, 09 Nov 2021 20:14:12 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: close
Access-Control-Allow-Origin: *
Content-Encoding: gzip

{
  "query_constraints": {
    "video_reference_uuids": [],
    "concepts": [],
    "observers": [],
    "groups": [],
    "activities": [],
    "limit": 2,
    "offset": 0,
    "data": false,
    "mission_contacts": [],
    "mission_id": "Ventana 1234"
  },
  "content": [
    {
      "observation_uuid": "fcbc98db-4ac0-4dd0-9ad8-014e5cc8811f",
      "concept": "Solmissus",
      "observer": "unknown",
      "observation_timestamp": "1970-01-01T00:00:00Z",
      "video_reference_uuid": "aefee7f8-53e1-4106-bcd0-e33f800e0bcb",
      "imaged_moment_uuid": "42ebf9cb-7d51-4262-9099-a926eea47a75",
      "timecode": "02:39:23:14",
      "recorded_timestamp": "1997-04-11T19:21:40Z",
      "group": "ROV",
      "associations": [
        {
          "link_name": "suspect-navigation-ctd-other-data",
          "link_value": "No CTD data",
          "to_concept": "self",
          "mime_type": "text/plain",
          "uuid": "389672bc-b023-4ca0-9c52-3d4211d9280d"
        }
      ],
      "image_references": []
    },
    {
      "observation_uuid": "06515cd5-21d4-445b-8958-02a165dc018f",
      "concept": "Nanomia bijuga",
      "observer": "unknown",
      "observation_timestamp": "1970-01-01T00:00:00Z",
      "video_reference_uuid": "aefee7f8-53e1-4106-bcd0-e33f800e0bcb",
      "imaged_moment_uuid": "545a814f-141b-4b1e-9a9e-18f386ec2389",
      "timecode": "02:39:16:12",
      "recorded_timestamp": "1997-04-11T19:21:31Z",
      "group": "ROV",
      "associations": [
        {
          "link_name": "suspect-navigation-ctd-other-data",
          "link_value": "No CTD data",
          "to_concept": "self",
          "mime_type": "text/plain",
          "uuid": "3932da8c-2358-4754-8a30-3301c0cc6346"
        }
      ],
      "image_references": []
    }
  ]
}