Web Service Method: Create a New Resource
Description |
---|
Create and configure a new resource in a GraphEditor. |
URL: /PoolParty/api/editor/{project}/createResource
Supported Methods |
---|
POST |
Content-Type
application/json
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
editor | IRI JSON representation of an IRI object. | true | An editor value. |
IRI Type Object
Attribute | Type | Comment |
---|---|---|
uri | String | The string value of the URI. URIs must contain a colon ':' and must not contain any whitespaces. |
Request Attributes
JsonCreateResourceRequest
Attribute | Type |
---|---|
graph | String |
label | Literal |
property | String |
suffix | String |
types | Array of String |
Example IRI
{ "uri" : "https://semantic-web.com/api/uri#5233" }
Example of JsonCreateResourceRequest
{ "types" : [ "https://semantic-web.com/api/types#24760", "https://semantic-web.com/api/types#19772", "https://semantic-web.com/api/types#10069" ], "property" : "https://semantic-web.com/api/property#9930", "label" : { "language" : "en-us", "label" : "Label 18573" }, "suffix" : "some suffix", "graph" : "some graph" }
JsonGraphRequest
Attribute | Type | Comment |
---|---|---|
context | IRI | Graph uri |
priority | int | Graph priority for adding of new resource |
readOnly | boolean | True only if graph can be used for lookup. False if new resources can be created in this graph |
Example of JsonGraphRequest
{ "context" : { "uri" : "https://semantic-web.com/api/context#26767" }, "readOnly" : true, "priority" : 28780 }
Response
Content-Type
application/json
CreateResponse Object
Attribute | Type |
---|---|
context | String |
uri | String |
Example Response
{ "context" : "some context", "uri" : "https://semantic-web.com/api/uri#17623" }