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

ParameterTypeRequiredDescription
editor

IRI

JSON representation of an IRI object.

trueAn editor value.

IRI Type Object

Attribute

Type

Comment

uriStringThe string value of the URI. URIs must contain a colon ':' and must not contain any whitespaces.

Request Attributes

JsonCreateResourceRequest

AttributeType
graphString
labelLiteral
propertyString
suffixString
typesArray 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

AttributeTypeComment
contextIRIGraph uri
priorityintGraph priority for adding of new resource
readOnlybooleanTrue 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

AttributeType
contextString
uriString

Example Response

{
  "context" : "some context",
  "uri" : "https://semantic-web.com/api/uri#17623"
}