Skip to content
nsin docs

Get a gateway's icon image

GET
/gateway-presets/{presetId}/icon
curl --request GET \
--url https://api.nsin.ir/gateway-presets/1/icon

The icon of one catalog gateway, as image bytes. You normally reach it through the icon_url that GET /domains/{domain}/gateways/?icons=url returns (a path on the API origin, with the version already in ?v=) instead of the inline base64 icon.

Public — no authentication, so an <img> tag can load it: catalog icons are not secret. The URL is content-addressed: when v names the current icon the response may be cached for a year (immutable). An old or missing v still gets the current icon, but on a short lifetime, so a stale URL never pins a stale picture. ETag is the version; send it back in If-None-Match for a 304.

The body is PNG, JPEG, GIF, WebP or SVG. SVG is served with a sandboxing Content-Security-Policy, so it can only be drawn.

presetId
required
integer

Numeric id of the gateway (the id of a gateway list item).

v
string

The icon version from icon_url. Optional; see above.

The icon.

string format: binary
Cache-Control
string

public, max-age=31536000, immutable when v is the current version; public, max-age=300, must-revalidate or no-cache otherwise.

ETag
string

The icon version, quoted.

If-None-Match matches the current version.

No such gateway, or it has no icon. Empty body.