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

Request Parameters

Parameter

Type

Required

Description

editor

IRI

JSON representation of an IRI object.

true

An editor value.

https://vocabulary.semantic-web.at/PoolParty/api/editor/{projectId}/createResource?editor=rdfEditor:123456

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" : [ "http://vocabulary.semantic-web.at/cocktail-ontology/Ingredients", "http://vocabulary.semantic-web.at/cocktail-ontology/Alcoholic-Beverages" ],
  "property" : "http://www.w3.org/2004/02/skos/core#prefLabel",
  "label" : {
    "language" : "en-us",
    "label" : "New Ingredient"
  },
  "suffix" : "",
  "graph" : "http://yourGraph"
}

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"
}