GET /types
Get a list of user's PROV types, i.e., Entities, Agents, and Activities.
Types are returned as a typePage
. A user may have more than one page of types. See the pageToken
query parameter for details. See GET /documents/{docId}/types
for restricting returned types to those declared in a particular document.
Request
Query Parameters
pageToken
(optional)- If omitted, the first page of types will be returned. If the user has created more types than will fit in a single page the response will contain a
nextPage
property. This value can be passed aspageToken
to get the next page of results. The final page will have nonextPage
property. creatorId
(optional)- An admin can includes this in the query string to get another user's types.
Header Parameters
Accept
application/json
Response
Body
{ "typePage": { "pageToken": "0", "nextToken": "10", "types": [ { "id": "1048576", "name": "ENTITY", "provId": "http://www.example.org/article" }, { "id": "1048577", "name": "ENTITY", "provId": "http://www.example.org/dataset1" }, { "id": "1048578", "name": "ENTITY", "provId": "http://www.example.org/regionList" }, { "id": "1048579", "name": "ENTITY", "provId": "http://www.example.org/composition1" }, { "id": "1048580", "name": "ENTITY", "provId": "http://www.example.org/chart1" }, { "id": "1048599", "name": "ENTITY", "provId": "dataSet2" }, { "id": "1048600", "name": "ENTITY", "provId": "chart2" }, { "id": "1048605", "name": "ENTITY", "provId": "http://www.example.org/instructions" }, { "id": "1048614", "name": "ENTITY", "provId": "http://example.org/quoteInBlogEntry-20130326" }, { "id": "1048616", "name": "ENTITY", "provId": "http://www.example.org/articleV1" } ] } }
GET /types/{typeId}
Get the details of a type. This will include the type's attributes and info about the document in which it was declared.
Request
Path Parameters
typeId
- The
type.id
of the desired type.
Query Parameters
name
- The
type.name
of the desired type. For example,ENTITY
.
Header Parameters
Accept
application/json
Response
Body
{ "typeDetail": { "id": "10476", "name": "ENTITY", "provId": "http://www.example.org/article", "attributes": [ { "id": "81900", "name": "http://purl.org/dc/terms/title", "value": "Crime rises in cities" } ], "declaringDocuments": [ { "id": "4081", "version": 1, "name": "primer-prov-xml-examples-tz", "creator": "user123", "creatorId": 21, "createTime": "2016-11-14T16:30:36Z", "description": "test 2016-11-14" } ] } }
GET /types/{typeId}/relations
Get info about the relations in which a type takes part. See /relations
for more detail about services related to relations.
Request
Path Parameters
typeId
- The
type.id
of the desired type.
Query Parameters
name
- The
type.name
of the desired type. For example,ENTITY
.
Header Parameters
Accept
application/json
Response
Body
{ "relationList": { "relations": [ { "id": "907230", "name": "DERIVATION", "subject": { "name": "generatedEntity", "provId": "http://example.org/quoteInBlogEntry-20130326" }, "object": { "name": "usedEntity", "provId": "http://www.example.org/article" }, "secondaryObject": { "name": "activity" } }, { "id": "907232", "name": "SPECIALIZATION", "subject": { "name": "specificEntity", "provId": "http://www.example.org/articleV1" }, "object": { "name": "generalEntity", "provId": "http://www.example.org/article" } }, { "id": "907234", "name": "SPECIALIZATION", "subject": { "name": "specificEntity", "provId": "http://www.example.org/articleV2" }, "object": { "name": "generalEntity", "provId": "http://www.example.org/article" } } ] } }
GET /types/provid
Search for types by PROV identifier.
Types have a type.id
which is unique and a PROV identifier which is not. For example, if the same document is uploaded twice by a user, then all the types declared in the document will be stored twice. The type.id
s will be different, but each pair of types will share a PROV identifier. This service can be used to look up all types with a given PROV identifier. It will return all the type.id
s that share the given PROV identifier grouped by type.name
.
Request
Query Parameters
provId
- The PROV identifier to search on.
Header Parameters
Accept
application/json
Response
Body
{ "provIdSearchResult": { "provId": "http://www.example.org/article", "types": { "ENTITY": [ "97191", "108576" ] } } }