User Tools

Site Tools


config:stash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:stash [2025/08/10 19:18] Wuffconfig:stash [2025/08/30 00:01] (current) – [api] Wuff
Line 165: Line 165:
  
 https://github.com/stashapp/stash/issues/3918 https://github.com/stashapp/stash/issues/3918
 +
 +
 +<code>
 +#If API authentication is required, add the following to the curl commands:
 +-H "ApiKey: YOUR_API_KEY_HERE" \
 +</code>
 +
 +<code>
 +# Metadata Scan of a particular directory
 +curl -X POST http://192.168.1.2:9998/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{
 +    "query": "mutation MetadataScan($paths: [String!]!) { metadataScan(input: { paths: $paths }) }",
 +    "variables": {
 +      "paths": ["/data/stash-temp"]
 +    }
 +  }'
 +
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{
 +    "query": "mutation { scanMetadata(input: { paths: [\"/path/to/your/folder\"] generateCovers: true generatePreviews: true generateSprites: true generatePhashes: true }) }"
 +  }'
 +</code>
 +
 +
 +<code>
 +# Full Metadata Scan
 +curl -X POST http://localhost:9998/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "mutation { metadataScan(input: {}) }"}'
 +
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "mutation { scanMetadata(input: { generateCovers: true generatePreviews: true generateSprites: true generatePhashes: true }) }"}'
 +
 +</code>
 +
 +Show status:
 +<code>
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "{ metadataScanStatus { status progress } }"}'
 +</code>
 +
 +Show status until done:
 +<code>
 +while true; do
 +  curl -s -X POST http://localhost:9999/graphql \
 +    -H "Content-Type: application/json" \
 +    -d '{"query": "{ metadataScanStatus { status progress } }"}' \
 +  | jq '.data.metadataScanStatus';
 +  sleep 5;
 +done
 +</code>
 +
  
  
Line 440: Line 496:
     #merge_scenes_with_same_filename(STASH_SCHEME, STASH_HOST, STASH_PORT, DELETE, DRYRUN, FILE)     #merge_scenes_with_same_filename(STASH_SCHEME, STASH_HOST, STASH_PORT, DELETE, DRYRUN, FILE)
 </code> </code>
 +
 +
config/stash.1754849923.txt.gz · Last modified: by Wuff