PTS Registry API - Release Notes
All notable changes to the PTS Registry API will be documented in this file.
Subscribe to notifications on #ext-utv-pts on Slack to be notified when we announce new releases.
You'll also notice we often use icons to visualize our changes and their effect, but we've limited ourselves to the following;
- π± New Feature
- π Improvement
- π§ Bug Fix
- π₯ Breaking Change
- π Security
Only changes that reach a public surface are listed.
1.0.6
- π₯ The subject's
identifieris nowvalue, as in every other reference to a person:{ "system": β¦, "value": β¦ }. - π₯
createanswers201 Created, not200 OK. - π₯ A restriction no longer carries
links. They held only aselfpath, and may come back as a proper addition. - π₯
queryis paged likeGET /api/v1/restrictions: it answers at mostpageSizerestrictions (5 to 500, default 25) and anextwhile there are more. Sendnextback ascursor, with the same subject. - π₯ The OpenAPI document now states what is accepted, so generated clients change.
resourceis required oncreateandrevoke,resource.valueis required oncreate, andprovision.systemlists 9604 only.revoke's resource is its own schema,RestrictionResourceSelectorDto, whosevaluestays optional. The API accepts exactly what it did. - π₯ A property the API doesn't know is rejected with
400, as is a number where an enum's name is expected. Both were accepted before. - π₯ A subject, a person actor and the person asking in
resolvemust be 11 digits under their own system: a personnummer (first digit 0 to 3) or a D-nummer (first digit 4 to 7). - π₯
createanswers409for a subject number the person no longer uses, and for a subject dead more than 31 days, or marked dead with no date of death.revokeis allowed on both. - π₯ One
createnaming the same practitioner by D-nummer and by personnummer is refused as a duplicate actor. - π₯ Statuses: a subject or person actor nobody owns is
400(was404). A value that may not follow the one in force, and a revoke with nothing in force, are409(were400). A failed lookup in a service we depend on is always500(was403,400or409).404is only forGET /api/v1/restrictions/{restrictionId}. - π± The subject gains
name, alongsidedateOfBirthandidentifiers.identifiersholds the personnummer and D-nummer the person has now, retired ones included, sorted by system, then value, and so does a person actor's. A number nobody owns is shown by itself, with no name or date of birth. - π± A revoke of what is already revoked answers
409, apart from one with nothing in force. - π A restriction is stored on the personnummer or D-nummer you send, and read across every number its owner has: a
restriction set through someone's D-nummer is in force through their personnummer too.
compact,resolveand every response combine them. - π A person actor stands for its owner, so a revoke naming a practitioner by either number ends a restriction naming
them by the other.
revokeneeds something in force across the owner, and appends its revocation on the number sent. - π A write is judged again against what is in force when it lands. One that collides with a concurrent change to the
same person answers
409, as does one whose rule fails because what it would follow has changed. - π§
resolveno longer lets a revoked restriction hide the active one beneath it: revoking a restriction named at the subject no longer lifts a restriction named at a capacity the subject holds. - π§
resolvereturns a restriction covering the whole domain for a question about a type or a resource in it. PVK's PPS-SPERRE-HARD is written that way, and was missing from those answers.
1.0.5
- π₯ A restriction carries at most one period.
conditions.periodsis nowconditions.period. - π₯ Removed the rule that periods must not overlap, and the limit of twenty periods per restriction.
1.0.4
- π₯ The two models inside a resolution are now named
RestrictionResolutionPersonActorDtoandRestrictionResolutionCapacityActorDto, so the generated OpenAPI schema names match the code rather than readingRestrictionActorDtoRestrictionPersonActorDto.
1.0.3
- π₯
resolverequires a domain and a resource type alongside a resource identifier. - π₯ Removed breadth from the API. How much a restriction covers is derived from the domain and resource it
names, and writing one too wide is refused with a
400. - π₯ Removed the last of the target vocabulary, flattening the snapshot
compactreturns.
1.0.2
- π₯ Replaced
appliesTowith a reach, and allowed a provision to reach the descendants of a resource rather than only the resource itself. - π₯ Flattened the domain and the resource out of the wrapped target and onto the restriction itself, and collapsed the polymorphic provision class.
- π₯ A resource is optional, so a restriction may cover a whole domain or a whole resource type.
- π₯ Breadth is permitted per code system, so 9603 and 9604 differ in how wide they may be written.
- π₯ Replaced
DiagnosticReportwithServiceRequestthroughout. - π₯ Removed the parts of the API surface that existed only to fit 9603.
1.0.1
- π₯ Every restriction target carries a domain and a resource type.
- π₯ Replaced directives with provisions.
- π₯
revoketakes a provision selector, so it names which provision is being lifted. - π₯ Conditions may carry a duration, for a provision whose window is counted from a resource that does not exist yet.
- π₯ The subject's date of birth travels with a restriction, taken from
Pts.Person.Api, replacing the age windows this registry used to compute. The age threshold belongs to Helsedirektoratet, not here. - π₯ Added
appliesToto say how far a restriction reaches. - π₯ Removed the supersession ordinal from every public surface.
1.0.0
The first version the service reported.
It was reached without any released predecessor, so this section describes the surface rather than a set of changes.
- π₯
/api/v1/restrictionswithcreate,query,compact,resolveandrevoke, plus a cursor-paged list and a get-by-id. - π₯ Restrictions are the aggregate root, with the subject embedded, and provision values are strongly typed and polymorphic.
- π₯
compactreturns what is in force per resource and code system;resolveanswers for one actor. - π₯ HelseID with DPoP, and CORS for the developer portal.