# Update spotlight query

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

> Updates a query.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"prod-4.0.142-g7651a22a"},"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":{"$ref":"#/components/schemas/UpdateSpotlight"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSpotlight"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSpotlight"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpotlightQuery"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"UpdateSpotlight":{"type":"object","properties":{"name":{"type":"string"},"template":{"type":"string"},"rqlFilter":{"type":"string"},"scope":{"type":"string"},"moduleId":{"type":"string"},"moduleCode":{"type":"string"}},"additionalProperties":false},"SpotlightQuery":{"type":"object","properties":{"id":{"type":"string"},"audit":{"type":"object","allOf":[{"$ref":"#/components/schemas/Audit"}]},"$meta":{"type":"object","allOf":[{"$ref":"#/components/schemas/Metadata"}]},"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":[{"$ref":"#/components/schemas/Scope"}]}},"additionalProperties":false},"Audit":{"type":"object","properties":{"created":{"type":"object","allOf":[{"$ref":"#/components/schemas/Event"}]},"updated":{"type":"object","allOf":[{"$ref":"#/components/schemas/Event"}]}},"additionalProperties":false},"Event":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/Identity"}]}},"additionalProperties":false},"Identity":{"type":"object","properties":{"id":{"type":"string"},"audit":{"type":"object","allOf":[{"$ref":"#/components/schemas/Audit"}]},"$meta":{"type":"object","allOf":[{"$ref":"#/components/schemas/Metadata"}]},"name":{"type":"string"},"icon":{"type":"string","nullable":true}},"additionalProperties":false},"Metadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"Scope":{"enum":["None","Client","Vendor","Operations","All"],"type":"string"},"ProblemDetails":{"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":{}}}}}
```
