Skip to main content
Answer

Limit on the Number of Characters for String Timeseries

  • May 9, 2025
  • 6 replies
  • 87 views

Forum|alt.badge.img+7

Is there a limit on the number of characters for String data that can be stored in a Timeseries?

I would like to manage a JSON file that defines the configuration values of a certain system in CDF. Since the JSON file will be changed frequently and I also want to check the historical configuration records, I am considering defining it as a string timeseries and storing the JSON string in data point.

However, if there is a character limit, it would restrict the size of the JSON string that can be stored, so I would like to confirm the specifications. As far as I have searched, there is no mention of this in the documentation.

Best answer by Masayoshi Chiba

Hello ​@kshomura -san,

If I understand your question correctly, I think the document below answers your question.

https://api-docs.cognite.com/20230101/tag/Time-series/operation/postMultiTimeSeriesDatapoints/#!ct=application/json&path=items/0/datapoints/1/value&t=request

Please have a look.

Best regards,

6 replies

Masayoshi Chiba
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • Answer
  • May 9, 2025

Hello ​@kshomura -san,

If I understand your question correctly, I think the document below answers your question.

https://api-docs.cognite.com/20230101/tag/Time-series/operation/postMultiTimeSeriesDatapoints/#!ct=application/json&path=items/0/datapoints/1/value&t=request

Please have a look.

Best regards,


Forum|alt.badge.img+7
  • Author
  • Committed
  • May 9, 2025

Hello ​@Masayoshi Chiba -san,

That’s the answer I’m looking for. Sorry for my oversight.

Thank you.


Masayoshi Chiba
Seasoned Practitioner
Forum|alt.badge.img

Hello ​@kshomura -san,

I’m happy to be able to help a little.

Generally speaking in CDF, the type of information you're looking for (such as specifications) is often found in the API documentation rather than in the SDKs. So please refer to the API documentation first - it should help you find the appropriate information.

Thank you,


Forum|alt.badge.img+7
  • Author
  • Committed
  • May 9, 2025

Hello ​@Masayoshi Chiba -san,

Thank you for the advice.

Based on the information, I understand that long json strings can’t be stored in timeseries. 

Alternatively, these files can be stored in Files, but is it possible to check the historical configuration records with this method?

I believe it is possible to update files, but I am concerned about whether I can revert to a previously uploaded version.

Best regards,


Forum|alt.badge.img

Hello ​@kshomura-san,

 

You can update the files, but the files are not versioned in the Files API service. Thus you could not update the same file and retrieve an “older” (previously updated) version of tile file.  This is something you would need to work around as a current limitation of the API.


Forum|alt.badge.img+7
  • Author
  • Committed
  • May 9, 2025

Hello ​@Thomas Sjølshagen -san,

Thank you for the reply. I understand that the previous versions of the files cannot be retrieved. Therefore, we need to rename the file and upload it again in order to manage file versions.

Thank you.