Now, this gets clear.
With the keyword IDKEY you replaced the default ID naming it RowID.

To store it:

set book=##class(BOOK).%New()
set book.RowId=obj.ID     ;  from JSON obj
set book.Title=obj.Title    ;  from JSON obj
do book.%Save()

to retrieve an existing Rowid:

set book=##class(BOOK).%OpenId(obj.ID)   ;from JSON obj
,;; access or change your book.Title

I'm sorry. it seems you don't understand what I'm talking about.
You just gave me the names. Not the structure and definition. 

Expected example:

Class RestApi.Books Extends %Persistent
{
Property Title As %String;
Property Pages As %Integer; 

Storage Default
{
<Data name="BooksDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Title</Value>
</Value>
<Value name="3">
<Value>Pages</Value>
</Value>
</Data>
<DataLocation>^RestApi.BooksD</DataLocation>
<DefaultData>BooksDefaultData</DefaultData>
<IdLocation>^RestApi.BooksD</IdLocation>
<IndexLocation>^RestApi.BooksI</IndexLocation>
<StreamLocation>^RestApi.BooksS</StreamLocation>
}
}
 
 Class RestApi.Title Extends %Persistent
{
Property Title As Books;
Property Text As %String; 

Storage Default
{
<Data name="TitleDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Title</Value>
</Value>
<Value name="3">
<Value>Text</Value>
</Value>
</Data>
<DataLocation>^RestApi.TitleD</DataLocation>
<DefaultData>TitleDefaultData</DefaultData>
<IdLocation>^RestApi.TitleD</IdLocation>
<IndexLocation>^RestApi.TitleI</IndexLocation>
<StreamLocation>^RestApi.TitleS</StreamLocation>
}
}


it's midnight now. I finish 

maybe next week.

Every Database in Caché or IRIS has a "NickName" (TEST, APP, USER, *TEMP, ..)
The file location is just a pointer related to the location of the file used
Similar Resource is an attribute to this "NickName".  and NOT to the related file
Changing it affects user access, but doesn't care at all about the file location.
The *.DAT file has no information about Resources or its NickName.  

Way back in the past, when file sizes were limited by file systems, there were
"Continuation" Files for Cache.DAT. Those knew the starting Cache.DAT.
But this is decades back and gone and doesn't exist anymore.