Inconsistent results when retrieving all streams via OSLC API
Hi,
I'm getting an inconsistent number of results when making a REST call to /gc/configuration?oslc.where=oslc_config:mutable=true&oslc.select=*. There are thousands of streams being returned, and I don't think that I'm able to page results. Is this a known issue, or is there something I can do to resolve this?
Cheers,
Kiko
3 answers
At the moment GCM does not support paging of query results, nor paging of Linked Data Platform Containers in general. See enhancement requests 449711: GCM OSLC query should support paging and 449712: GCM LPDCs should support paging.
You are asking for all properties of all streams at once. I strongly recommend you find ways to break down this potentially very large query into manageable pieces, using other properties of the streams such as the name, the component, or some other custom property.
btw, the URI you are using (/gc/configuration?) is not declared as an OSLC query capability. You should discover the supported URIs through the OSLC Service Provider Catalogs. The query capability URI for configurations for some specified project is in the form gcmContextRoot/oslc-query/configuration/projectAreaId; that would also have the benefit of breaking down your query per project.
Hi Kiko,
That URI is not an OSLC Query capability. It's an LDPC that covers all configurations of all project areas. The request is to report all properties of all streams across all project areas. That could be a very large amount of data.
GCM's OSLC Service Provider Catalog (gcContextRoot/oslc-config/catalog) is the way to discover query capabilities. It declares an OSLC service provider for each project area as described in the GCM API documentation at gcContextRoot/doc/scenario?id=Discovery, each of which declares an OSLC service with query capabilities for artifact types such as global components and global configurations.
The oslc_config:mutable property has been deprecated for several releases. If you want to query for global streams, then you should query on rdf:type. You can find API documentation on this at gcContextRoot/doc/scenario?id=QueryConfigurations.
Best regards,
David
David