Period
A Period is the validity interval of a record: the dates between which the record is considered current. It is the mechanism behind historicization — when a record is historicized its period is closed, so the record disappears from normal queries while remaining readable in history.
start_date defaults to 1970-01-01 (open on the left) and end_date to 9999-12-31 (open on the
right), so a record left with the default values is valid at any date.
Use this API to:
- Read the validity interval of a record (filter by
entity_id) - Correct the dates of a period, for example to reopen a record closed by mistake
- Version
- 1.0.0
- OpenAPI version
- 3.0.0
Operations
Section titled “Operations” GET /period/view/{id}
Retrieve the periods of the entity identified by the given ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The ID of the entity
Responses
Section titled “ Responses ”The periods for the entity
Current entity periods response
object
Current entity type
ACTIONCurrent entity label
Base safety (4 hours)Owned entity periods
object
Unique identifier for the period
example-period-idAdditional data, unused
object
Start period date (default -infinitive)
2017-01-01 00:00:00End period date (default +infinitive)
2019-09-26 00:00:00Unique identifier for entity
example-action-idEntity label
Base safety (4 hours)Entity type
ACTIONThe list of all child (direct and not-direct) periods indexed by child entity_id
object
Child entity_id
object
Parent entity_id
example-action-idParent entity_type
ACTIONStart period date (default -infinitive)
2017-01-01 00:00:00End period date (default +infinitive)
2019-09-26 00:00:00Unique identifier for entity
example-action-subscription-idEntity label
Jon Snow on Base safety (4 hours)Entity type
ACTION_SUBSCRIPTIONNesting level
0The list of all parent (direct and not-direct) periods indexed by parent entity_id
object
Parent entity_id
object
Unique identifier for parent entity
example-office-idParent entity_type
OFFICEParent entity label
San Jose central officeStart period date (default -infinitive)
2017-01-01 00:00:00End period date (default +infinitive)
2019-09-26 00:00:00Unique identifier for current entity
example-action-idCurrent entity type
ACTIONNesting level
0Example
{ "entity_type": "ACTION", "entity_name": "Base safety (4 hours)", "owned": [ { "period_id": "example-period-id", "data": null, "start_date": "2017-01-01 00:00:00", "end_date": "2019-09-26 00:00:00", "entity_id": "example-action-id", "entity_name": "Base safety (4 hours)", "entity_type": "ACTION" } ], "child": { "example-action-subscription-id": [ { "dep_id": "example-action-id", "dep_type": "ACTION", "start_date": "2017-01-01 00:00:00", "end_date": "2019-09-26 00:00:00", "entity_id": "example-action-subscription-id", "entity_name": "Jon Snow on Base safety (4 hours)", "entity_type": "ACTION_SUBSCRIPTION", "level": "0" } ] }, "parent": { "example-office-id": [ { "dep_id": "example-office-id", "dep_type": "OFFICE", "dep_name": "San Jose central office", "start_date": "2017-01-01 00:00:00", "end_date": "2019-09-26 00:00:00", "entity_id": "example-action-id", "entity_type": "ACTION", "level": "0" } ] }}update
Section titled “update” PUT /period/update/{id}
Update the periods of the entity identified by the given ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The ID of the entity
Request Body
Section titled “Request Body ”The periods to update
Update entity periods request body
object
A period to write
object
Unique identifier for the period
example-period-idStart period date (default -infinitive)
2017-01-01 00:00:00End period date (default +infinitive)
2019-09-26 00:00:00Example
{ "periods": [ { "period_id": "example-period-id", "start_date": "2017-01-01 00:00:00", "end_date": "2019-09-26 00:00:00" } ]}Update entity periods request body
object
A period to write
object
Unique identifier for the period
example-period-idStart period date (default -infinitive)
2017-01-01 00:00:00End period date (default +infinitive)
2019-09-26 00:00:00Responses
Section titled “ Responses ”The updated action
Update entity periods response body
object
Example
{ "done": "true"}Update entity periods response body
object
Example
{ "done": "true"}This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.