# Update Spotlight Query

## PUT /public/v1/spotlight/queries/{id}

> Updates a query.

OpenAPI:

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"prod-4.0.104-g76805994"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/spotlight/queries/{id}":{"put":{"tags":["SpotlightQueries"],"summary":"Updates a query.","parameters":[{"name":"id","in":"path","description":"id of entity","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string"},"rqlFilter":{"type":"string"},"scope":{"type":"string"},"moduleId":{"type":"string"},"moduleCode":{"type":"string"}},"additionalProperties":false}},"text/json":{"schema":{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/requestBody/content/application~1json/schema/properties"},"additionalProperties":false}},"application/*+json":{"schema":{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/requestBody/content/application~1json/schema/properties"},"additionalProperties":false}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"audit":{"type":"object","allOf":[{"type":"object","properties":{"created":{"allOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/responses/201/content/application~1json/schema/properties/audit/allOf/0/properties"},"additionalProperties":false}]},"$meta":{"allOf":[{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true}},"additionalProperties":false}],"nullable":true}},"additionalProperties":false}],"nullable":true},"updated":{"allOf":[{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/responses/201/content/application~1json/schema/properties/audit/allOf/0/properties/created/allOf/0/properties"},"additionalProperties":false}],"nullable":true}},"additionalProperties":false}]},"$meta":{"type":"object","allOf":[{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/responses/201/content/application~1json/schema/properties/audit/allOf/0/properties/created/allOf/0/properties/by/allOf/0/properties/$meta/allOf/0/properties"},"additionalProperties":false}]},"name":{"type":"string"},"template":{"type":"string"},"invalidationInterval":{"type":"string","format":"date-span","nullable":true},"invalidateOnDateChange":{"type":"boolean","nullable":true},"filter":{"type":"string"},"scope":{"type":"string","allOf":[{"enum":["None","Client","Vendor","Operations","All"],"type":"string"}]}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/responses/400/content/application~1json/schema/properties"},"additionalProperties":{"$ref":"#/paths/~1public~1v1~1spotlight~1queries~1{id}/put/responses/400/content/application~1json/schema/additionalProperties"}}}}}}}}}}
```
