// Create tonic/ArunaAPI request to create a new object groupletcreate_request=CreateObjectGroupRequest{name: "Rust-API-Test-ObjectGroup".to_string(),description: "This object group was created with the gRPC Rust API client.".to_string(),collection_id: "<collection-id>".to_string(),object_ids: vec!["<object-id-001>".to_string(),"<object-id-002>".to_string(),"<object-id-003>".to_string(),],meta_object_ids: vec!["<object-id-004>".to_string(),],labels: vec![KeyValue{key: "isDummyGroup".to_string(),value: "true".to_string(),}],hooks: vec![],};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.create_object_group(create_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415161718192021
# Create tonic/ArunaAPI request to create a new object grouprequest=CreateObjectGroupRequest(name="Python-API-Test-ObjectGroup",description="This object group was created with the gRPC Python API client.",collection_id="<collection-id>",object_ids=["<object-id-001>","<object-id-002>","<object-id-003>"],meta_object_ids=["<object-id-004>"],labels=[KeyValue(key="isDummyGroup",value="true")],hooks=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.CreateObjectGroup(request=request)# Do something with the responseprint(f'{response}')
Get ObjectGroup (and its revisions)
Fetching information of an ObjectGroup only returns information of the ObjectGroup itself, not the containing Objects.
Info
This request needs at least READ permissions on the ObjectGroup's Collection or the Project under which the Collection is registered.
1234
# Native JSON request to fetch information about a specific object group
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>
1234
# Native JSON request to fetch information about the first 20 revisions of an object group
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/history
1234
# Native JSON request to fetch information about the first 250 revisions of an object group
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/history?pageRequest.pageSize=250
1234
# Native JSON request to fetch information about the revisions 21-40 (i.e. next page) of an object group
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/history?pageRequest.lastUuid=<last-received-object-group-id>
1 2 3 4 5 6 7 8 91011121314
// Create tonic/ArunaAPI request to fetch information about a specific object groupletget_request=GetObjectGroupByIdRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_by_id(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415
// Create tonic/ArunaAPI request to fetch information about the first 20 revisions of an object groupletget_request=GetObjectGroupHistoryRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: None};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_by_id(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415161718
// Create tonic/ArunaAPI request to fetch information about the first 250 revisions of an object groupletget_request=GetObjectGroupHistoryRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: Some(PageRequest{last_uuid: "".to_string(),page_size: 250,}),};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_by_id(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415161718
// Create tonic/ArunaAPI request to fetch information about the revisions 21-40 (i.e. next page) of an object groupletget_request=GetObjectGroupHistoryRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: Some(PageRequest{last_uuid: "<last-received-object-group-id>".to_string(),page_size: 0,}),};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_by_id(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 91011
# Create tonic/ArunaAPI request to fetch information about a specific object grouprequest=GetObjectGroupByIdRequest(group_id="<object-group-id>",collection_id="<collection-id>")# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupById(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 9101112
# Create tonic/ArunaAPI request to fetch information about the first 20 revisions of an object grouprequest=GetObjectGroupHistoryRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=None# Parameter can also be omitted if None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupHistory(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 9101112131415
# Create tonic/ArunaAPI request to fetch information about the first 250 revisions of an object grouprequest=GetObjectGroupHistoryRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=PageRequest(last_uuid="",# Parameter can also be omitted if emptypage_size=250))# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupHistory(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 9101112131415
# Create tonic/ArunaAPI request to fetch information about the revisions 21-40 (i.e. next page) of an object grouprequest=GetObjectGroupHistoryRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=PageRequest(last_uuid="<last-received-object-group-id>",page_size=0# Parameter can also be omitted if <= 0 (Defaults to 20)))# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupHistory(request=request)# Do something with the responseprint(f'{response}')
Get ObjectGroups of Collection
You can also fetch multiple ObjectGroups of a Collection at once.
Info
This request needs at least READ permissions on the ObjectGroup's Collection or the Project under which the Collection is registered.
1234
# Native JSON request to fetch information about the first 20 object groups of a collection
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/groups
1234
# Native JSON request to fetch information about the first 250 object groups of a collection
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/groups?pageRequest.pageSize=250
1234
# Native JSON request to fetch information about the object group 21-40 (i.e. next page) of an collection
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/groups?pageRequest.lastUuid=<last-received-object-group-id>
1 2 3 4 5 6 7 8 9101112131415
// Create tonic/ArunaAPI request to fetch information about the first 20 object groups of a collectionletget_request=GetObjectGroupsRequest{collection_id: "<collection-id>".to_string(),page_request: None,label_id_filter: None,};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_groups(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415161718
// Create tonic/ArunaAPI request to fetch information about the first 250 object groups of a collectionletget_request=GetObjectGroupsRequest{collection_id: "<collection-id>".to_string(),page_request: Some(PageRequest{last_uuid: "".to_string(),page_size: 250,}),label_id_filter: None,};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_groups(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415161718
// Create tonic/ArunaAPI request to fetch information about the object groups 21-40 (i.e. next page) of an collectionletget_request=GetObjectGroupsRequest{collection_id: "<collection-id>".to_string(),page_request: Some(PageRequest{last_uuid: "<id-of-last-received-object-group>".to_string(),page_size: 0,}),label_id_filter: None,};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_groups(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112
# Create tonic/ArunaAPI request to fetch information about the first 20 object groups of a collectionrequest=GetObjectGroupsRequest(collection_id="<collection-id>",page_request=None,label_id_filter=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroups(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 9101112131415
# Create tonic/ArunaAPI request to fetch information about the first 250 object groups of a collectionrequest=GetObjectGroupsRequest(collection_id="<collection-id>",page_request=PageRequest(last_uuid="",# Parameter can also be omitted if emptypage_size=250),label_id_filter=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroups(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 9101112131415
# Create tonic/ArunaAPI request to fetch information about the object groups 21-40 (i.e. next page) of an collectionrequest=GetObjectGroupsRequest(collection_id="<collection-id>",page_request=PageRequest(last_uuid="<last-received-object-group-id>",page_size=0# Parameter can also be omitted if <= 0 (Defaults to 20))label_id_filter=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroups(request=request)# Do something with the responseprint(f'{response}')
Get ObjectGroup Objects
Information of the containing Objects have to be requested separately.
Analogous to the Get Objects functionality, the number of returned objects can be customized/paginated.
There is also the possibility to only fetch the objects marked as metadata of the ObjectGroup.
Info
This request needs at least READ permissions on the ObjectGroup's Collection or the Project under which the Collection is registered.
1234
# Native JSON request to fetch information of the first 20 objects of an object group including meta objects
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/objects
1234
# Native JSON request to fetch information of the first 250 objects of an object group including meta objects
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/objects?pageRequest.pageSize=250
1234
# Native JSON request to fetch information only of meta objects of an object group
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XGEThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<group-id>/objects?metaOnly=true
1 2 3 4 5 6 7 8 910111213141516
// Create tonic/ArunaAPI request to fetch information of the first 20 objects of an object group including meta objectsletget_request=GetObjectGroupObjectsRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: None,meta_only: false};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_objects(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 910111213141516171819
// Create tonic/ArunaAPI request to fetch information of the first 250 objects of an object group including meta objectsletget_request=GetObjectGroupObjectsRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: Some(PageRequest{last_uuid: "".to_string(),page_size: 250}),meta_only: false};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_objects(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 910111213141516
// Create tonic/ArunaAPI request to fetch information only of meta objects of an object groupletget_request=GetObjectGroupObjectsRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),page_request: None,meta_only: true};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.get_object_group_objects(get_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 910111213
# Create tonic/ArunaAPI request to fetch information of the first 20 objects of an object group including meta objectsrequest=GetObjectGroupObjectsRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=None,meta_only=False)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupObjects(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 910111213141516
# Create tonic/ArunaAPI request to fetch information of the first 250 objects of an object group including meta objectsrequest=GetObjectGroupObjectsRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=PageRequest(last_uuid="",page_size=250),meta_only=False)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupObjects(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 910111213
# Create tonic/ArunaAPI request to to fetch information only of meta objects of an object grouprequest=GetObjectGroupObjectsRequest(collection_id="<collection-id>",group_id="<object-group-id>",page_request=None,meta_only=True)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.GetObjectGroupObjects(request=request)# Do something with the responseprint(f'{response}')
Update ObjectGroup
ObjectGroups can also be updated after creation.
Update which does not create a new revision
Just adding one or multiple labels to an Object does not create a new revision with this specific request.
Info
This request needs at least MODIFY permissions on the Object's Collection or the Project under which the Collection is registered.
1 2 3 4 5 6 7 8 910111213
# Native JSON request to add a label to an object
curl-d' { "labelsToAdd": [ { "key": "AnotherKey", "value": "AnotherValue" } ] }'\-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XPATCHhttps://<URL-to-AOS-instance-API-gateway>/v1/collection/{collection_id}/group/{group_id}/add_labels
1 2 3 4 5 6 7 8 9101112131415161718
// Create tonic/ArunaAPI request to add a label to an object groupletadd_request=AddLabelsToObjectGroupRequest{collection_id: "<collection-id>".to_string(),group_id: "<object-group-id>".to_string(),labels_to_add: vec![KeyValue{key: "AnotherKey".to_string(),value: "AnotherValue".to_string(),}],};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.add_labels_to_object_group(add_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 9101112131415
# Create tonic/ArunaAPI request to add a label to an object grouprequest=AddLabelsToObjectGroupRequest(collection_id="<collection-id>",group_id="<object-id>",labels_to_add=[KeyValue(key="AnotherKey",value="AnotherValue")])# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.AddLabelsToObjectGroup(request=request)# Do something with the responseprint(f'{response}')
Update which creates a new revision
Otherwise, updating an ObjectGroup itself always creates a new revision of the ObjectGroup.
Note
Updating an Object which is part of the ObjectGroup also initiates the update process and creates a new revision of the ObjectGroup.
Info
This request needs at least APPEND permissions on the ObjectGroup's Collection or the Project under which the Collection is registered.
Warning
A object group update overwrites all the fields in the request, even if they're empty.
If you want to retain a field you have to explicitly set the old value.
1 2 3 4 5 6 7 8 9101112131415161718192021222324
# Native JSON request to update the description of an object group
curl-d' { "name": "DummyGroup", "description": "This is an updated description.", "objectIds": [ "<object-id-001>", "<object-id-002>", "<object-id-003>" ], "metaObjectIds": [ "<object-id-004>" ], "labels": [ { "key": "isDummyGroup", "value": "true" } ], "hooks": [] }'\-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XPOSThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<object-group-id>
1 2 3 4 5 6 7 8 9101112131415161718192021222324
# Native JSON request to update the description and objects contained in the object group
curl-d' { "name": "DummyGroup", "description": "This is an updated updated description.", "objectIds": [ "<object-id-002>", "<object-id-003>", "<object-id-005>" ], "metaObjectIds": [ "<object-id-004>" ], "labels": [ { "key": "isDummyGroup", "value": "true" } ], "hooks": [] }'\-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XPOSThttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<object-group-id>
// Create tonic/ArunaAPI request to update the description of an object groupletupdate_request=UpdateObjectGroupRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),name: "Rust-API-Test-ObjectGroup".to_string(),description: "This object group was updated with the gRPC Rust API client.".to_string(),object_ids: vec!["<object-id-001>".to_string(),"<object-id-002>".to_string(),"<object-id-003>".to_string(),],meta_object_ids: vec!["<object-id-004>".to_string()],labels: vec![KeyValue{key: "isDummyGroup".to_string(),value: "true".to_string(),}],hooks: vec![],};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.update_object_group(update_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
// Create tonic/ArunaAPI request to update the description and objects contained in the object groupletupdate_request=UpdateObjectGroupRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),name: "Rust-API-Test-ObjectGroup".to_string(),description: "This object group was updated with the gRPC Rust API client.".to_string(),object_ids: vec!["<object-id-001>".to_string(),"<object-id-002>".to_string(),"<object-id-005>".to_string(),],meta_object_ids: vec!["<object-id-004>".to_string()],labels: vec![KeyValue{key: "isDummyGroup".to_string(),value: "true".to_string(),}],hooks: vec![],};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.update_object_group(update_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
1 2 3 4 5 6 7 8 910111213141516171819202122
# Create tonic/ArunaAPI request to update the description of an object grouprequest=UpdateObjectGroupRequest(group_id="<object-group-id>",name="Python-API-Test-ObjectGroup",description="This object group was updated with the gRPC Python API client.",collection_id="<collection-id>",object_ids=["<object-id-001>","<object-id-002>","<object-id-003>"],meta_object_ids=["<object-id-004>"],labels=[KeyValue(key="isDummyGroup",value="true")],hooks=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.UpdateObjectGroup(request=request)# Do something with the responseprint(f'{response}')
1 2 3 4 5 6 7 8 910111213141516171819202122
# Create tonic/ArunaAPI request to update the description of an object grouprequest=UpdateObjectGroupRequest(group_id="<object-group-id>",name="Python-API-Test-ObjectGroup",description="This object group was updated with the gRPC Python API client.",collection_id="<collection-id>",object_ids=["<object-id-001>","<object-id-002>","<object-id-005>"],meta_object_ids=["<object-id-004>"],labels=[KeyValue(key="isDummyGroup",value="true")],hooks=None)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.UpdateObjectGroup(request=request)# Do something with the responseprint(f'{response}')
Delete ObjectGroup
Deletion of an ObjectGroup only removes the ObjectGroup and its revisions.
The Objects included in the ObjectGroup are not affected by the deletion of the ObjectGroup.
Deleting last revision of ObjectGroup:
Upon deletion the Labels, Hooks, object references of the revision and the ObjectGroup itself is permanently removed from the database.
ObjectGroup has more than one revision:
Upon deletion the labels, hooks and object references of the specific revision are removed directly but the revision itself will retain with the name and description set to "DELETED".
Deleted ObjectGroups are excluded from the general methods which fetch multiple ObjectGroups except the id is specifically provided.
Info
This request needs at least MODIFY permissions on the ObjectGroup's Collection or the Project under which the Collection is registered.
Warning
ObjectGroup revisions can not be restored even if the revision still exists as DELETED.
1234
# Native JSON request to delete an ObjectGroup revision
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XDELETEhttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<object-group-id>
1234
# Native JSON request to completely delete an ObjectGroup with all its revisions
curl-H'Authorization: Bearer <API_TOKEN>'\-H'Content-Type: application/json'\-XDELETEhttps://<URL-to-AOS-instance-API-gateway>/v1/collection/<collection-id>/group/<object-group-id>?withRevisions=true
1 2 3 4 5 6 7 8 9101112131415
// Create tonic/ArunaAPI request to delete an ObjectGroup revisionletdelete_request=DeleteObjectGroupRequest{group_id: "<object-group-id>".to_string(),collection_id: "<collection-id>".to_string(),with_revisions: false,};// Send the request to the AOS instance gRPC gatewayletresponse=object_group_client.delete_object_group(delete_request).await.unwrap().into_inner();// Do something with the responseprintln!("{:#?}",response);
To fully delete an ObjectGroup with all its revisions use the parameter with_revisions: true.
1 2 3 4 5 6 7 8 9101112
# Create tonic/ArunaAPI request to delete an ObjectGroup revisionrequest=DeleteObjectGroupRequest(group_id="<object-group-id>",collection_id="<collection-id>",with_revisions=True)# Send the request to the AOS instance gRPC gatewayresponse=client.object_group_client.DeleteObjectGroup(request=request)# Do something with the responseprint(f'{response}')
To fully delete an ObjectGroup with all its revisions use the parameter with_revisions=True.