API: Query Filter Instance Schema

A QueryFilterInstanceSchema is a Schema specifically for describing QueryFilterInstances. Because the behaviour of FilterInstances, with regards to the values property, differs from one another depending on the chosen Filter, the QueryFilterInstanceSchema explicitly lists the dependencies in its _dependencies property. As the property causing the difference is the selected Filter, that property is linked. Apart from that, a QueryFilterInstanceSchema has the same structure a Schema does.

Linked Properties

Link Description Type Constraints Supported operations
self This QueryFilterInstanceSchema (same as for schema) QueryFilterInstanceSchema not null READ
filter The filter for which this schema is specific Filter not null READ

Local Properties

Property Description Type Constraints Supported operations
name Describes the name attribute Field schema not null READ
filter QuerySortBy name Field schema not null READ

Methods

List query filter instance schemas for project

Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project.

id
integer

required path

Project id

Example:
1

200

OK

{
  "_embedded": {
    "elements": [
      {
        "_dependencies": [
          {
            "_type": "SchemaDependency",
            "dependencies": {
              "/api/v3/queries/operators/!": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              },
              "/api/v3/queries/operators/!*": {
              },
              "/api/v3/queries/operators/*": {
              },
              "/api/v3/queries/operators/=": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              }
            },
            "on": "operator"
          }
        ],
        "_links": {
          "filter": {
            "href": "/api/v3/queries/filters/assignee",
            "title": "Assignee"
          },
          "self": {
            "href": "/api/v3/queries/filter_instance_schemas/assignee"
          }
        },
        "_type": "QueryFilterInstanceSchema",
        "filter": {
          "_links": {
          },
          "hasDefault": false,
          "name": "Filter",
          "required": true,
          "type": "QueryFilter",
          "writable": true
        },
        "name": {
          "hasDefault": true,
          "name": "Name",
          "required": true,
          "type": "String",
          "writable": false
        }
      },
      {
        "_dependencies": [
          {
            "_type": "SchemaDependency",
            "dependencies": {
              "/api/v3/queries/operators/!": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              },
              "/api/v3/queries/operators/=": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              }
            },
            "on": "operator"
          }
        ],
        "_links": {
          "filter": {
            "href": "/api/v3/queries/filters/author",
            "title": "Author"
          },
          "self": {
            "href": "/api/v3/queries/filter_instance_schemas/author"
          }
        },
        "_type": "QueryFilterInstanceSchema",
        "filter": {
          "_links": {
          },
          "hasDefault": false,
          "name": "Filter",
          "required": true,
          "type": "QueryFilter",
          "writable": true
        },
        "name": {
          "hasDefault": true,
          "name": "Name",
          "required": true,
          "type": "String",
          "writable": false
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "/api/v3/projects/42/queries/filter_instance_schemas"
    }
  },
  "_type": "Collection",
  "count": 2,
  "total": 2
}

Query_Filter_Instance_Schemas_For_ProjectModel

{
  "type": "object",
  "example": {
    "_type": "Collection",
    "total": 2,
    "count": 2,
    "_embedded": {
      "elements": [
        {
          "_type": "QueryFilterInstanceSchema",
          "_dependencies": [
            {
              "_type": "SchemaDependency",
              "on": "operator",
              "dependencies": {
                "/api/v3/queries/operators/=": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!*": {
                },
                "/api/v3/queries/operators/*": {
                }
              }
            }
          ],
          "name": {
            "type": "String",
            "name": "Name",
            "required": true,
            "hasDefault": true,
            "writable": false
          },
          "filter": {
            "type": "QueryFilter",
            "name": "Filter",
            "required": true,
            "hasDefault": false,
            "writable": true,
            "_links": {
            }
          },
          "_links": {
            "self": {
              "href": "/api/v3/queries/filter_instance_schemas/assignee"
            },
            "filter": {
              "href": "/api/v3/queries/filters/assignee",
              "title": "Assignee"
            }
          }
        },
        {
          "_type": "QueryFilterInstanceSchema",
          "_dependencies": [
            {
              "_type": "SchemaDependency",
              "on": "operator",
              "dependencies": {
                "/api/v3/queries/operators/=": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                }
              }
            }
          ],
          "name": {
            "type": "String",
            "name": "Name",
            "required": true,
            "hasDefault": true,
            "writable": false
          },
          "filter": {
            "type": "QueryFilter",
            "name": "Filter",
            "required": true,
            "hasDefault": false,
            "writable": true,
            "_links": {
            }
          },
          "_links": {
            "self": {
              "href": "/api/v3/queries/filter_instance_schemas/author"
            },
            "filter": {
              "href": "/api/v3/queries/filters/author",
              "title": "Author"
            }
          }
        }
      ]
    },
    "_links": {
      "self": {
        "href": "/api/v3/projects/42/queries/filter_instance_schemas"
      }
    }
  }
}

