Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit da3902d

Browse files
committed
Rename endpoints and drop deprecated
Signed-off-by: Vitor Mattos <[email protected]>
1 parent b79fa9d commit da3902d

File tree

3 files changed

+9
-306
lines changed

3 files changed

+9
-306
lines changed

site/.vuepress/public/Insomnia_2021-11-24.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

site/.vuepress/public/specs/api.yaml

Lines changed: 2 additions & 299 deletions
Original file line numberDiff line numberDiff line change
@@ -26,303 +26,6 @@ tags:
2626
- name: admin
2727
description: Admin settings
2828
paths:
29-
/webhook/me:
30-
get:
31-
tags:
32-
- account
33-
summary: Who am I
34-
description: replaced by /account/me
35-
operationId: accountDeprecated#me
36-
security:
37-
- basicAuth: []
38-
deprecated: true
39-
responses:
40-
'200':
41-
description: successful operation
42-
content:
43-
application/json:
44-
schema:
45-
type: object
46-
properties:
47-
account:
48-
allOf:
49-
- $ref: '#/components/schemas/basicAccount'
50-
- type: object
51-
properties:
52-
emailAddress:
53-
type: string
54-
format: email
55-
description: Email of the person who owns the account
56-
57-
settings:
58-
$ref: '#/components/schemas/accountSettings'
59-
required:
60-
- account
61-
- settings
62-
'404':
63-
description: Invalid user or password
64-
content:
65-
application/json:
66-
schema:
67-
type: object
68-
properties:
69-
message:
70-
type: string
71-
enum:
72-
- Invalid user or password
73-
example: Invalid user or password
74-
required:
75-
- message
76-
/webhook/register:
77-
post:
78-
tags:
79-
- sign
80-
summary: Request signature
81-
description: replaced by /account/register
82-
operationId: signFileDeprecated#requestSign
83-
security:
84-
- basicAuth: []
85-
deprecated: true
86-
requestBody:
87-
content:
88-
application/json:
89-
schema:
90-
type: object
91-
properties:
92-
name:
93-
type: string
94-
example: filename
95-
description: The name of file to sign
96-
file:
97-
$ref: '#/components/schemas/newFile'
98-
users:
99-
type: array
100-
description: Collection of users who must sign the document
101-
items:
102-
type: object
103-
description: Person who will sign
104-
properties:
105-
email:
106-
type: string
107-
format: email
108-
description: Unique email to identify user
109-
110-
displayName:
111-
type: string
112-
description: Persons name
113-
nullable: true
114-
example: John Doe
115-
description:
116-
type: string
117-
description: Description that will be displayed to the person
118-
example: 'As the company''s CEO, you must sign this contract'
119-
required:
120-
- email
121-
callback:
122-
type: string
123-
description: URL that will receive a POST after the document is signed
124-
example: 'http://app.test.coop/callback_webhook'
125-
required:
126-
- name
127-
- file
128-
- users
129-
required: true
130-
responses:
131-
'200':
132-
description: Success!
133-
content:
134-
application/json:
135-
schema:
136-
type: object
137-
properties:
138-
message:
139-
type: string
140-
description: Success message
141-
example: Success
142-
data:
143-
type: object
144-
properties:
145-
nodeId:
146-
type: integer
147-
description: Node id of a Nextcloud file
148-
example: 2312
149-
uuid:
150-
type: string
151-
format: uuid
152-
description: File identifier. It is necessary to keep it because it must be used to update or delete a signature request and will also be used in the callback request.
153-
'422':
154-
description: Request failed
155-
content:
156-
application/json:
157-
schema:
158-
type: object
159-
properties:
160-
message:
161-
type: string
162-
description: Description of the failure that occurred
163-
example: User 0 needs an email address
164-
patch:
165-
tags:
166-
- sign
167-
summary: Updates signatures data
168-
description: Is necessary to inform the UUID of the file and a list of people
169-
operationId: signFileDeprecated#updateSign
170-
security:
171-
- basicAuth: []
172-
deprecated: true
173-
requestBody:
174-
content:
175-
application/json:
176-
schema:
177-
type: object
178-
properties:
179-
uuid:
180-
type: string
181-
format: uuid
182-
description: Received from sign request
183-
users:
184-
type: array
185-
description: Collection of users who must sign the document
186-
items:
187-
type: object
188-
description: Person who will sign
189-
properties:
190-
email:
191-
type: string
192-
format: email
193-
description: Unique email to identify user
194-
195-
displayName:
196-
type: string
197-
description: Persons name
198-
nullable: true
199-
example: John Doe
200-
description:
201-
type: string
202-
description: Description that will be displayed to the person
203-
example: 'As the company''s CEO, you must sign this contract'
204-
required:
205-
- email
206-
required:
207-
- uuid
208-
- users
209-
required: true
210-
responses:
211-
'200':
212-
description: Success!
213-
content:
214-
application/json:
215-
schema:
216-
type: object
217-
properties:
218-
message:
219-
type: string
220-
description: Success message
221-
example: Success
222-
data:
223-
type: object
224-
properties:
225-
nodeId:
226-
type: integer
227-
description: Node id of a Nextcloud file
228-
example: 2312
229-
uuid:
230-
type: string
231-
format: uuid
232-
description: File identifier. It is necessary to keep it because it must be used to update or delete a signature request and will also be used in the callback request.
233-
'422':
234-
description: Request failed
235-
content:
236-
application/json:
237-
schema:
238-
type: object
239-
properties:
240-
message:
241-
type: string
242-
description: Description of the failure that occurred
243-
example: User 0 needs an email address
244-
/webhook/register/signature:
245-
delete:
246-
tags:
247-
- sign
248-
summary: Delete sign request
249-
description: replaced by /sign/register/signature
250-
operationId: signFileDeprecated#removeSign
251-
security:
252-
- basicAuth: []
253-
deprecated: true
254-
requestBody:
255-
content:
256-
application/json:
257-
schema:
258-
type: object
259-
properties:
260-
uuid:
261-
type: string
262-
format: uuid
263-
description: Received from sign request
264-
users:
265-
type: array
266-
description: Collection of persons
267-
items:
268-
type: object
269-
description: Person who will deleted
270-
properties:
271-
email:
272-
type: string
273-
format: email
274-
description: Unique email to identify user
275-
276-
required:
277-
- email
278-
required:
279-
- uuid
280-
- users
281-
required: true
282-
responses:
283-
'200':
284-
description: Success!
285-
content:
286-
application/json:
287-
schema:
288-
type: object
289-
properties:
290-
message:
291-
type: string
292-
description: Success message
293-
example: Success
294-
'422':
295-
description: Request failed
296-
content:
297-
application/json:
298-
schema:
299-
type: object
300-
properties:
301-
message:
302-
type: string
303-
description: Description of the failure that occurred
304-
example: UUID not found
305-
/signature/has-root-cert:
306-
get:
307-
tags:
308-
- admin
309-
summary: Has root certificate
310-
description: Replaced by /setting/has-root-cert
311-
operationId: settingDeprecated#hasRootCert
312-
security:
313-
- basicAuth: []
314-
deprecated: true
315-
responses:
316-
'200':
317-
description: Success!
318-
content:
319-
application/json:
320-
schema:
321-
type: object
322-
properties:
323-
hasRootCert:
324-
type: boolean
325-
example: true
32629
/account/me:
32730
get:
32831
tags:
@@ -1058,7 +761,7 @@ paths:
1058761
required:
1059762
- success
1060763
- message
1061-
/sign/register:
764+
/request-signature:
1062765
post:
1063766
tags:
1064767
- sign
@@ -1204,7 +907,7 @@ paths:
1204907
type: string
1205908
description: Description of the failure that occurred
1206909
example: User 0 needs an email address
1207-
/sign/register/signature:
910+
/request-signature/signature:
1208911
delete:
1209912
tags:
1210913
- sign

