API: Favorites

Methods

Favorite project

Adds the project to the current user’s favorites.

This endpoint is deprecated and replaced by /api/v3/workspaces/{id}/favorite

id
integer

required path

Project id

Example:
1

204

Returned if the project was successfully added to favorites.

404

Returned if the project does not exist or the client does not have sufficient permissions to see it.

Required permission: view project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

403

Returned if the client does not have sufficient permissions.

Required permission: logged in

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not authorized to access this resource."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

Unfavorite project

Removes the project from the current user’s favorites.

This endpoint is deprecated and replaced by /api/v3/workspaces/{id}/favorite

id
integer

required path

Project id

Example:
1

204

Returned if the project was successfully removed from favorites.

404

Returned if the project does not exist or the client does not have sufficient permissions to see it.

Required permission: view project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

403

Returned if the client does not have sufficient permissions.

Required permission: logged in

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not authorized to access this resource."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

Favorite workspace

Adds the workspace to the current user’s favorites.

id
integer

required path

Workspace id

Example:
1

204

Returned if the workspace was successfully added to favorites.

404

Returned if the workspace does not exist or the client does not have sufficient permissions to see it.

Required permission: view workspace

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

403

Returned if the client does not have sufficient permissions.

Required permission: logged in

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not authorized to access this resource."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

Unfavorite workspace

Removes the workspace from the current user’s favorites.

id
integer

required path

Workspace id

Example:
1

204

Returned if the workspace was successfully removed from favorites.

404

Returned if the workspace does not exist or the client does not have sufficient permissions to see it.

Required permission: view workspace

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The requested resource could not be found."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}

403

Returned if the client does not have sufficient permissions.

Required permission: logged in

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",
  "message": "You are not authorized to access this resource."
}
{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
  "message": "Project can't be blank.",
  "_embedded": {
    "details": {
      "attribute": "project"
    }
  }
}
{
  "type": "object",
  "required": [
    "_type",
    "errorIdentifier",
    "message"
  ],
  "properties": {
    "_embedded": {
      "type": "object",
      "properties": {
        "details": {
          "type": "object",
          "properties": {
            "attribute": {
              "type": "string"
            }
          }
        }
      }
    },
    "_type": {
      "type": "string",
      "enum": [
        "Error"
      ]
    },
    "errorIdentifier": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "examples": [
    {
      "_type": "Error",
      "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",
      "message": "Project can't be blank.",
      "_embedded": {
        "details": {
          "attribute": "project"
        }
      }
    }
  ]
}