/project

A project represents a collection of items, where an item can be a document, a term, a report or a mypage tab.

This part of the documentation only handles one single project at the time. To view what operations that works with several projects at once view the projects part of the documentation.

All the requests to the /project endpoints needs to resolve a project. This is done using either a combination of description and projectType parameters, or with a specific projectRef. The projectRef has the format 15_123.

There are currently 3 different types of Projects:

Table of Contents #

GET /project #

Lists all the items in a project.

It is also possible to filter the items in project with a datefilter. It will then check when each item was added to the project and only return those items which suites the filter.

This currently only works for project of type scrapbook and EntityList. The project type MyPageTab will currently return an empty set of items.

Request

GET /project

Parameters

toDate : The date should be supplied in the following format: 2013-11-11 11:11. All items that were added before the given date will be returned.

fromDate : The date should be supplied in the following format: 2013-11-11 11:11. All items that were added after the given date will be returned.

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: This api request project?projectRef=15_123 will produce:

{
    TotalCount: 3,
    Description: "Farlig lista1",
    Items: [
        {
            PublicationDate: "2012-08-03T07:11:00Z",
            CreatedDate: "2012-08-03T07:58:45Z",
            Publisher: "Tulsa World",
            Language: "en",
            SourceUrl: "http://www.tulsaworld.com/site/articlepath.aspx?articleid=20120803_206_A13_Hrtefr810681&rss_lnk=11",
            IndexOrder: 76299497,
            ContributingUserId: 0,
            SilobreakerUrl: "https://my.silobreaker.com/5_2265880652438044823",
            Id: "5_2265880652438044823",
            Description: "Jay Cronley: Oklahoma weather takes us from freezer to frying pan",
            Type: "Article",
            LocalizedType: "Article",
            LastUpdated: "0001-01-01T00:00:00"
        },
        {
            PublicationDate: "2012-11-21T06:48:00Z",
            CreatedDate: "2012-11-21T12:03:39Z",
            Publisher: "Nwt.se",
            Language: "sv",
            SourceUrl: "http://nwt.se/asikter/insandare/article1205646.ece",
            IndexOrder: 91323772,
            ContributingUserId: 0,
            SilobreakerUrl: "https://my.silobreaker.com/5_2266131312098148500",
            Id: "5_2266131312098148500",
            Description: "Nätavgifterna är oskäliga",
            Type: "Article",
            LocalizedType: "Article",
            LastUpdated: "0001-01-01T00:00:00"
        },
        {
            PublicationDate: "2012-11-29T08:39:00Z",
            CreatedDate: "2012-11-29T11:18:11Z",
            Publisher: "NDTV",
            Language: "en",
            SourceUrl: "http://ndtv.com.feedsportal.com/c/33805/f/606693/s/261556b5/l/0Lgadgets0Bndtv0N0Cshortlink0Baspx0Darticle0F298851/story01.htm",
            IndexOrder: 92301872,
            ContributingUserId: 0,
            SilobreakerUrl: "https://my.silobreaker.com/5_2266149032059469834",
            Id: "5_2266149032059469834",
            Description: "Yahoo CEO Marissa Mayer bets big on mobile future",
            Type: "Article",
            LocalizedType: "Article",
            LastUpdated: "0001-01-01T00:00:00"
        }
    ],
    LastUpdated: "2013-11-06T16:27:24Z"
}

GET /project/share #

DEPRECATED.

Projects can be shared with other users in the system. Currently the only share mechanism that is implemented through this api request, is to resolve the sl a secure link code.

Request

GET /project/share

Parameters

sl : The secure link that should to be resolved. This data is generated through MyLists/Docslist/MyPage pages when a user has chosen to share a project.

Response

Example: This api request project/share?sl=1231562y35513416 will produce:

