# `Ankusa.SDK.Sources.Source`
[🔗](https://github.com/jamescarr/ankusa/blob/sdk-elixir-v0.6.0/packages/sdk-elixir/lib/ankusa/sdk/sources/source.ex#L1)

A stored source as the admin API reports it: identity fields plus the redacted
spec.

Every value here is redacted (`secret`, `password`, `token`, HTTP header
values, URL userinfo passwords, ...), so a `Source` read back through
`Ankusa.SDK.Sources.get_source/3` is never useful for editing: resending its
`verify` map is not the same as resending the stored secret. Callers that hold
the secret supply it through `Ankusa.SDK.Sources.Spec`.

# `t`

```elixir
@type t() :: %Ankusa.SDK.Sources.Source{
  ingest_path: String.t(),
  name: String.t(),
  on_verify_failure: String.t() | nil,
  sinks: [map()],
  source_id: String.t(),
  tenant: String.t(),
  verify: map()
}
```

# `from_json`

```elixir
@spec from_json(term()) :: {:ok, t()} | :error
```

Build a source from a decoded API object.

`tenant`, `name`, `source_id` and `ingest_path` are required binaries;
`verify` defaults to `%{"type" => "none"}` and `sinks` to `[]` when the body
omits them. Returns `:error` when a required field is missing or malformed.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
