Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re:WebAPI potentialActions, target URItemplate, specifying template parameters. #62

Open
smrgeoinfo opened this issue Sep 15, 2019 · 2 comments

Comments

@smrgeoinfo
Copy link

In the current examples from http://schema.org/docs/actions.html, the operations on a WebAPI are described using sdo:potentialAction. The discussion examples all use SearchAction as the value type. SearchAction has a query property, but none of the other Action subtypes has this property. It seems that there are other action subtypes that would logically be potential actions on a WebAPI, e.g. ControlAction, CreateAction, UpdateAction (aside--what about a DeleteAction???).

OK, now the Action has a target, which is where the URI for invoking the action is specified using sdo:EntryPoint/sdo:urlTemplate. The actions.html document indicates that the parameters in the template should be described using sdo:query-input, following a pattern -input to specify input parameters for a template value on some property. The problems: 1) what if I want to describe a different kind of Action on the WebAPI that doesn't have a query property and 2) WHY aren't the input values for the urlTemplate specified using sdo:urlTemplate-input??? After all, that is the property that we're substituting values into. Seems like the encoding should look like this (note I'm using the proposed valueOptions from schemaorg/schemaorg#176):

{
"potentialAction": [{
	"@type": "SearchAction",
	"name": "Download Multiple Instrument Data: all instruments",
	"description": "Download all instruments for past 24 hours.",
	"result": {
		"@type": "DataDownload",
		"encodingFormat": ["application/json", "application/geo+json"],
		"description":"for better interoperability and targeting software applications, 
need a more granular specification of the encoding that defines the JSON key vocabulary 
and semantics, vocabularies used to populate property values, and conventions for syntax."
	},
	"target": {
		"@type": "EntryPoint",
		"urlTemplate": "http://portal.chordsrt.com/api/v1/data{encoding}",
		"httpMethod": "GET",
		"contentType": ["application/json", "application/geo+json"],
		"urlTemplate-input": [{
				"@id": "http://portal.chordsrt.com/about/data_urls#encoding",
				"@type": "PropertyValueSpecification",
				"valueName": "encoding",
				"description": "The encoding format of the data",
				"valueRequired": false,
				"defaultValue": ".json",
				"valueOptions": [{
				  "@Type": "PropertyValue",
				  "value": ".json",
				  "description": "return results in json format; contentType application/json"
					}, {
				  "@Type": "PropertyValue",
				  "value": ".geojson",
				  "description": "return results in geojson format; contentType application/geo+json"
					}]}]}}]}
@RichardWallis RichardWallis transferred this issue from schemaorg/schemaorg Jul 13, 2020
@RichardWallis
Copy link

See issue #7 for the context of the move from the main Schema.org issue tracker to this repository.

@smrgeoinfo
Copy link
Author

So is http://schema.org/docs/actions.html brainstorming or are people actually supposed to use the recommendations there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants