> For the complete documentation index, see [llms.txt](https://documentation.efalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.efalia.com/api-reference/efalia-process-api/delegations.md).

# Delegations

## Get Actor Delegations

> Get the list of delegations set by the current actor for all their\
> &#x20;                        roles.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"Delegation":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WorkeyObject"},"documentType":{"$ref":"#/components/schemas/WorkeyObject"},"from":{"$ref":"#/components/schemas/WorkeyObject"},"processType":{"$ref":"#/components/schemas/WorkeyObject"},"delegates":{"type":"array","items":{"$ref":"#/components/schemas/WorkeyObject"}},"status":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations":{"get":{"summary":"Get Actor Delegations","description":"Get the list of delegations set by the current actor for all their\n                         roles.","operationId":"getActorDelegations","deprecated":false,"tags":["Delegations"],"parameters":[{"name":"active","in":"query","schema":{"type":"string"},"required":false,"description":"If this parameter is set to ``true``, only the\n                            active delegations will be displayed."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Create New Delegation

> Create a new delegation.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"Delegation":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WorkeyObject"},"documentType":{"$ref":"#/components/schemas/WorkeyObject"},"from":{"$ref":"#/components/schemas/WorkeyObject"},"processType":{"$ref":"#/components/schemas/WorkeyObject"},"delegates":{"type":"array","items":{"$ref":"#/components/schemas/WorkeyObject"}},"status":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations":{"post":{"summary":"Create New Delegation","description":"Create a new delegation.","operationId":"createDelegation","deprecated":false,"tags":["Delegations"],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}},"responses":{"200":{"description":"Delegation created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get All Delegations

> Get the list of all delegations on the server.\
> \
> \<a href="./#wky-note-workflow-manager" class="wky-label wky-label-workflow-manager">Workflow Manager\</a>

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"Delegation":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WorkeyObject"},"documentType":{"$ref":"#/components/schemas/WorkeyObject"},"from":{"$ref":"#/components/schemas/WorkeyObject"},"processType":{"$ref":"#/components/schemas/WorkeyObject"},"delegates":{"type":"array","items":{"$ref":"#/components/schemas/WorkeyObject"}},"status":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations/all/all":{"get":{"summary":"Get All Delegations","description":"Get the list of all delegations on the server.\n\n<a href=\"./#wky-note-workflow-manager\" class=\"wky-label wky-label-workflow-manager\">Workflow Manager</a>","operationId":"getAllDelegations","deprecated":false,"tags":["Delegations"],"parameters":[{"name":"active","in":"query","schema":{"type":"string"},"required":false,"description":"If this parameter is set to ``true``, only the\n                            active delegations will be displayed."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get List of Actors, Processes and Roles

> Get the list of available actors in processes with roles.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"DelegationHelper":{"type":"object","properties":{"rolesByProcess":{"type":"array","items":{"$ref":"#/components/schemas/DelegationProcess"}},"actorsByRole":{"type":"array","items":{"$ref":"#/components/schemas/DelegationRole"}},"actors":{"type":"array","items":{"$ref":"#/components/schemas/DelegationActor"}}}},"DelegationProcess":{"allOf":[{"$ref":"#/components/schemas/WorkeyObject"},{"type":"object","properties":{"userRoles":{"type":"array","items":{"$ref":"#/components/schemas/DelegationRole"}}}}]},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"DelegationRole":{"allOf":[{"$ref":"#/components/schemas/WorkeyObject"},{"type":"object","properties":{"actors":{"type":"array","items":{"$ref":"#/components/schemas/DelegationActor"}}}}]},"DelegationActor":{"allOf":[{"$ref":"#/components/schemas/WorkeyObject"},{"type":"object","properties":{}}]},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations/helper":{"get":{"summary":"Get List of Actors, Processes and Roles","description":"Get the list of available actors in processes with roles.","operationId":"getDelegationsHelper","deprecated":false,"tags":["Delegations"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelegationHelper"}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get Actor Delegations

> Get the list of delegations set by the current actor for a specified\
> &#x20;                        role.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"Delegation":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WorkeyObject"},"documentType":{"$ref":"#/components/schemas/WorkeyObject"},"from":{"$ref":"#/components/schemas/WorkeyObject"},"processType":{"$ref":"#/components/schemas/WorkeyObject"},"delegates":{"type":"array","items":{"$ref":"#/components/schemas/WorkeyObject"}},"status":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations/{roleId}":{"get":{"summary":"Get Actor Delegations","description":"Get the list of delegations set by the current actor for a specified\n                         role.","operationId":"DelegationsRole","deprecated":false,"tags":["Delegations"],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string"},"description":"The ``Id`` of the role."},{"name":"active","in":"query","schema":{"type":"string"},"required":false,"description":"If this parameter is set to ``true``, only the\n                            active delegations will be displayed."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get Delegations for an Actor and a Role

> Get the list of delegations set by a specified actor for a specified\
> &#x20;                        role.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Delegations","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"Delegation":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/WorkeyObject"},"documentType":{"$ref":"#/components/schemas/WorkeyObject"},"from":{"$ref":"#/components/schemas/WorkeyObject"},"processType":{"$ref":"#/components/schemas/WorkeyObject"},"delegates":{"type":"array","items":{"$ref":"#/components/schemas/WorkeyObject"}},"status":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"WorkeyObject":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/delegations/{roleId}/{actorId}":{"get":{"summary":"Get Delegations for an Actor and a Role","description":"Get the list of delegations set by a specified actor for a specified\n                         role.","operationId":"DelegationsActorRole","deprecated":false,"tags":["Delegations"],"parameters":[{"name":"roleId","in":"path","required":true,"schema":{"type":"string"},"description":"The ``Id`` of the role."},{"name":"actorId","in":"path","required":true,"schema":{"type":"string"},"description":"The ``Id`` of the actor. If the user is not a\n                            <b>Workflow Manager</b>, this value is replaced by the id of the\n                            logged-in actor."},{"name":"active","in":"query","schema":{"type":"string"},"required":false,"description":"If this parameter is set to ``true``, only the\n                            active delegations will be displayed."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```


---

# 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://documentation.efalia.com/api-reference/efalia-process-api/delegations.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.
