photoprism-client-go/api/v1/index.go
Kris Nóva 94dde03103 Adding docs and ready for 1.0.0
Signed-off-by: Kris Nóva <kris@nivenly.com>
2021-02-11 18:04:53 -08:00

19 lines
426 B
Go

package api
// Index is used to sync the backend storage with
// the database meta information
//
// POST /api/v1/index
func (v1 *V1Client) Index() error {
resp := v1.POST(nil, "/api/v1/index")
return resp.Error
}
// CancelIndex can be used to attempt to cancel a running index
// operation
//
// DELETE /api/v1/index
func (v1 *V1Client) CancelIndex() error {
resp := v1.DELETE(nil, "/api/v1/index")
return resp.Error
}