Project Service
Create binary document
Creates a new binary based document in the system. A document is a piece of content with multiple versions and can
be created in draft mode; though this endpoint does not expost that functionality. After a document is created it
can be retrieved in the listing of all documents in the container it was created in or it can be retrieved
directly by the URI provided in the response.
The subject of the document must be specified and the maximum length of the subject is limited
to 255 characters. Additionally, the subject of a document must be unique within the container it is created in
there is no means ahead of time to check if a document exists with the given subject but an error will result if
the created resource's subject will duplicate another document's title in the container.
POST http://domain:port/application_context/api/core/v2/projects/{id}/binaryDocuments
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the id of the container in which the document will be created. | |
Post Payload
Name | Type | Description | Default Value |
---|
body | MultipartBody | the the multi-part body that contains the subject and binary body | |
Response
Type | Description |
---|
Response | a HTTP 201 response including the URL for the new document in the Location header. |
Create discussion
Creates a disucssion with the given subject and body. The container the discussion is created in is the container
pointed to with the given identifier. The discussion is created with the authenticated user as the author.
POST http://domain:port/application_context/api/core/v2/projects/{id}/discussions
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the id of the container in which the discussion is being posted | |
Form Parameters
Name | Type | Description | Default Value |
---|
subject | String | the subject of the newly created discussion. | |
html | DocumentParam | the content of the newly created discussion. | |
question | Boolean | flag indicating whether the discussion is a question or not. May be omitted in which case the system default is used. | |
attachmentURIs | Set | any URIs for the attachments which are to be attached to the discussion | |
Response
Type | Description |
---|
Response | a HTTP 201 response including the URL for the new discussion in the Location header |
Example
Form Parameter Payload
subject=Jru4ArAwnELsaBpcFRDP&html=ysyBVsUpc6cQl98FNsumyItYkp9Wom
Create document
Creates a new HTML based document in the system. A document is a piece of content with multiple versions and can
be created in draft mode; though this endpoint does not expost that functionality. After a document is created it
can be retrieved in the listing of all documents in the container it was created in or it can be retrieved
directly by the URI provided in the response.
POST http://domain:port/application_context/api/core/v2/projects/{id}/documents
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the id of the container in which the document will be created. | |
Form Parameters
Name | Type | Description | Default Value |
---|
subject | String | the subject of the document. It must be specified and the maximum length of the subject is limited
to 255 characters. Additionally, the subject of a document must be unique within the container it is created in
there is no means ahead of time to check if a document exists with the given subject but an error will result if
the created resource's subject will duplicate another document's title in the container. | |
html | DocumentParam | HTML for the created document. | |
attachmentURIs | Set | any URIs for the attachments which are to be attached to the document. | |
Response
Type | Description |
---|
Response | a HTTP 201 response including the URL for the new document in the Location header. |
Follow
Start following the specified container.
POST http://domain:port/application_context/api/core/v2/projects/{id}/followers
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the container to follow. | |
Response
Type | Description |
---|
Response | a HTTP 201 response including the URL for the subscription in the Location header |
Get activities
GET http://domain:port/application_context/api/core/v2/projects/{id}/activities?after=String&before=String&limit=int&type=Set
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Query Parameters
Name | Type | Description | Default Value |
---|
after | String | | "" |
before | String | | "" |
limit | int | | "25" |
type | Set | | |
Get content
Returns all content in the container. Only content types which are supported in the specified container are
returned.
GET http://domain:port/application_context/api/core/v2/projects/{id}/content?offset=int&limit=int&q=String
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the unique identifier for the container which is being returned. | |
Query Parameters
Name | Type | Description | Default Value |
---|
offset | int | used while paginating through results to specify the number of results to skip before the first
retult in the returned result. | "0" |
limit | int | the maximum number of items to return. If there are fewer items available then limit then the lesser
number of items will be returned. The default value is 25 and the maximum is 1000. | "25" |
q | String | can be used to search across all content in the container with the given query string. | |
Get discussions
Returns a collection of discussions in a particular container. The discussions are sorted by their creation date
from newest to oldest and can be iterated through utilizing the date parameters since and until. Discussions
will only be returned if the authenticated user has both permission to view the container and permission to view
discussions in the container. Attempting to retrieve discussions for a container which the user does not have
access to will result in an
UNAUTHORIZED response.
When the discussions in the container are being searched the ordering of the returned discussions is by relevance
as opposed to by date.
GET http://domain:port/application_context/api/core/v2/projects/{id}/discussions?limit=int&after=String&before=String&q=String&offset=int
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the container for which the discussions are going to be returned. | |
Query Parameters
Name | Type | Description | Default Value |
---|
limit | int | the most dicussions which will be returned from this call. If there are fewer discussions available
in the given time period, if either before or after is provided, then fewer discussions will be returned then the
limit. | "25" |
after | String | disucssions newer than the date provided. So if the limit is 5 then the first 5 discussions created
after the provided date will be returned. The provided date is required to be formatted in
ISO 8601 format. | |
before | String | discussions older than the date provided. For a limit of 5 then the first 5 discussions created
before the provided date will be returned. The provided date is required to be formatted in
ISO 8601 format. | |
q | String | when provided, will search the discussions in the container using the given query. | |
offset | int | used in conjuction with query and paginating through discussions related to a search. | "0" |
Response
Type | Description |
---|
EntityCollection | a collection of discussions in the requested container ordered by the date they were created. |
Example
JSON Response Payload
{
"data" : [ {
"message" : {
"content" : {
"type" : "text",
"body" : "vpN7jU6yrJV991aTTgRaossuuyRR24L6gwCOVCg4daJvsRAdL8RDY1HQBw8wxnCNcQOpGxCx17DM010pnG6cXVNN0tezkD5AVboDNgKCylB5JGY5tmvU7T6e4lWvfCoM21TDMO70CMGRFhQV4yPaCqgoKR3803JacC2JQQdbDTIgeLPfk0rbXxD6Ata72625cr20H4FRCOroHaAVnksFmiBsJB051FC6gWWdaza74w5cGqZrbrcwmxbop7UabVE"
},
"status" : "published",
"subject" : "ZCRVSOzDltsWiQzgzyNd",
"id" : 1007,
"type" : 2,
"creationDate" : "2010-08-02T17:57:45.960+0000",
"modificationDate" : "2010-08-02T17:57:45.960+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/messages/1007"
}
},
"replyCount" : 0,
"status" : "published",
"subject" : "ZCRVSOzDltsWiQzgzyNd",
"author" : {
"username" : "user-5bbpvrjql1t4ctbs",
"id" : 2023,
"type" : 3,
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/2023",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"id" : 1006,
"type" : 1,
"creationDate" : "2010-08-02T17:57:45.960+0000",
"modificationDate" : "2010-08-02T17:57:45.960+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/discussions/1006",
"messages" : "http://localhost:50001/oc/v1/discussions/1006/messages"
}
}, {
"message" : {
"content" : {
"type" : "text",
"body" : "tIk1KodH7BTCL3ZOTH6W41ARDAugI9gCT4B2XwGdoT2p106n3f8jbIpzA7RVrjIXIK6HFvs2uN2DvnY2QmQP4J69AqeWndlmT4UsKvfwwrAKey7JLQZ0SOL3lFF3FhxhVMqJxZOebdjNPSaV4qJQZeP3qq3PB0uS318Y6qKItpSQerJuwOxmbCKGZGNYy2MuJCNrTVmFI3J2NKbVqPmxLStM7wymvBJqhswhvQsrUGUBrWKXecgCkoQqfIv7FIP"
},
"status" : "published",
"subject" : "H3sDt7NUbEL4t0CX14ZB",
"id" : 1006,
"type" : 2,
"creationDate" : "2010-08-02T17:57:45.945+0000",
"modificationDate" : "2010-08-02T17:57:45.945+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/messages/1006"
}
},
"replyCount" : 0,
"status" : "published",
"subject" : "H3sDt7NUbEL4t0CX14ZB",
"author" : {
"username" : "user-oaobo2rqpudqopfc",
"id" : 2022,
"type" : 3,
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/2022",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"id" : 1005,
"type" : 1,
"creationDate" : "2010-08-02T17:57:45.945+0000",
"modificationDate" : "2010-08-02T17:57:45.945+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/discussions/1005",
"messages" : "http://localhost:50001/oc/v1/discussions/1005/messages"
}
} ],
"links" : {
"next" : "http://localhost:50001/oc/v1/spaces/2053/discussions?limit=5&before=2010-08-02T17%253A57%253A45.888%252B0000",
"previous" : "http://localhost:50001/oc/v1/spaces/2053/discussions?limit=5&after=2010-08-02T17%253A57%253A45.960%252B0000"
}
}
Get documents
Returns a collection of documents in a particular container. The documents are sorted by their creation date
from newest to oldest and can be iterated through utilizing the date parameters since and until. Documents
will only be returned if the authenticated user has both permission to view the container and permission to view
documents in the container. Attempting to retrieve documents for a container which the user does not have
access to will result in an
UNAUTHORIZED response.
When the documents in the container are being searched the ordering of the returned documents is by relevance
as opposed to by date.
GET http://domain:port/application_context/api/core/v2/projects/{id}/documents?limit=int&after=String&before=String&q=String&offset=int
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the container for which the documents are going to be returned. | |
Query Parameters
Name | Type | Description | Default Value |
---|
limit | int | the most dicussions which will be returned from this call. If there are fewer documents available
in the given time period, if either before or after is provided, then fewer documents will be returned then the
limit. | "25" |
after | String | disucssions newer than the date provided. So if the limit is 5 then the first 5 documents created
after the provided date will be returned. The provided date is required to be formatted in
ISO 8601 format. | |
before | String | documents older than the date provided. For a limit of 5 then the first 5 documents created
before the provided date will be returned. The provided date is required to be formatted in
ISO 8601 format. | |
q | String | when provided, will search the documents in the container using the given query. | |
offset | int | used in conjuction with query and paginating through documents related to a search. | "0" |
Response
Type | Description |
---|
EntityCollection | a collection of documents in the requested container ordered by the date they were created |
Example
JSON Response Payload
{
"data" : [ {
"content" : {
"type" : "text/html",
"text" : "<body><!-- [DocumentBodyStart:2a06ccd8-b084-4724-a867-2572ab3d20d3] --><div class=\"jive-rendered-content\"><p>body-1282673665356</p></div><!-- [DocumentBodyEnd:2a06ccd8-b084-4724-a867-2572ab3d20d3] --></body>"
},
"status" : "published",
"subject" : "title-1282673665356",
"author" : {
"name" : "Administrator",
"username" : "admin",
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/1",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"replyCount" : 0,
"likeCount" : 0,
"creationDate" : "2010-08-24T18:14:25.356+0000",
"modificationDate" : "2010-08-24T18:14:25.360+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/documents/1004",
"container" : "http://localhost:50001/oc/v1/spaces/2061"
}
}, {
"content" : {
"type" : "text/html",
"text" : "<body><!-- [DocumentBodyStart:4e89abc7-0832-4ff3-9e76-71f8d7733fab] --><div class=\"jive-rendered-content\"><p>body-1282673665345</p></div><!-- [DocumentBodyEnd:4e89abc7-0832-4ff3-9e76-71f8d7733fab] --></body>"
},
"status" : "published",
"subject" : "title-1282673665345",
"author" : {
"name" : "Administrator",
"username" : "admin",
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/1",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"replyCount" : 0,
"likeCount" : 0,
"creationDate" : "2010-08-24T18:14:25.345+0000",
"modificationDate" : "2010-08-24T18:14:25.349+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/documents/1003",
"container" : "http://localhost:50001/oc/v1/spaces/2061"
}
}, {
"content" : {
"type" : "text/html",
"text" : "<body><!-- [DocumentBodyStart:94e41926-e8d5-49ee-bed1-5539d95d535f] --><div class=\"jive-rendered-content\"><p>body-1282673665334</p></div><!-- [DocumentBodyEnd:94e41926-e8d5-49ee-bed1-5539d95d535f] --></body>"
},
"status" : "published",
"subject" : "title-1282673665334",
"author" : {
"name" : "Administrator",
"username" : "admin",
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/1",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"replyCount" : 0,
"likeCount" : 0,
"creationDate" : "2010-08-24T18:14:25.334+0000",
"modificationDate" : "2010-08-24T18:14:25.338+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/documents/1002",
"container" : "http://localhost:50001/oc/v1/spaces/2061"
}
}, {
"content" : {
"type" : "text/html",
"text" : "<body><!-- [DocumentBodyStart:1cb6e8aa-b09e-479c-9a01-ba14d3591026] --><div class=\"jive-rendered-content\"><p>body-1282673665322</p></div><!-- [DocumentBodyEnd:1cb6e8aa-b09e-479c-9a01-ba14d3591026] --></body>"
},
"status" : "published",
"subject" : "title-1282673665322",
"author" : {
"name" : "Administrator",
"username" : "admin",
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/1",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"replyCount" : 0,
"likeCount" : 0,
"creationDate" : "2010-08-24T18:14:25.322+0000",
"modificationDate" : "2010-08-24T18:14:25.327+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/documents/1001",
"container" : "http://localhost:50001/oc/v1/spaces/2061"
}
}, {
"content" : {
"type" : "text/html",
"text" : "<body><!-- [DocumentBodyStart:7db9cb40-9e20-4bac-91f7-686f6a55a8e5] --><div class=\"jive-rendered-content\"><p>body-1282673665224</p></div><!-- [DocumentBodyEnd:7db9cb40-9e20-4bac-91f7-686f6a55a8e5] --></body>"
},
"status" : "published",
"subject" : "title-1282673665224",
"author" : {
"name" : "Administrator",
"username" : "admin",
"links" : {
"alt" : "http://localhost:50001/oc/v1/users/1",
"avatar" : "http://localhost:50001/oc/v1/avatars/default"
}
},
"replyCount" : 0,
"likeCount" : 0,
"creationDate" : "2010-08-24T18:14:25.224+0000",
"modificationDate" : "2010-08-24T18:14:25.281+0000",
"links" : {
"alt" : "http://localhost:50001/oc/v1/documents/1000",
"container" : "http://localhost:50001/oc/v1/spaces/2061"
}
} ],
"links" : {
"next" : "http://localhost:50001/oc/v1/spaces/2061/documents?limit=5&before=2010-08-24T18%253A14%253A25.224%252B0000",
"previous" : "http://localhost:50001/oc/v1/spaces/2061/documents?limit=5&after=2010-08-24T18%253A14%253A25.356%252B0000"
}
}
Get follower
Check if the user is following the specified container
GET http://domain:port/application_context/api/core/v2/projects/{id}/followers/{userId}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the container to check for followers. | |
userId | long | the id of the follower to check for | |
Response
Type | Description |
---|
UserSummary | the user summary for the user if the user is following and a HTTP 404 response if the user is not
following. |
Get project
GET http://domain:port/application_context/api/core/v2/projects/{id}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Get projects
GET http://domain:port/application_context/api/core/v2/projects?offset=int&limit=int
Query Parameters
Name | Type | Description | Default Value |
---|
offset | int | | "0" |
limit | int | | "25" |
Get projects
GET http://domain:port/application_context/api/core/v2/projects/{id}/projects?limit=int&after=String&before=String
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Query Parameters
Name | Type | Description | Default Value |
---|
limit | int | | "25" |
after | String | | |
before | String | | |
Share
POST http://domain:port/application_context/api/core/v2/projects/{id}/share
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | | |
Unfollow
Stop following the specified container
DELETE http://domain:port/application_context/api/core/v2/projects/{id}/followers/{userId}
Path Parameters
Name | Type | Description | Default Value |
---|
id | long | the identifier of the container. | |
userId | long | the id of the following user to be removed. | |