site/Getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ curl -X POST \
4646

4747
### Request signature
4848

49-
POST /sign/register
49+
POST /request-signature
5050

5151
```bash
5252
curl --request POST \
53-
--url http://localhost/apps/libresign/api/0.1/sign/register \
53+
--url http://localhost/apps/libresign/api/0.1/request-signature \
5454
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
5555
--header 'Content-Type: application/json' \
5656
--data '{
@@ -74,7 +74,7 @@ You will receive the fileId or UUID, store this data to create visible elements.
7474

7575
### Validate
7676

77-
Get data of a specific file, you can use `file_id` or `uuid` on path, both data you will receive after request to `POST /sign/register`
77+
Get data of a specific file, you can use `file_id` or `uuid` on path, both data you will receive after request to `POST /request-signature`
7878

7979
The association between user and file will result on a `fileUserId`. You will need this to sign the document or define the page and coordinates of place that the signature of the user will be filled.
8080

@@ -120,7 +120,7 @@ curl --request POST \
120120
#### Update
121121
PATCH /file/{uuid}/elements/{elementId}
122122

123-
The UUID you will receive when you will do a request to `POST /sign/register` and the `fileUserId` is the relation between an user and the file to sign. You can check the `fileUserId` doing a request to /validate
123+
The UUID you will receive when you will do a request to `POST /request-signature` and the `fileUserId` is the relation between an user and the file to sign. You can check the `fileUserId` doing a request to /validate
124124

125125
```bash
126126
curl --request PATCH \
@@ -165,7 +165,7 @@ You will need change the status of a file from draft to able to sign. When you c
165165
166166
```bash
167167
curl --request PATCH \
168-
--url http://localhost/apps/libresign/api/0.1/sign/register \
168+
--url http://localhost/apps/libresign/api/0.1/request-signature \
169169
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
170170
--header 'Content-Type: application/json' \
171171
--data '{
@@ -264,4 +264,4 @@ curl --request POST \
264264
"code": "5150"
265265
}'
266266
```
267-
You also can define the relation between the user and the file elements. You can receive the list of elements on validate endpoint and you will need create a relation between the user to sign and the element.
267+
You also can define the relation between the user and the file elements. You can receive the list of elements on validate endpoint and you will need create a relation between the user to sign and the element.

0 commit comments

Comments
 (0)