#!/bin/sh

# start scan
 curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJjY2FsaWZpY2UiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NDE5NTY3OTN9.UWTnuuWhw0mFNQVWcXCer-NA8IyipxoGx0VieHW7XRQ" \
  -H "Content-Type: application/json" \
  --data '{"operationName":"MetadataScan","variables":{"input":{"scanGenerateCovers":true,"scanGeneratePreviews":true,"scanGenerateImagePreviews":false,"scanGenerateSprites":false,"scanGeneratePhashes":false,"scanGenerateThumbnails":true,"scanGenerateClipPreviews":true}},"query":"mutation MetadataScan($input: ScanMetadataInput!) {\n  metadataScan(input: $input)\n}"}' \
  localhost:9999/graphql


# clean

 curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJjY2FsaWZpY2UiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NDE5NTY3OTN9.UWTnuuWhw0mFNQVWcXCer-NA8IyipxoGx0VieHW7XRQ" \
  -H "Content-Type: application/json" \
  --data '{"operationName":"MetadataClean","variables":{"input":{"dryRun":false}},"query":"mutation MetadataClean($input: CleanMetadataInput!) {\n  metadataClean(input: $input)\n}"}' \
  localhost:9999/graphql
