> For the complete documentation index, see [llms.txt](https://framework.ishare.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://framework.ishare.eu/detailed-descriptions/technical/structure-of-delegation-evidence/example-cases.md).

# Example cases

The main variations in the JSON code for delegationEvidence are the (1-n) `policySets`, `policies` and `rules` arrays. These variations are based on the most efficient way of expressing the rights that an `accessSubject` has.

Various examples are described in the table below.

<table data-full-width="true"><thead><tr><th>Description</th><th>Code</th></tr></thead><tbody><tr><td><p>Organisation A delegates rights to organisation B. A allows B READ and CREATE access to all ETA and WEIGHT of A's containers, of which the data is located at service provider C and can only be accessed with service provider C. However, A does not allow B to CREATE to ETA information and completely denies access to data regarding container ID.00000000000001. Furthermore, all rights of B are allowed under the iSHARE license https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0, and B has the right to delegate its rights two more times.</p><p><br>The code shows default access to a set of resources, with a few exceptions in terms of actions or specific resources. This results in additional "Deny" rules within the policy.</p></td><td><p>Code - for visual/reading purposes Bron uitklappen</p><pre class="language-json"><code class="lang-json">{
    "delegationEvidence": {
        "notBefore": 1509633681,
        "notOnOrAfter": 1509633741,
        "policyIssuer": "did:ishare:EU.NL.NTRNL-10000005",
        "target": {
            "accessSubject": "did:ishare:EU.NL.NTRNL-10000001"
        },
        "policySets": [
            {
                "maxDelegationDepth": 2,
                "target": {
                    "environment": {
                        "licenses": ["https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0"]
                    }
                },
                "policies": [
                    {
                        "target": {
                            "resource": {
                                "type": "GS1.CONTAINER",
                                "identifiers": ["*"],
                                "attributes": ["GS1.CONTAINER.ATTRIBUTE.ETA", "GS1.CONTAINER.ATTRIBUTE.WEIGHT"]
                            },
                            "actions": ["ISHARE.READ", "ISHARE.CREATE"],
                            "environment": {
                                "serviceProviders": ["did:ishare:EU.NL.NTRNL-10000003"]
                            }
                        },
                        "rules": [
                            {
                                "effect": "Permit"
                            },
                            {
                                "effect": "Deny",
                                "target": {
                                    "resource": {
                                        "attributes": ["GS1.CONTAINER.ATTRIBUTE.ETA"]
                                    },
                                    "actions": ["ISHARE.CREATE"]
                                }
                            },
                            {
                                "effect": "Deny"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
</code></pre></td></tr><tr><td><p>Organisation A delegates rights to organisation B. A allows B READ access to all ETA of A's containers, of which the data is located at service provider C and can only be accessed with service provider C. A also allows B CREATE access to all WEIGHT of A's containers, at any service provider possible. Furthermore, all rights of B are allowed under the iSHARE license https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0, and B has the right to delegate its rights two more times.</p><p><br></p><p>The code shows that the same delegation rights and licenses apply to a resource set, but different actions are allowed to different subsets of these resources. This results in variations in policies within the policy sets.</p></td><td><p>Code - for visual/reading purposes Bron uitklappen</p><pre class="language-json"><code class="lang-json">{
    "delegationEvidence": {
        "notBefore": 1509633681,
        "notOnOrAfter": 1509633741,
        "policyIssuer": "did:ishare:EU.NL.NTRNL-10000005",
        "target": {
            "accessSubject": "did:ishare:EU.NL.NTRNL-10000001"
        },
        "policySets": [
            {
                "maxDelegationDepth": 2,
                "target": {
                    "environment": {
                        "licenses": ["https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0"]
                    }
                },
                "policies": [
                    {
                        "target": {
                            "resource": {
                                "type": "GS1.CONTAINER",
                                "identifiers": ["*"],
                                "attributes": ["GS1.CONTAINER.ATTRIBUTE.ETA"]
                            },
                            "actions": ["ISHARE.READ"],
                            "environment": {
                                "serviceProviders": ["did:ishare:EU.NL.NTRNL-10000003"]
                            }
                        },
                        "rules": [
                            {
                                "effect": "Permit"
                            }
                        ]
                    },
                    {
                        "target": {
                            "resource": {
                                "type": "GS1.CONTAINER",
                                "identifiers": ["*"],
                                "attributes": ["GS1.CONTAINER.ATTRIBUTE.WEIGHT"]
                            },
                            "actions": ["ISHARE.CREATE"]
                        },
                        "rules": [
                            {
                                "effect": "Permit"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
</code></pre></td></tr><tr><td><p>Organisation A delegates rights to organisation B. A allows B READ and CREATE access to all ETA and WEIGHT of A's containers, of which the data is located at service provider C, and rights can only be used with service provider C. Furthermore, all rights of B are allowed under the iSHARE license https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0, and B has the right to delegate its rights two more times. A also provides B READ access to the Container origins, but does not allow delegation for this information, and it is only accessible under the iSHARE license <a href="https://licenses.ishare.eu/general-non-commercial-use">https://licenses.ishare.eu/general-non-commercial-use</a>.</p><p>The code shows two groups of resources with specific policies, executed under different licenses and delegation rights. This results in variations on the <code>policySets</code> level within the <code>delegationEvidence</code>.</p></td><td><p>Code - for visual/reading purposes Bron uitklappen</p><pre class="language-json"><code class="lang-json">{
    "delegationEvidence": {
        "notBefore": 1509633681,
        "notOnOrAfter": 1509633741,
        "policyIssuer": "did:ishare:EU.NL.NTRNL-10000005",
        "target": {
            "accessSubject": "did:ishare:EU.NL.NTRNL-10000001"
        },
        "policySets": [
            {
                "maxDelegationDepth": 2,
                "target": {
                    "environment": {
                        "licenses": ["https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0"]
                    }
                },
                "policies": [
                    {
                        "target": {
                            "resource": {
                                "type": "GS1.CONTAINER",
                                "identifiers": ["*"],
                                "attributes": ["GS1.CONTAINER.ATTRIBUTE.ETA", "GS1.CONTAINER.ATTRIBUTE.WEIGHT"]
                            },
                            "actions": ["ISHARE.READ", "ISHARE.CREATE"],
                            "environment": {
                                "serviceProviders": ["did:ishare:EU.NL.NTRNL-10000003"]
                            }
                        },
                        "rule": {
                            "effect": "Permit"
                        }
                    }
                ]
            },
            {
                "target": {
                    "environment": {
                        "licenses": ["https://licenses.ishare.eu/general-non-commercial-use/1.0"]
                    }
                },
                "policies": [
                    {
                        "target": {
                            "resource": {
                                "type": "GS1.CONTAINER",
                                "identifiers": ["*"],
                                "attributes": ["GS1.CONTAINER.ATTRIBUTE.ORIGIN"]
                            },
                            "actions": ["ISHARE.READ"]
                            },
                        "rule": {
                            "effect": "Permit"
                        }
                    }
                ]
            }
        ]
    }
}
</code></pre></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://framework.ishare.eu/detailed-descriptions/technical/structure-of-delegation-evidence/example-cases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
