2024 is the year of the connector - vote here

Explore the WordPress API data model

See how the various WordPress endpoints relate to each other, using our handy Entity Relationship Diagram

Pulling data from the WordPress API is only the first part of your reporting. You also need to understand the relationships between different endpoints - something that APIs typically fail to convey.

At SyncHub, we not only sync your WordPress API endpoints down into a reportable format, we also describe their relationships (e.g. in terms of foreign keys) so that you can quickly get a grasp of your data and how it fits together. This page is intended as technical documentation of these relationships.

Endpoints

Category

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/categories/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
Description string - -
Slug string - -
PostCount int - -
FeedUrl string - -
Parent long Category → ID
  • 12 Jul 2022 The value of this property is a foreign key to another category

ClickedOutboundLink

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/clicks/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Name string - -
Date datetime - -
Url string - -
Views int - -

Comment

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/comments/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Status string - -
Date datetime - -
Content string - -
RawContent string - -
URL string - -
ShortURL string - -
Type string - -
LikeCount int - -
PostID long Post → ID -
ParentCommentID long Comment → ID -
AuthorUserID long User → ID -

DownloadedFile

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/file-downloads/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Date datetime - -
Filename string - -
RelativeUrl string - -
DownloadUrl string - -
Downloads int - -

Media

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/media/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Description string - -
Date datetime - -
PostID long Post → ID -
AuthorID long User → ID -
URL string - -
Guid string -
  • 14 Jul 2022 Although technically a 'Globally Unique ID', this is actually a URL and not the 0000-0000-etc format we usually expect
File string - -
Extension string - -
MimeType string - -
Title string - -
Caption string - -
Alt string - -
Height decimal - -
Width decimal - -
Length decimal -
  • 14 Jul 2022 If a video, then this indicates the duration, in seconds
Size string -
  • 14 Jul 2022 The size is returned as a description e.g. '1 MB' or '2 GB'
Copyright string - -
Aperture decimal - -
Credit string - -
Camera string - -
FocalLength decimal - -
Iso decimal - -
ShutterSpeed decimal - -
Latitude decimal - -
Longitude decimal - -
Orientation int - -

PlayedVideo

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/video-plays/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Date datetime - -
MediaID long Media → ID
  • 25 Jul 2022 This field comes down as post_id but we have confirmed that it maps to a media_id entity
Url string - -
Title string - -
Plays int - -

Post

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/posts/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
SiteID long - -
AuthorUserID long User → ID -
Date datetime - -
Modified datetime - -
Title string - -
URL string - -
ShortURL string - -
Content string - -
Excerpt string - -
Slug string - -
Guid string - -
Status string - -
Sticky boolean - -
Password string - -
ParentPostID long Post → ID -
Type string - -
CommentsOpen boolean - -
CommentStatus string - -
PingsOpen boolean - -
PinStatus string - -
CommentCount int - -
LikesEnabled boolean - -
SharingEnabled boolean - -
LikeCount int - -
IsReblogged boolean - -
IsFollowing boolean - -
GlobalID string - -
FeaturedImage string - -
ThumbnailMediaID long Media → ID -
Format string - -
MenuOrder int - -
PageTemplate string - -

StatsSummary

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/summary/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Date datetime - -
Period string - -
Views int - -
Visitors int - -
Likes int - -
Reblogs int - -
Comments int - -
Followers int - -

Subscriber

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/followers/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long User → ID -
Avatar string - -
Label string - -
Login string - -
Url string - -
DateSubscribed datetime - -

Tag

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/tags/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Name string - -
Description string - -
Slug string - -
PostCount int - -
FeedUrl string - -

User

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/users/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
Login string - -
Email string -
  • 12 Jul 2022 The 'email' property can either come down as a string, or as the boolean value 'false'
FirstName string - -
LastName string - -
NiceName string - -
URL string - -
AvatarUrl string - -
ProfileUrl string - -
SiteID long - -
IsSuperAdmin boolean - -

ViewedPost

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/top-posts/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
ID long - -
ViewDate datetime -
  • 26 Jul 2022 All our stats-related endpoints for WordPress have a 'date' field. Unfortunately this field name is mapped to another property in the JSON response from WP. So, we call it ViewDate in the model, but map to 'date' in our data warehouse for consistency
PostID long Post → ID -
Type string - -
Views int - -

ViewsByCountry

Documentation: https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/country-views/

Column Type Relates to Notes
RemoteID string - -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
Date datetime - -
CountryCode string - -
Views int - -

PostTag

Column Type Relates to Notes
RemoteID string - -
PostRemoteID string Post → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PostID long Post → ID -
TagID long Tag → ID -

PostCategory

Column Type Relates to Notes
RemoteID string - -
PostRemoteID string Post → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PostID long Post → ID -
CategoryID long Category → ID -

PostMedia

Column Type Relates to Notes
RemoteID string - -
PostRemoteID string Post → RemoteID -
WhenUpsertedIntoDataStore datetime - -
MirrorRemoteID int - -
IsDeleted boolean - -
WhenCreated datetime - -
WhenModified datetime - -
PostID long Post → ID -
MediaID long Media → ID -

Need more?

SyncHub lives and breathes APIs and data. Keep exploring using the links below.