403

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

Required permission: view work package in any project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",
  "message": "You are not authorized to access this resource."
}

List query filter instance schemas

Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project.

No parameters

200

OK

{
  "_embedded": {
    "elements": [
      {
        "_dependencies": [
          {
            "_type": "SchemaDependency",
            "dependencies": {
              "/api/v3/queries/operators/!": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              },
              "/api/v3/queries/operators/!*": {
              },
              "/api/v3/queries/operators/*": {
              },
              "/api/v3/queries/operators/=": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              }
            },
            "on": "operator"
          }
        ],
        "_links": {
          "filter": {
            "href": "/api/v3/queries/filters/assignee",
            "title": "Assignee"
          },
          "self": {
            "href": "/api/v3/queries/filter_instance_schemas/assignee"
          }
        },
        "_type": "QueryFilterInstanceSchema",
        "filter": {
          "_links": {
          },
          "hasDefault": false,
          "name": "Filter",
          "required": true,
          "type": "QueryFilter",
          "writable": true
        },
        "name": {
          "hasDefault": true,
          "name": "Name",
          "required": true,
          "type": "String",
          "writable": false
        }
      },
      {
        "_dependencies": [
          {
            "_type": "SchemaDependency",
            "dependencies": {
              "/api/v3/queries/operators/!": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              },
              "/api/v3/queries/operators/=": {
                "values": {
                  "_links": {
                  },
                  "hasDefault": false,
                  "name": "Values",
                  "required": true,
                  "type": "[]User",
                  "writable": true
                }
              }
            },
            "on": "operator"
          }
        ],
        "_links": {
          "filter": {
            "href": "/api/v3/queries/filters/author",
            "title": "Author"
          },
          "self": {
            "href": "/api/v3/queries/filter_instance_schemas/author"
          }
        },
        "_type": "QueryFilterInstanceSchema",
        "filter": {
          "_links": {
          },
          "hasDefault": false,
          "name": "Filter",
          "required": true,
          "type": "QueryFilter",
          "writable": true
        },
        "name": {
          "hasDefault": true,
          "name": "Name",
          "required": true,
          "type": "String",
          "writable": false
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "/api/v3/queries/filter_instance_schemas"
    }
  },
  "_type": "Collection",
  "count": 2,
  "total": 2
}

Query_Filter_Instance_SchemasModel

{
  "type": "object",
  "example": {
    "_type": "Collection",
    "total": 2,
    "count": 2,
    "_embedded": {
      "elements": [
        {
          "_type": "QueryFilterInstanceSchema",
          "_dependencies": [
            {
              "_type": "SchemaDependency",
              "on": "operator",
              "dependencies": {
                "/api/v3/queries/operators/=": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!*": {
                },
                "/api/v3/queries/operators/*": {
                }
              }
            }
          ],
          "name": {
            "type": "String",
            "name": "Name",
            "required": true,
            "hasDefault": true,
            "writable": false
          },
          "filter": {
            "type": "QueryFilter",
            "name": "Filter",
            "required": true,
            "hasDefault": false,
            "writable": true,
            "_links": {
            }
          },
          "_links": {
            "self": {
              "href": "/api/v3/queries/filter_instance_schemas/assignee"
            },
            "filter": {
              "href": "/api/v3/queries/filters/assignee",
              "title": "Assignee"
            }
          }
        },
        {
          "_type": "QueryFilterInstanceSchema",
          "_dependencies": [
            {
              "_type": "SchemaDependency",
              "on": "operator",
              "dependencies": {
                "/api/v3/queries/operators/=": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                },
                "/api/v3/queries/operators/!": {
                  "values": {
                    "type": "[]User",
                    "name": "Values",
                    "required": true,
                    "hasDefault": false,
                    "writable": true,
                    "_links": {
                    }
                  }
                }
              }
            }
          ],
          "name": {
            "type": "String",
            "name": "Name",
            "required": true,
            "hasDefault": true,
            "writable": false
          },
          "filter": {
            "type": "QueryFilter",
            "name": "Filter",
            "required": true,
            "hasDefault": false,
            "writable": true,
            "_links": {
            }
          },
          "_links": {
            "self": {
              "href": "/api/v3/queries/filter_instance_schemas/author"
            },
            "filter": {
              "href": "/api/v3/queries/filters/author",
              "title": "Author"
            }
          }
        }
      ]
    },
    "_links": {
      "self": {
        "href": "/api/v3/queries/filter_instance_schemas"
      }
    }
  }
}

