Project viewers


Use this REST API to administer and edit project viewers. With this resource, it's possible to retrieve, create, assign project, delete project viewers and also make other actions possible in WebWork account.
Below we provide an example of the data which is required for each scenario.

GET All project viewers


You can get all the project viewers in your workspace with the following URL request

Copy codeGEThttps://www.webwork-tracker.com/rest-api/project-viewers

The response returns a json format. Below you can see an example of response structure.

                Copy code
                [
                    {
                        "id": "{id}"
                        "firstname": "{firstname}"
                        "lastname": "{lastname}"
                        "email": "{email}"
                        "status": "{status}"
                        "member_since": {member_since}
                        "projects": [{projects}]
                    },
                    {...}
                ]
            

GET One project viewer


If you need to get information regarding a specific project viewer, you need to add the {id} at the end of the URL, or {email}

Copy codeGEThttps://www.webwork-tracker.com/rest-api/project-viewers/{id}
Copy codeGEThttps://www.webwork-tracker.com/rest-api/project-viewers?email={email}

The response returns a json format. Below you can see an example of response structure.

                Copy code
                {
                        "id": "{id}"
                        "firstname": "{firstname}"
                        "lastname": "{lastname}"
                        "email": "{email}"
                        "status": "{status}"
                        "member_since": {member_since}
                        "projects": [{projects}]
                }
            

POST Invite project viewer


You can invite a new project viewer using POST method and adding all necessary parameters to request body

Copy codePOSThttps://www.webwork-tracker.com/rest-api/project-viewers

The list of parameters you can give to body

Property name Type Is required
email string YES
firstname string YES
lastname string YES

The list of available values you can see below

The returned response includes a success property which contains your request success value.

                Copy code
                {
                    "success": "{success_of_the_request}"
                }
            

POST Assign project to project viewer


You can assign a new project to project viewer using POST method and adding all necessary parameters to request body

Copy codePOSThttps://www.webwork-tracker.com/rest-api/project-viewers/assign-project

The list of parameters you can give to body

Property name Type Is required
project_viewer_id string YES
project_id string YES

The list of available values you can see below

The returned response includes a success property which contains your request success value.

                Copy code
                {
                    "success": "{success_of_the_request}"
                }
            

DELETE Archive project viewer


You can archive a project viewer by sending DELETE request to the following URL.
It will remove the project viewer from the workspace members list and put it to archived members list.

See an example below

Copy codeDELETEhttps://www.webwork-tracker.com/rest-api/project-viewers/{id}

The returned response includes a success property which contains your request success value.

                Copy code
                {
                    "success": "{success_of_the_request}"
                }
            

GET Restore project viewer


If you want to restore a project viewer, you will need to send GET request to the URL mentioned below and add {id} at the end of it

Copy codeGEThttps://www.webwork-tracker.com/rest-api/project-viewers/restore/{id}

The returned response includes a success property which contains your request success value.

                Copy code
                {
                    "success": "{success_of_the_request}"
                }