Skip to main content

Read an account's contacts

POST 

/accounts/:accountId/contacts/get

Returns the primary contact, the three alternate contacts and the root email address AWS holds for one account.

This is a read, despite being a POST. Two reasons, neither of them an oversight. It mirrors the ops-service route it forwards to, which is shaped as an RPC call rather than as a REST resource, so Prism relays the method unchanged. And Prism's own console treats it as a read: it is one of a small set of paths explicitly carved out of the read-only guard, so an operator with read-only access can still open the contacts page. The request body is not the reason; this operation sends none and reads none.

The response is not wrapped in the success envelope. It is the ops-service's answer relayed byte for byte, so the contacts are at the top level with no success, no message and no data. It is the only operation documented here that answers this way. A client that reaches for response.data will find nothing.

How the contacts operations reach AWS​

This operation and the other five under /contacts are proxies. Prism does not call AWS for them: it forwards the request to CloudKeeper's ops-service, which holds the payer-account access that reading and writing account contacts requires.

They are present on every deployment, CloudKeeper-hosted and self-hosted alike; none of them 404. What differs is whether the proxy has anywhere to go. A self-hosted install that has not been paired with CloudKeeper SaaS answers every one of them with 502 and the message no SaaS connection configured — pair with CloudKeeper SaaS first; pair the install and they start working.

Every failure past that point is also a 502, and this is the single most important thing to know about these six operations. Prism collapses the whole upstream outcome into one status: a transport failure, a timeout, an ops-service 400 for a malformed body, an ops-service 403, and an ops-service 404 for an account that does not exist all arrive as 502 with the upstream message in message and error. You cannot tell "no such account" from "the ops-service is down" by status code. Read message; it is the only signal.

On CloudKeeper-hosted Prism the tenant segment of the path is forwarded to the ops-service as the realm name, so for these six address your tenant by its slug rather than by its UUID.

Request​

Responses​

The account's contacts, relayed verbatim from the ops-service. No envelope; see above.