Open App

Views

API endpoints for views

List saved views

GET /api/v1/views

Parameters

NameInTypeRequiredDescription
organizationIdquerystringNoOrganization scope id. Omit for token default; pass an empty value for personal scope where supported.
projectIdquerystringNo
entityTypequerystring (scout, asset, project, role, space, recur)No
limitqueryintegerNoMaximum number of items to return.
offsetqueryintegerNoNumber of items to skip.

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/views?organizationId=<organizationId>&projectId=<projectId>&entityType=<entityType>&limit=<limit>&offset=<offset>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "entityType": "string"
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: View[] }


Create saved view

POST /api/v1/views

Example request

curl -X POST \
"https://api.getpilfer.com/api/v1/views" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","organizationId":"string","projectId":"string","entityType":"scout"}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "name": "string",
    "entityType": "string"
  }
}

Other statuses: 400, 401, 403.

Response body type

{ data: View }


Get saved view

GET /api/v1/views/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/views/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "entityType": "string"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: View }


Update saved view

PATCH /api/v1/views/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X PATCH \
"https://api.getpilfer.com/api/v1/views/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","projectId":"string"}'

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "entityType": "string"
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: View }


Delete saved view

DELETE /api/v1/views/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X DELETE \
"https://api.getpilfer.com/api/v1/views/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {}
}

Other statuses: 401, 403, 404.

Response body type

{ data: DeleteResult }