⚙︎ ArticlePageService

service ArticlePageService {
  # turns the requested article with editorial render relevant data for the user and SEO bots.
  rpc GetArticlePage (GetArticlePageRequest) returns (GetArticlePageResponse) {}
}

Description

[~]

Request message to get an article page.

message GetArticlePageRequest {
  # ID of the article defined by the content management system (required).
  int64 id = 1;
}

[~]

Response message for an article page request.

Status codes:

  • OK | article exists and is published
  • NOT_FOUND | article doesn't exist or is not published according to it's Metadata
message GetArticlePageResponse {
 # Article page with all render relevant data for the user and SEO bots.
 stroeer.page.article.v1.ArticlePage article_page = 1;
}

[~]

Status/Error scenario's

scenario found

descriptionarticle was found in the datastore and is published and valid according to it's metadata
gRPC statusOK (0)
gRPC error payloadnone
HTTP status200 (OK)
cacheableyes

scenario invalid id

descriptionarticle id is invalid
gRPC statusINVALID_ARGUMENT (3)
gRPC error payloadgoogle.rpc.Bad
HTTP status400 (BAD REQUEST)
cacheableyes

scenario not found

descriptionarticle was not found in the datastore
gRPC statusNOT_FOUND (5)
gRPC error payloadnone
HTTP status404 (NOT FOUND)
cacheableyes

scenario not yet valid

descriptionarticle was found in the datastore, but is not valid yet according to its metadata.start_time
gRPC statusNOT_FOUND (5)
gRPC error payloadgoogle.rpc.ResourceInfo, check description field for recommended http status code
HTTP status404 (NOT FOUND)
cacheableyes

scenario not published

descriptionarticle was found in the datastore, but it's state is neither State.DELETED nor State.PUBLISHED
gRPC statusNOT_FOUND (5)
gRPC error payloadgoogle.rpc.ResourceInfo, check description field for recommended http status code
HTTP status404 (NOT FOUND)
cacheableyes

scenario expired

descriptionarticle was found in the datastore, but is expired according to metadata.end_time
gRPC statusNOT_FOUND (5)
gRPC error payloadgoogle.rpc.ResourceInfo, check description field for recommended http status code
HTTP status410 (GONE)
cacheableyes

scenario deleted/archived

descriptionarticle was found in the datastore, but it's state is State.DELETED
gRPC statusNOT_FOUND (5)
gRPC error payloadgoogle.rpc.ResourceInfo, check description field for recommended http status code
HTTP status410 (GONE)
cacheableyes

scenario internal

descriptioninternal error processing the article
gRPC statusINTERNAL (13)
gRPC error payloadnone
HTTP status500 (INTERNAL SERVER ERROR)
cacheableno

scenario timeout

descriptiontimeout loading and processing the article
gRPC statusDEADLINE_EXCEEDED (4)
gRPC error payloadnone
HTTP status504 (GATEWAY TIMEOUT)
cacheableno
[~]

[~]