Currently this has initial support for object management. Please also see the following links:
POST /object/{containerId}
containerId(required): The ID of the container to upload the object to
publicKey(required): The public key of the container owner
X-r(required): The (bigInt) r - the integer retrieved from the signature
X-s(required): The (bigInt) s - the integer retrieved from the signature
Content-Type: multipart/form-dataCurrently only multipart/form-data is supported (max. size is 32MB)
NB. The payload should be multipart/form-data.
Content: {objectId}
Content: error message defining issue with request
Content: Issue with the session (recreate the signature)
Content: Issue with the payload (the payload was not of the correct content-type)
GET /object/{containerId}
containerId(required): The ID of the container to list the objects in
publicKey(required): The public key of the container owner
X-r(required): The (bigInt) r - the integer retrieved from the signature
X-s(required): The (bigInt) s - the integer retrieved from the signature
Content: [{objectId}, {objectId}, {objectId}]
Content: error message defining issue with request
Content: Issue with the session (recreate the signature)
GET /object/{containerId}/{objectId}
containerId(required): The ID of the container that contains the object
objectId(required): The ID of the object to retrieve
publicKey(required): The public key of the container owner
X-r(required): The (bigInt) r - the integer retrieved from the signature
X-s(required): The (bigInt) s - the integer retrieved from the signature
Content-Type: multipart/form-dataCurrently only multipart/form-data is supported
NEOFS-META: {metadata}
Content: []byte
Content: error message defining issue with request
Content: Issue with the session (recreate the signature)
HEAD /object/{containerId}/{objectId}
GET /object/data/{containerId}/{objectId}NB. Not all servers respect the HEAD method.
containerId(required): The ID of the container that contains the object
objectId(required): The ID of the object to retrieve the metadata of
publicKey(required): The public key of the container owner
X-r(required): The (bigInt) r - the integer retrieved from the signature
X-s(required): The (bigInt) s - the integer retrieved from the signature
NEOFS-META: {metadata}
Content: error message defining issue with request
Content: Issue with the session (recreate the signature)
DELETE /object/{containerId}/{objectId}
containerId(required): The ID of the container that contains the object
objectId(required): The ID of the object to delete
publicKey(required): The public key of the container owner
X-r(required): The (bigInt) r - the integer retrieved from the signature
X-s(required): The (bigInt) s - the integer retrieved from the signature
Content: error message defining issue with request
Content: Issue with the session (recreate the signature)
In short, this API allows a container owner to interact with their container and objects over HTTP without sharing their private key.
Watch a demo video of using the Sandbox here
You need to have the following:
Now you can upload an object...
Before any request you will need a bearer token. You can specify how long a token should last.
Now, with your private key, you need to sign the bearer token. This will respond with two integers, r and s.
Use the signature to upload some data to the contain.
The signature can now be used to make a request.
NB. You do need to have the file type above selected first.
How can we improve Greenfinch? Find us on Discord.