docs: add guide to using the api#3
docs: add guide to using the api#3arjun988 wants to merge 3 commits intoverifiable-presentation:trunkfrom
Conversation
gamemaker1
left a comment
There was a problem hiding this comment.
Thanks @arjun988 for taking this up!
I've left a few comments with feedback on how we could improve this PR before merging it, please do take a look.
|
Hi @arjun988, Thanks for adding the example cURL command, and the different responses the API returns. Currently, the document does not have a proper structure (1) or proper formatting (2).
## Title
### Overview
<a brief about what the API does, and the end goal of creating a DID document for Ramesh>
### APIs
#### Creating a DID Document
<explain what calling the API does, and what the expected response is>
##### Request
<add in the raw HTTP request, as well as the cURL and HTTPie commands>
##### Response
<add the responses>
|
| @@ -0,0 +1,166 @@ | |||
| ## CALLING THE API | |||
There was a problem hiding this comment.
Please capitalise only the first letter of each word.
| ### This API is used to generate and decentralized identity documents for all entities that are stored in a registry. | ||
| ### These documents contain the ID of the entity they describe, as well as the assertion or verification methods used by the entity to sign and verify credentials or ### presentations (respectively) generated or issued by them. student creating a DID using their school-issued email address. |
There was a problem hiding this comment.
The ### is used to create a heading, whereas these two lines are just text. Please remove the ###.
| ### API | ||
|
|
||
| #### Creating API document: | ||
| #### POST /identity |
There was a problem hiding this comment.
| #### POST /identity | |
| #### POST /identity |
| ##### Request | ||
|
|
||
|
|
||
| `A student creating a DID using their school-issued email address could make the following request: | ||
|
|
||
| POST /identity HTTP/1.1` |
There was a problem hiding this comment.
| ##### Request | |
| `A student creating a DID using their school-issued email address could make the following request: | |
| POST /identity HTTP/1.1` | |
| ##### Request | |
| A student creating a DID using their school-issued email address could make the following request: | |
| <add the triple ` here> | |
| POST /identity HTTP/1.1 |
| } | ||
| } | ||
| ``` | ||
| //Post request body with curl |
There was a problem hiding this comment.
Please add this as a subheading and not a "comment":
| //Post request body with curl | |
| ##### Post request body with curl |
| 4)The overhead/ header data is used as an identifier, and its sole purpose is to indicate the source and destination of the information being transmitted. | ||
|
|
||
|
|
||
| #### Response |
There was a problem hiding this comment.
| #### Response | |
| #### Response | |
| }] | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Please add some description here about the fields returned in the response, and what the user can do with it.
(See the readme, it already contains these details)
| } | ||
| ``` | ||
|
|
||
| //Error |
There was a problem hiding this comment.
Again, please use headings and not "comments"
| //Error | ||
|
|
||
| ``` | ||
| 1) Invalid Identitifier Type |
There was a problem hiding this comment.
Please move this outside the code block
| } | ||
|
|
||
| ``` | ||
|
|
There was a problem hiding this comment.
Please add a couple of lines explaining each error and why it could have occurred.
Closes #2