Skip to content

Commit c24c5a1

Browse files
authored
Merge pull request #216 from contentauth/instance-id
Updates re instance id
2 parents 5196c50 + f83fdd5 commit c24c5a1

File tree

1 file changed

+25
-35
lines changed

1 file changed

+25
-35
lines changed

docs/manifest/assertions-actions.md

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ For example:
254254
"assertions": [
255255
...
256256
{
257-
"label": "com.truepic.libc2pa",
257+
"label": "com.mycompany.myproduct",
258258
"data": {
259259
"git_hash": "023bb51",
260-
"lib_name": "Truepic C2PA C++ Library",
260+
"lib_name": "Our C2PA C++ Library",
261261
"lib_version": "2.5.1",
262262
"target_spec_version": "1.2"
263263
},
@@ -381,7 +381,7 @@ The `parameters` property can contain any data that provide more details on the
381381
]
382382
```
383383

384-
When creating an actions assertion that has an associated ingredient, the `parameters` object must include a `org.cai.ingredientIds` property with an array of one or more [`instanceID` values](#the-instanceid-property) from ingredients. This is how you associate an action with one or more ingredients.
384+
When creating an actions assertion that has an associated ingredient, the `parameters` object must include a `org.cai.ingredientIds` property with an array of one or more [`instance_id` values](#the-instance_id-property) from ingredients. This is how you associate an action with one or more ingredients.
385385

386386
:::info
387387
The [C2PA specification](https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_parameters) requires that a `c2pa.transcoded`, `c2pa.repackaged`, `c2pa.opened`, or a `c2pa.placed` action have one or more associated ingredients, so it is very important to add the `org.cai.ingredientIds` parameter with a matching ingredient.
@@ -402,76 +402,66 @@ For example:
402402
...
403403
```
404404

405-
The SDK supports the older `ingredientId` field, but it is deprecated and will at some point not be supported.
405+
:::note
406+
The old `ingredientId` field is deprecated.
407+
:::
406408

407409
For more information on action parameters, see the [C2PA Technical Specification](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_parameters).
408410

409-
### The instanceId property
411+
### The instance_id property
412+
413+
When defining/writing a manifest, the `instance_id` property identifies an ingredient used in an action.
410414

411-
The `instanceId` property identifies an ingredient (with a matching value of `instance_id`) used in an action and is only used when defining/writing a manifest, not reading one.
415+
Any `c2pa.opened` or `c2pa.placed` action must have an associated ingredient identified by the `org.cai.ingredientIds` parameters field of the action with an array of ingredient `instance_id` values.
412416

413-
```json
417+
```json
414418
"ingredients": [
415419
{
416420
...
417421
"instance_id": "<String-instance-ID-of-ingredient>",
418-
...
422+
"relationship": "parentOf",
423+
"label": "c2pa.ingredient.v3"
419424
},
420-
...
425+
...
426+
],
421427
"actions": [
422428
{
423429
"action": "c2pa.*",
424-
"instanceId": "<String-instance-ID-of-ingredient>",
425430
"parameters": {
426-
"ingredient": {
427-
"hash": "tTBD4/E0R0AjLUdJFpsVz3lE/KJUq22Vz0UGqzhEpVs=",
428-
"url": "self#jumbf=c2pa.assertions/c2pa.ingredient"
429-
}
431+
"org.cai.ingredientIds": [
432+
"<String-instance-ID-of-ingredient>"
433+
],
430434
}
431435
},
432436
...
433437
]
434438
```
435439

436-
For example, the following action identifies that the `c2pa.opened` action was performed on the ingredient with ID `xmp.did:813ee422-9736-4cdc-9be6-4e35ed8e41cb`:
440+
For example, the following action identifies that the `c2pa.opened` action was performed on the ingredient with ID `xmp.iid:3250038a-22ca-459b-8392-de275f8b155c`:
437441

438442
```json
439443
"ingredients": [
440444
{
441-
"title": "A.jpg",
445+
"title": "test.jpeg",
442446
"format": "image/jpeg",
443-
"document_id": "xmp.did:813ee422-9736-4cdc-9be6-4e35ed8e41cb",
444-
"instance_id": "xmp.iid:813ee422-9736-4cdc-9be6-4e35ed8e41cb",
445-
"thumbnail": {
446-
"format": "image/jpeg",
447-
"identifier": "xmp.iid-813ee422-9736-4cdc-9be6-4e35ed8e41cb.jpg"
448-
},
447+
"instance_id": "xmp.iid:3250038a-22ca-459b-8392-de275f8b155c",
449448
"relationship": "parentOf"
450-
},
451-
...
449+
}
452450
],
453451
"assertions": [
454-
...
455452
{
456453
"label": "c2pa.actions",
457454
"data": {
458455
"actions": [
459456
{
460457
"action": "c2pa.opened",
461-
"instanceId": "xmp.iid:813ee422-9736-4cdc-9be6-4e35ed8e41cb",
462458
"parameters": {
463-
"ingredient": {
464-
"hash": "tTBD4/E0R0AjLUdJFpsVz3lE/KJUq22Vz0UGqzhEpVs=",
465-
"url": "self#jumbf=c2pa.assertions/c2pa.ingredient"
466-
}
459+
"org.cai.ingredientIds": [
460+
"xmp.iid:3250038a-22ca-459b-8392-de275f8b155c"
461+
],
467462
}
468463
},
469464
...
470-
]
471-
}
472-
}
473-
],
474-
...
475465
```
476466

477467
### V2 actions

0 commit comments

Comments
 (0)