-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathulvis-api.yaml
157 lines (157 loc) · 5.05 KB
/
ulvis-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
openapi: 3.0.3
info:
title: Ulvis - OpenAPI 3.0
description: |-
ulvis.net is a free Url Shortener API (free api without key). The shortened url can optionally be made private, protected by password, you can set an expiration data, or set a certain number of 'uses' after which the url will be inactive.
version: 1.0.0
servers:
- url: https://ulvis.net
paths:
/API/write/get:
get:
summary: Send URL to be shortened
description: Send URL to be shortened
operationId: writeURL
parameters:
- name: url
in: query
required: true
description: The url you want to shrink
schema:
type: string
- name: custom
in: query
schema:
type: string
description: Optional custom name you want to give to the shortened url
- name: type
in: query
schema:
type: string
enum:
- json
- xml
description: Response format, default is 'json'
- name: private
in: query
schema:
type: string
description: Set url to private (not listed)
- name: password
in: query
schema:
type: string
description: Set url password, max 10 chars
- name: uses
in: query
schema:
type: integer
description: Number of uses for the short url, after which it will expire
- name: expire
in: query
schema:
type: string
description: date in format MM/DD/YYYY to expire url
- name: via
in: query
schema:
type: string
description: Adds a signature to track your application
responses:
'200':
description: Successful operation
content:
application/josn:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
properties:
id:
type: string
description: the custom name given
example: lorem
url:
type: string
description: The shortened url
example: https:\/\/ulvis.net\/lorem
full:
type: string
description: The original url
example: https:\/\/google.com\/
/API/read/get:
get:
summary: Get details of shortened URL
description: Get details of shortened URL
operationId: readURL
parameters:
- name: id
in: query
required: true
description: The id given to the url in the "write" step
schema:
type: string
- name: password
in: query
schema:
type: string
description: password for url (if protected)
- name: type
in: query
schema:
type: string
enum:
- json
- xml
description: Response format, default is 'json'
responses:
'200':
description: Successful operation
content:
application/josn:
schema:
type: object
properties:
success:
type: boolean
example: true
data:
type: object
properties:
id:
type: string
description: the custom name given
example: lorem
uses:
type: string
description: Number of clicks left to inactivate url
hits:
type: string
description: Number of hits to the link
example: "0"
ads:
type: string
description: Indicate if url use ads
example: "1"
url:
type: string
description: The shortened url
example: https:\/\/ulvis.net\/lorem
full:
type: string
description: The original url
example: https:\/\/google.com\/
created:
type: integer
description:
example: 1682076954
expire:
type: string
description: Timestamp to inactivate link
last:
type: string
description: Timestamp for the last click