Open App

Spaces

API endpoints for spaces

List spaces

GET /api/v1/spaces

Parameters

NameInTypeRequiredDescription
organizationIdquerystringNoOrganization scope id. Omit for token default; pass an empty value for personal scope where supported.
projectIdquerystringNo
includequerystringNoComma-separated relation names to hydrate, or all.
limitqueryintegerNoMaximum number of items to return.
offsetqueryintegerNoNumber of items to skip.

Example request

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

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "projectId": "string",
      "status": "string",
      "priority": "string"
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: Space[] }


Create space

POST /api/v1/spaces

Example request

curl -X POST \
"https://api.getpilfer.com/api/v1/spaces" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","organizationId":"string","projectId":"string","status":"Draft","priority":"urgent","currentStrength":0}'

Example response

Status: 201

{
  "data": {
    "_id": "string",
    "name": "string",
    "projectId": "string",
    "status": "string",
    "priority": "string"
  }
}

Other statuses: 400, 401, 403.

Response body type

{ data: Space }


Get space

GET /api/v1/spaces/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id
includequerystringNoComma-separated relation names to hydrate, or all.

Example request

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

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "projectId": "string",
    "status": "string",
    "priority": "string"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Space }


Update space

PATCH /api/v1/spaces/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

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

Example response

Status: 200

{
  "data": {
    "_id": "string",
    "name": "string",
    "projectId": "string",
    "status": "string",
    "priority": "string"
  }
}

Other statuses: 400, 401, 403, 404.

Response body type

{ data: Space }


Delete space

DELETE /api/v1/spaces/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesConvex document id

Example request

curl -X DELETE \
"https://api.getpilfer.com/api/v1/spaces/<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 }