{
    Projects: [
        {
            UserName: "halif",
            OwnerDisplayName: "halif",
            ProjectRef: "15_2772",
            ProjectType: "Scrapbook",
            Description: "newcollection",
            WriteAccess: true
        }
    ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/delete #

Deletes a project.

Deleting a project can have one of the following two effects. If the current user is not the owner of the project the delete operation will remove the access for this user to the project. However if this user is the owner of the project, it will be deleted and everyone who has it shared to them will loose the connection to it.

Request

GET /project/delete

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: This api request project/delete?projectRef=15_11 will produce:

{
    Success: true,
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/access #

Gets who has access to the project.

A owner of a project can find out who has access to the project. This request will list which users and usergroups who has access.

Request

GET /project/access

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: This api request project/access?projectRef=15_1231 will produce:

{
    UserAccess: {
        martinsb: "write"
    },
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/clone #

Clones a project.

This request makes a copy of a project, it'll take all the data from the project and copy them over to a new project. Currently the project type MyPageTab will not copy any data. Cloning a project makes the current user to the owner of the project.

Request

GET /project/clone

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

withSubscription : A true/false flag to indicate if the clone should subscribe on changes from the original project.

Response

Example: This api request project/clone?projectRef=15_123 will produce:

{
    Projects: [
        {
            UserName: "halif",
            OwnerDisplayName: "halif",
            ProjectRef: "15_2833",
            ProjectType: "Scrapbook",
            Description: "Copy of Positive Stuff",
            WriteAccess: true
        }
    ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/setDescription #

Sets the description of a project.

Currently projects of the same type can't have the same description. The exception is though projects of the type MyPageTab. The reason for this is because there is a short command when writing queries. It is possible to use doclist: or mylist: prefixes.

Description can only have characters and numbers. If there are invalid characters in the description a 500 error will be returned.

Request

GET /project/setDescription

Parameters

description : The new name of the project.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: This api request project/setdescription?projectref=15_2833&description=Api%20Description%20Test&type=json will produce:

{
    Projects: [
        {
            UserName: "halif",
            OwnerDisplayName: "halif",
            ProjectRef: "15_2833",
            ProjectType: "Scrapbook",
            Description: "Api Description Test",
            WriteAccess: true
        }
    ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/add #

Create a new project.

To create a new project a project type must be specified and the description of the project must be unique.

Request

GET /project/add/{projectType}/
GET /project/add/

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

Response

Example: This api request project/add?projecttype=scrapbook&description=Api%20Add%20project&type=json will produce:

{
    Projects: [
        {
            UserName: "halif",
            OwnerDisplayName: "halif",
            ProjectRef: "15_2834",
            ProjectType: "Scrapbook",
            Description: "Api Add project",
            WriteAccess: true
        }
    ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/addItems #

Add one or more items to the project.

It can be added either through a specific itemRef or a specific query that gives back one or more items.

Request

GET /project/addItems

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

itemRefs : A comma separated list of ids. An id has the following format 11_240886, an example of a list of itemRefs 11_240886,11_239564,11_23312356.

q : A search string that will match one or several items. This parameter works better with the autocomplete parser. Which gives out queries in the form of person:Barack Obama.

Response

Example: This api request project/additems?projectref=15_2834&projecttype=scrapbook&q=person:barack%20obama&type=json will produce:

{
    TotalCount: 1,
    Description: "Api Add project",
    Items: [
        {
            EntityReference: "barack-obama-11_240886",
            Id: "11_240886",
            Description: "Barack Obama",
            Type: "Person",
            LocalizedType: "Person",
            LastUpdated: "0001-01-01T00:00:00"
        }
    ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/removeItem #

Remove items from the project.

If it succeeds the result will return the list of remaining items in the project. Currently removeItem and removeItems does the same thing with the exception that removeItems can remove several items at once.

Request

GET /project/removeItem

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

itemRef : The id of the item. An id has the following format 11_240886.

Response

Example: This api request project/removeitem?projectref=15_2834&projecttype=scrapbook&itemref=11_240886&type=json will produce:

{
    TotalCount: 0,
    Description: "Api Add project",
    Items: [ ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/removeItems #

Remove items from the project.

If it succeeds the result will return the remaining list of items in the project. Currently removeItem and removeItems does the same thing with the exception that removeItems can remove several items at once. To remove several items the parameter itemRefs needs to be a list of item refs separated with comma.

Request

GET /project/removeItems

Parameters

description : The name of the project to get the data from. If description is used the projectType parameter must be added. To determine which project is specified.

projectType : The type of project to resolve. This needs to work in combination with the description parameter.

projectRef : The Id to resolve the project, it should be in the following format 15_11.

itemRefs : The ids of the items in a comma separated list. An id has the following format 11_240886.

Response

Example: This api request project/removeitems?projectref=15_2834&projecttype=scrapbook&itemrefs=11_240886,11_235&type=json will produce:

{
    TotalCount: 0,
    Description: "Api Add project",
    Items: [ ],
    LastUpdated: "0001-01-01T00:00:00"
}

GET /project/export #

Exports a project to one of the following formats: xml, rtf, docx, html.

Request

GET /project/export

Parameters

projectId : Project id without itemclass. i.e 235

projectRef : ProjectId with itemclass. i.e 15_235

exportFormat : the output format type. Available types are xml, html, rtf, docx.

Response

Example: The query project/export?projectref=15_694&type=html will produce a html File.

GET /project/subscribe #

Subscribes to changes in a project shared to you.

It is possible to subscribe to changes from other projects as long as you have access to the project you want to subscribe to.

Initially it will add all the items that the distributor has and then it will setup a link between the distributor and the subscriber to receive any further updates. This includes both deletes and additions.

Request

GET /project/subscribe

Parameters

subscriber : ProjectId of the project that should receive the changes, the subscriber.

distributor (optional) : ProjectId of the project that should distribute the changes, the distributor. If no distributor is specified then the parent project will be set as a distributor.

Response

Example: The query project/subscribe?subscriber=694&type=json will produce:

{
    Projects: [
        {
            UserName: "Linden",
            OwnerDisplayName: "Officer Linden",
            ProjectRef: "15_185",
            ProjectType: "EntityList",
            Description: "Suspects",
            WriteAccess: true,
            RSSDigestedUrl: "https://my.localsb.net/api/search/documents/?type=atom10&q=itemref:15_185&apikey=mync5w445k727f8k14x3&digest=XWLC8fuYn8ilzE06V5QyOZrxXi4%3d",
            ShareState: "readonly",
            LastUpdated: "2010-06-24T08:28:19Z"
        }
    ]
}

GET /project/unsubscribe #

Unsubscribe to changes from a project.

Given that there is a subscribe set up it will remove it. The project items will stay the same but it will not receive any further updates. If it failed to find a link between the specific project and the distributor ´success´ will be ´false´.

Request

GET /project/unsubscribe

Parameters

projectRef : The Id to resolve the project, it should be in the following format 15_11.

distributor : ProjectId of the project that distribute the changes, the distributor.

Response

Example: The query project/unsubscribe?type=json&projectref=15_3168&distributor=185 will produce:

{
    Success: true,
}

GET /project/distributors #

Gets a list of distributors connected to a specific project.

A distributor is something that a project can subscribe changes from.

Request

GET /project/distributors

Parameters

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: The query project/distributors?type=json&projectref=15_3168&distributor=185 will produce:

{
    Projects: [
        {
            UserName: "Linden",
            OwnerDisplayName: "Officer Linden",
            ProjectRef: "15_185",
            ProjectType: "EntityList",
            Description: "Suspects",
            WriteAccess: true,
            RSSDigestedUrl: "https://my.localsb.net/api/search/documents/?type=atom10&q=itemref:15_185&apikey=mync5w445k727f8k14x3&digest=XWLC8fuYn8ilzE06V5QyOZrxXi4%3d",
            ShareState: "readonly",
            LastUpdated: "2010-06-24T08:28:19Z"
        }
    ]
}

GET /project/subscribers #

Gets a list of subscribers connected to a specific project.

A subscriber is something that this specific project will send changes to.

Request

GET /project/subscribers

Parameters

projectRef : The Id to resolve the project, it should be in the following format 15_11.

Response

Example: The query project/subscribers?type=json&projectref=15_3168&distributor=185 will produce:

{
    Projects: [
        {
            UserName: "Holden",
            OwnerDisplayName: "Officer Holden",
            ProjectRef: "15_185",
            ProjectType: "EntityList",
            Description: "Suspects",
            WriteAccess: true,
            RSSDigestedUrl: "https://my.localsb.net/api/search/documents/?type=atom10&q=itemref:15_185&apikey=mync5w445k727f8k14x3&digest=XWLC8fuYn8ilzE06V5QyOZrxXi4%3d",
            ShareState: "readonly",
            LastUpdated: "2010-06-24T08:28:19Z"
        }
    ]
}

Documentation generated by mdoc.