{ "swagger": "2.0", "info": { "title": "Action API", "description": "An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument\/role. See also blog post and Actions overview document.", "termsOfService": "http:\/\/apievangelist.com\/terms-of-service.html", "version": "v1" }, "host": "action.example.com", "basePath": "\/", "schemes": ["http"], "produces": ["application\/json"], "paths": { "\/action\/": { "get": { "summary": "Get Action", "description": "Returns Action", "operationId": "getAction", "parameters": [{ "name": "q", "in": "query", "description": "Keyword search for item", "required": false, "type": "string" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/Action" } } } }, "tags": ["Action"] }, "post": { "summary": "Add Action", "description": "Add Action", "operationId": "addAction", "parameters": [{ "name": "actionstatus", "in": "formData", "description": "Indicates the current disposition of the Action.", "required": false, "type": "actionstatustype" }, { "name": "additionaltype", "in": "formData", "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "required": false, "type": "url" }, { "name": "agent", "in": "formData", "description": "The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book.", "required": false, "type": "person or organization" }, { "name": "alternatename", "in": "formData", "description": "An alias for the item.", "required": false, "type": "text" }, { "name": "description", "in": "formData", "description": "A short description of the item.", "required": false, "type": "text" }, { "name": "endtime", "in": "formData", "description": "The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "required": false, "type": "datetime" }, { "name": "error", "in": "formData", "description": "For failed actions, more information on the cause of the failure.", "required": false, "type": "thing" }, { "name": "image", "in": "formData", "description": "An image of the item. This can be a URL or a fully described ImageObject.", "required": false, "type": "url or imageobject" }, { "name": "instrument", "in": "formData", "description": "The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.", "required": false, "type": "thing" }, { "name": "interactiontype", "in": "formData", "description": "The Action representing the type of interaction. For up votes, +1s, etc. use LikeAction. For down votes use DislikeAction. Otherwise, use the most specific Action. ", "required": false, "type": "interactioncounter" }, { "name": "location", "in": "formData", "description": "The location of for example where the event is happening, an organization is located, or where an action takes place.", "required": false, "type": "text or place or postaladdress" }, { "name": "mainentityofpage", "in": "formData", "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "required": false, "type": "creativework or url" }, { "name": "name", "in": "formData", "description": "The name of the item.", "required": false, "type": "text" }, { "name": "object", "in": "formData", "description": "The object upon the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\\'t). e.g. John read *a book*.", "required": false, "type": "thing" }, { "name": "participant", "in": "formData", "description": "Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*.", "required": false, "type": "person or organization" }, { "name": "potentialaction", "in": "formData", "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "required": false, "type": "action" }, { "name": "result", "in": "formData", "description": "The result produced in the action. e.g. John wrote *a book*.", "required": false, "type": "thing" }, { "name": "sameas", "in": "formData", "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "required": false, "type": "url" }, { "name": "starttime", "in": "formData", "description": "The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "required": false, "type": "datetime" }, { "name": "target", "in": "formData", "description": "Indicates a target EntryPoint for an Action.", "required": false, "type": "entrypoint" }, { "name": "url", "in": "formData", "description": "URL of the item.", "required": false, "type": "url" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/Action" } } } }, "tags": ["Action"] } }, "\/action\/{id}\/": { "get": { "summary": "Get Action", "description": "Returns a single Action", "operationId": "getAction", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/Action" } } } }, "tags": ["Action"] }, "put": { "summary": "Update Action", "description": "Update a single Action", "operationId": "updateActionItem", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }, { "name": "actionstatus", "in": "formData", "description": "Indicates the current disposition of the Action.", "required": false, "type": "actionstatustype" }, { "name": "additionaltype", "in": "formData", "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "required": false, "type": "url" }, { "name": "agent", "in": "formData", "description": "The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book.", "required": false, "type": "person or organization" }, { "name": "alternatename", "in": "formData", "description": "An alias for the item.", "required": false, "type": "text" }, { "name": "description", "in": "formData", "description": "A short description of the item.", "required": false, "type": "text" }, { "name": "endtime", "in": "formData", "description": "The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "required": false, "type": "datetime" }, { "name": "error", "in": "formData", "description": "For failed actions, more information on the cause of the failure.", "required": false, "type": "thing" }, { "name": "image", "in": "formData", "description": "An image of the item. This can be a URL or a fully described ImageObject.", "required": false, "type": "url or imageobject" }, { "name": "instrument", "in": "formData", "description": "The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.", "required": false, "type": "thing" }, { "name": "interactiontype", "in": "formData", "description": "The Action representing the type of interaction. For up votes, +1s, etc. use LikeAction. For down votes use DislikeAction. Otherwise, use the most specific Action. ", "required": false, "type": "interactioncounter" }, { "name": "location", "in": "formData", "description": "The location of for example where the event is happening, an organization is located, or where an action takes place.", "required": false, "type": "text or place or postaladdress" }, { "name": "mainentityofpage", "in": "formData", "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "required": false, "type": "creativework or url" }, { "name": "name", "in": "formData", "description": "The name of the item.", "required": false, "type": "text" }, { "name": "object", "in": "formData", "description": "The object upon the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\\'t). e.g. John read *a book*.", "required": false, "type": "thing" }, { "name": "participant", "in": "formData", "description": "Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*.", "required": false, "type": "person or organization" }, { "name": "potentialaction", "in": "formData", "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "required": false, "type": "action" }, { "name": "result", "in": "formData", "description": "The result produced in the action. e.g. John wrote *a book*.", "required": false, "type": "thing" }, { "name": "sameas", "in": "formData", "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "required": false, "type": "url" }, { "name": "starttime", "in": "formData", "description": "The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "required": false, "type": "datetime" }, { "name": "target", "in": "formData", "description": "Indicates a target EntryPoint for an Action.", "required": false, "type": "entrypoint" }, { "name": "url", "in": "formData", "description": "URL of the item.", "required": false, "type": "url" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/Action" } } } }, "tags": ["Action"] }, "delete": { "summary": "Action", "description": "Deletes a single Action", "operationId": "deleteAction", "parameters": [{ "name": "id", "in": "path", "description": "Unique id for item", "required": true, "type": "integer" }], "responses": { "200": { "description": "A successful response.", "schema": { "type": "array", "items": { "$ref": "#\/definitions\/Action" } } } }, "tags": ["Action"] } } }, "definitions": { "Action": { "properties": { "actionstatus": { "description": "Indicates the current disposition of the Action.", "type": "actionstatustype" }, "additionaltype": { "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the \\'typeof\\' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "type": "url" }, "agent": { "description": "The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book.", "type": "person or organization" }, "alternatename": { "description": "An alias for the item.", "type": "text" }, "description": { "description": "A short description of the item.", "type": "text" }, "endtime": { "description": "The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "type": "datetime" }, "error": { "description": "For failed actions, more information on the cause of the failure.", "type": "thing" }, "image": { "description": "An image of the item. This can be a URL or a fully described ImageObject.", "type": "url or imageobject" }, "instrument": { "description": "The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.", "type": "thing" }, "interactiontype": { "description": "The Action representing the type of interaction. For up votes, +1s, etc. use LikeAction. For down votes use DislikeAction. Otherwise, use the most specific Action. ", "type": "interactioncounter" }, "location": { "description": "The location of for example where the event is happening, an organization is located, or where an action takes place.", "type": "text or place or postaladdress" }, "mainentityofpage": { "description": "Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See background notes for details. Inverse property: mainEntity.", "type": "creativework or url" }, "name": { "description": "The name of the item.", "type": "text" }, "object": { "description": "The object upon the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn\\'t). e.g. John read *a book*.", "type": "thing" }, "participant": { "description": "Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*.", "type": "person or organization" }, "potentialaction": { "description": "Indicates a potential Action, which describes an idealized action in which this thing would play an \\'object\\' role.", "type": "action" }, "result": { "description": "The result produced in the action. e.g. John wrote *a book*.", "type": "thing" }, "sameas": { "description": "URL of a reference Web page that unambiguously indicates the item\\'s identity. E.g. the URL of the item\\'s Wikipedia page, Freebase page, or official website.", "type": "url" }, "starttime": { "description": "The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December.Note that Event uses startDate\/endDate instead of startTime\/endTime, even when describing dates with times. This situation may be clarified in future revisions.", "type": "datetime" }, "target": { "description": "Indicates a target EntryPoint for an Action.", "type": "entrypoint" }, "url": { "description": "URL of the item.", "type": "url" } } } } }