Skip to main content
Keep the password and returned session out of shell arguments and logs. Store each in a mode-0600 file, then refer to those files from the command:
Delete the session file when the task is complete. ARCHIVESSPACE_PASSWORD and ARCHIVESSPACE_SESSION remain available for ephemeral process environments, but file references are safer for interactive shells and automation. API helpers accept:
  • --url for the API URL reachable inside the ArchivesSpace container
  • --session-file for the local file containing the session token
  • --query name=value for repeated query parameters
  • --data or --file for JSON request bodies on arbitrary requests
Use api request when you need a path that does not have a named shortcut:
The plugin resolves the active local or remote context, executes curl through the Docker API with an argv array, and sends the credential-bearing curl config over stdin. The token is never rendered into the logged Compose command or container process arguments.

Reference

api login

Authenticate to the ArchivesSpace backend API for the active site. The password is read from a local file or environment reference and sent to curl over stdin, so it is not placed in a shell command or process argument. The JSON response contains a session credential; redirect it to a protected file instead of allowing automation to capture it in logs.

api request

Call an arbitrary path on the ArchivesSpace backend API for the active site. The plugin executes curl inside the running ArchivesSpace container. Session credentials and request bodies are carried over stdin instead of a shell command. A --file path identifies a local JSON file read by sitectl. A literal --data value remains visible in the local sitectl process arguments, so use --file whenever a request body is confidential.