DgVerseDgVerse
Home
Get Started
  • Auth Endpoint
  • Create Collection
  • Create Certificate
  • Create Directory
  • Transfer Certificate Via Wallet
  • Transfer Certificate Via Mail
  • Cancel Claim
  • Freeze User
  • Un-freeze User
  • Pause Collection
  • Un-Pause Collection
  • Delete Collection
  • Invalidate Certificates
  • Delete Certificates
  • Get Collection
  • Get Certificates
  • Get Directory of a Collection
Home
Get Started
  • Auth Endpoint
  • Create Collection
  • Create Certificate
  • Create Directory
  • Transfer Certificate Via Wallet
  • Transfer Certificate Via Mail
  • Cancel Claim
  • Freeze User
  • Un-freeze User
  • Pause Collection
  • Un-Pause Collection
  • Delete Collection
  • Invalidate Certificates
  • Delete Certificates
  • Get Collection
  • Get Certificates
  • Get Directory of a Collection
  • Create Directory

Create Directory

Path: v1/hts/api/integration/create-directory

How to use:

To create a directory you have to use three parameters: “collectionId”, “name” For example: If you want to provide certificates for the 2024 batch of “B.Tech Computer Science” students. Then you have to create a ‘collection’ with name “B.Tech Computer Science”, ‘directory’ name should be “2024” and the certificates will be created inside that directory “2024” for each student.

screenshot

Parameter List

Below table represents the parameters, data type of parameter and whether the parameter is required or not for KYC a collection.

FieldTypeRequiredUsage
collectionIdStringRequired“collectionId” is used to identify the collection to create a directory inside it.
nameStringRequiredA directory name is required to identify directories within the collection. There can be multiple directories within a collection.

cURL command:

curl --request POST \
  --url http://<dgverse-api-base-url>/v1/hts/api/integration/create-directory \
  --header 'Authorization: Bearer <YOUR_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{ "collectionId": "<value>", “name": "<value>"}'

Response:

When the directory is created successfully, a ‘201 Created’ response message will be generated. screenshot

Error troubleshooting

  • 400 Bad Request: No such collection exists.
  • 500 Internal Server Error: The provided user ID is not correct.
Last Updated:
Contributors: John
Prev
Create Collection
Next
Mint Certificate