403

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

Required permission: view work package in any project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",
  "message": "You are not authorized to access this resource."
}

View query filter instance schema

Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter.

id
string

required path

QueryFilterInstanceSchema identifier. The identifier is the filter identifier.

Example:
author

200

OK

{
  "_dependencies": [
    {
      "_type": "SchemaDependency",
      "dependencies": {
        "/api/v3/queries/operators/!": {
          "values": {
            "_links": {
            },
            "hasDefault": false,
            "name": "Values",
            "required": true,
            "type": "[]User",
            "writable": true
          }
        },
        "/api/v3/queries/operators/=": {
          "values": {
            "_links": {
            },
            "hasDefault": false,
            "name": "Values",
            "required": true,
            "type": "[]User",
            "writable": true
          }
        }
      },
      "on": "operator"
    }
  ],
  "_links": {
    "filter": {
      "href": "/api/v3/queries/filters/author",
      "title": "Author"
    },
    "self": {
      "href": "/api/v3/queries/filter_instance_schemas/author"
    }
  },
  "_type": "QueryFilterInstanceSchema",
  "filter": {
    "_links": {
    },
    "hasDefault": false,
    "name": "Filter",
    "required": true,
    "type": "QueryFilter",
    "writable": true
  },
  "name": {
    "hasDefault": true,
    "name": "Name",
    "required": true,
    "type": "String",
    "writable": false
  }
}

Query_Filter_Instance_SchemaModel

{
  "type": "object",
  "required": [
    "name",
    "filter"
  ],
  "properties": {
    "name": {
      "type": "field schema",
      "description": "Describes the name attribute",
      "readOnly": true
    },
    "filter": {
      "type": "field schema",
      "description": "QuerySortBy name"
    },
    "_links": {
      "type": "object",
      "required": [
        "self",
        "filter"
      ],
      "properties": {
        "self": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "This QueryFilterInstanceSchema (same as for schema)\n\n**Resource**: QueryFilterInstanceSchema",
              "readOnly": true
            }
          ]
        },
        "filter": {
          "allOf": [
            {
              "$ref": "#/components/schemas/Link"
            },
            {
              "description": "The filter for which this schema is specific\n\n**Resource**: Filter",
              "readOnly": true
            }
          ]
        }
      }
    }
  },
  "example": {
    "_type": "QueryFilterInstanceSchema",
    "_dependencies": [
      {
        "_type": "SchemaDependency",
        "on": "operator",
        "dependencies": {
          "/api/v3/queries/operators/=": {
            "values": {
              "type": "[]User",
              "name": "Values",
              "required": true,
              "hasDefault": false,
              "writable": true,
              "_links": {
              }
            }
          },
          "/api/v3/queries/operators/!": {
            "values": {
              "type": "[]User",
              "name": "Values",
              "required": true,
              "hasDefault": false,
              "writable": true,
              "_links": {
              }
            }
          }
        }
      }
    ],
    "name": {
      "type": "String",
      "name": "Name",
      "required": true,
      "hasDefault": true,
      "writable": false
    },
    "filter": {
      "type": "QueryFilter",
      "name": "Filter",
      "required": true,
      "hasDefault": false,
      "writable": true,
      "_links": {
      }
    },
    "_links": {
      "self": {
        "href": "/api/v3/queries/filter_instance_schemas/author"
      },
      "filter": {
        "href": "/api/v3/queries/filters/author",
        "title": "Author"
      }
    }
  }
}

403

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

Required permission: view work package in any project

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",
  "message": "You are not authorized to access this resource."
}

404

Returned if the QueryFilterInstanceSchema does not exist.

{
  "_type": "Error",
  "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",
  "message": "The specified query does not exist."
}