net.corda.core.utilities / ApiUtils

# ApiUtils

`class ApiUtils`

Utility functions to reduce boilerplate when developing HTTP APIs

### Constructors

<init> | `ApiUtils(rpc: CordaRPCOps)` Utility functions to reduce boilerplate when developing HTTP APIs

### Properties

rpc | `val rpc: CordaRPCOps`

### Functions

withParty | `fun withParty(partyKeyStr: String, notFound: (String) -> <ERROR CLASS> = defaultNotFound, found: (Party) -> <ERROR CLASS>): <ERROR CLASS>` Get a party and then execute the passed function with the party public key as a parameter. Usage: withParty(key) { doSomethingWith(it) }