Get the company’s security policy
const url = 'https://api.emite.cr/v1/tenants/me/security-policy';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/tenants/me/security-policy \ --header 'Authorization: Bearer <token>'The saved session rules, the values the company may choose (options, already filtered to values below platformMaxAgeMinutes), whether the plan includes the feature (entitled) and, when it does not, the cheapest plan on this company’s ladder that does (requiredPlan).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
The company's session rules as saved.
object
Maximum session length in minutes, counted from sign-in; null = no rule of the company's own (the platform maximum, platformMaxAgeMinutes, applies).
Minutes without activity after which a session closes; null = no such rule.
When the session rules last changed, a reset included; null when they never were.
The values the company may choose — served, so a client never offers one the API refuses.
object
The maximum session lengths the company may choose, in minutes — the only values PUT …/session accepts, leaving out any at or above the platform maximum.
The inactivity timeouts the company may choose, in minutes, with the same filter.
The inactivity timeout EmiteCR recommends, in minutes.
The platform's maximum session length, in minutes: the ceiling of every company rule.
Whether the company's plan includes the session policy — what changing it with PUT …/session needs (402 FEATURE_NOT_IN_PLAN otherwise). Resetting never does, and saved rules keep applying after a downgrade.
The cheapest plan on the company's ladder that includes the session policy, for an upgrade prompt; null when the plan already includes it, or no sold plan does.
object
Code of the plan (pf_t3 on the persona física ladder, pj_t3 on the jurídica).
Its commercial name.
Example
{ "session": { "maxAgeMinutes": 240, "idleTimeoutMinutes": 30 }, "options": { "maxAgeMinutes": [ 120, 240 ], "idleTimeoutMinutes": [ 15, 30, 60 ], "recommendedIdleTimeoutMinutes": 30 }, "platformMaxAgeMinutes": 480, "requiredPlan": { "code": "pj_t3", "label": "Ocelote" }}Missing or invalid JWT.
Requires the security:manage scope (JWT only).