Datasaur
Search…
Get List of Projects
You can retrieve list of projects.

cURL

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.
1
curl --location --request POST 'https://datasaur.ai/graphql' \
2
--header 'Authorization: Bearer access_token' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"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}",
6
"variables": {
7
"input": {
8
"filter": {
9
"teamId": "1",
10
"keyword": "",
11
"statuses": [
12
"COMPLETE"
13
],
14
"types": [
15
"DOC"
16
],
17
"tags": [
18
"TagID1"
19
],
20
"labelerTeamMemberIds": [
21
"1"
22
],
23
"daysCreatedRange": {
24
"newestDate": "2020-06-04T01:00:00.000Z",
25
"oldestDate": "2020-06-03T23:00:00.000Z"
26
},
27
},
28
"page": {
29
"take": 10,
30
"skip": 0
31
}
32
}
33
}
34
}'
Copied!
    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
          tags: Optional. _**_this field can be used for searching using tag id.
          labelerTeamMemberIds: Optional. array of team member id. This field can be used for searching using labeler team member ids.
          reviewerTeamMemberIds: Optional. array of team member id. This field can be used for searching using reviewer team member ids.
          daysCreatedRange: Optional. can be used for searching projects by it's creation date
            newestDate: Required. string in ISO-8601 format YYYY-MM-DDTHH:mm:ss.sssZ
            oldestDate: Optional. string in ISO-8601 format YYYY-MM-DDTHH:mm:ss.sssZ
        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.
📌You can easily find the teamID in the URL. For the example below, the teamID is 1500.

Response

Here is the response you can expect after issuing the cURL command.
1
{
2
"data": {
3
"result": {
4
"totalCount": 2,
5
"nodes": [
6
{
7
"id": "qBRfR5utnQ3",
8
"assignees": [
9
{
10
"teamMember": {
11
"id": "1",
12
"user": {
13
"id": "1",
14
"username": null,
15
"name": "User",
16
"email": "[email protected]",
17
"package": "FREE",
18
"profilePicture": "",
19
"displayName": "User",
20
"__typename": "User"
21
},
22
"__typename": "TeamMember"
23
},
24
"__typename": "ProjectAssignment"
25
}
26
],
27
"createdDate": "2020-05-15T10:57:21.000Z",
28
"isOwnerMe": true,
29
"name": "Project 1",
30
"status": "COMPLETE",
31
"type": "DOC",
32
"updatedDate": "2020-06-09T10:13:22.000Z",
33
"__typename": "Project"
34
},
35
{
36
"id": "KHkCEbavYgk",
37
"assignees": [
38
{
39
"teamMember": {
40
"id": "1",
41
"user": {
42
"id": "1",
43
"username": null,
44
"name": "User",
45
"email": "[email protected]",
46
"package": "FREE",
47
"profilePicture": "",
48
"displayName": "User",
49
"__typename": "User"
50
},
51
"__typename": "TeamMember"
52
},
53
"__typename": "ProjectAssignment"
54
}
55
],
56
"createdDate": "2020-06-03T23:29:52.000Z",
57
"isOwnerMe": true,
58
"name": "Project 2",
59
"status": "COMPLETE",
60
"type": "DOC",
61
"updatedDate": "2020-06-03T23:40:58.000Z",
62
"__typename": "Project"
63
}
64
],
65
"pageInfo": {
66
"nextCursor": null,
67
"prevCursor": null,
68
"__typename": "PageInfo"
69
},
70
"__typename": "ProjectPaginatedResponse"
71
}
72
},
73
"extensions": {}
74
}
Copied!
Last modified 2mo ago
Copy link
Contents
cURL
Response