You can retrieve list of projects.
Use the following cURL command to create a project. You can copy and paste the following template and replace the access_token, teamId, keyword, statuses, types, skip, and take.
curl --location --request POST 'https://datasaur.ai/graphql' \--header 'Authorization: Bearer access_token' \--header 'Content-Type: application/json' \--data-raw '{"query": "query GetProjectRecentsQuery($input: GetProjectsPaginatedInput!) {\n result: getProjects(input: $input) {\n totalCount\n nodes {\n ...ProjectRecentFragment\n __typename\n }\n pageInfo {\n nextCursor\n prevCursor\n __typename\n }\n __typename\n }\n}\nfragment ProjectRecentFragment on Project {\n id\n assignees {\n teamMember {\n id\n user {\n ...UserFragment\n __typename\n }\n __typename\n }\n __typename\n }\n createdDate\n isOwnerMe\n name\n status\n type\n updatedDate\n __typename\n}\nfragment UserFragment on User {\n id\n username\n name\n email\n profilePicture\n displayName\n __typename\n}","variables": {"input": {"filter": {"teamId": "1","keyword": "","statuses": ["COMPLETE"],"types": ["DOC"]},"page": {"take": 10,"skip": 0}}}}'
query use the value in the sample above.
variables
input
filter: this can be used to filter the project list.
teamId: Required. team's id that you want to retrieve the project from.
keyword: Optional. this field can be used for searching using project's name.
statuses: Optional. array of project's status. Possible status are
CREATED
IN_PROGRESS
COMPLETE
types: Optional. array of types. Possible type are
POS
NER
DEP
DOC
CONSTITUENCY
ABSA
COREF
OCR
page
take: number of projects that you want to retrieve in one api call.
skip: number of projects that you want to skip before retrieving new projects in one api call. This field can be used for pagination.
Here is the response you can expect after issuing the cURL command.
{"data": {"result": {"totalCount": 2,"nodes": [{"id": "qBRfR5utnQ3","assignees": [{"teamMember": {"id": "1","user": {"id": "1","username": null,"name": "User","email": "[email protected]","package": "FREE","profilePicture": "","displayName": "User","__typename": "User"},"__typename": "TeamMember"},"__typename": "ProjectAssignment"}],"createdDate": "2020-05-15T10:57:21.000Z","isOwnerMe": true,"name": "Project 1","status": "COMPLETE","type": "DOC","updatedDate": "2020-06-09T10:13:22.000Z","__typename": "Project"},{"id": "KHkCEbavYgk","assignees": [{"teamMember": {"id": "1","user": {"id": "1","username": null,"name": "User","email": "[email protected]","package": "FREE","profilePicture": "","displayName": "User","__typename": "User"},"__typename": "TeamMember"},"__typename": "ProjectAssignment"}],"createdDate": "2020-06-03T23:29:52.000Z","isOwnerMe": true,"name": "Project 2","status": "COMPLETE","type": "DOC","updatedDate": "2020-06-03T23:40:58.000Z","__typename": "Project"}],"pageInfo": {"nextCursor": null,"prevCursor": null,"__typename": "PageInfo"},"__typename": "ProjectPaginatedResponse"}},"extensions": {}}