forked from otvorenesudy/otvorenesudy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
154 lines (131 loc) · 6 KB
/
apiary.apib
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
FORMAT: 1A
HOST: http://otvorenesudy.sk/api
# Otvorené Súdy API
Otvorené Súdy Public data project aimed at creating much more user friendly interface to
interesting public data provided by [Departement of Justice](http://justice.gov.sk) and [The Judical Council of Slovak Republic](http://sudnarada.gov.sk).
**Note**: Currently, we only provide API for Decrees.
**Note**: All examples of responses are purely demonstrational and only partially based on real records.
## Allowed HTTP Requests:
* `GET` - To Get a Resource or List of Resource.
## Requirements
* API key - In order to use our API, we require that you
obtain an API key. API key is a part of every URL as a parameter.
Example: `/api/decrees?api_key=YOUR_API_KEY`
**Note**: All requests are prefixed with `/api` path, e.g. `/decrees` is actually `/api/decrees`.
# Decrees API
Decrees issued on specific court by one or more judges.
## Decrees Sync [/decrees/sync?since={since}&last_id={last_id}]
Decree has following attributes:
- **id** - id of a decree
- **case_number** - case number of decree (*spisová značka* in Slovak)
- **file_number** - file number of decree (*identifikačné číslo spisu* in Slovak)
- **ecli** - European Case Law Identifier
- **text** - text of decree extracted from pdf document
- **date** - date when decree was issued\
- **pages_urls** - urls to pages as images extracted from decree pdf
- **uri** - uri to original decree published at [Departement of Justice](http://justice.gov.sk) website.
- **document_url** - url to original pdf document
- **court** - court where the decree was issued
- **id** - id of court
- **name** - name of the court
- **address** - address of the court
- **form** - form of the decree
- **code** - code of the form
- **value** - value of the form
- **legislation_area** - legislation area of the decree
- **value** - name of the legislation area
- **legislation_subarea** - legislation area of the decree
- **value** - name of the legislation subarea
- **natures** - natures of the decree (*povaha rozhodnutia* in Slovak)
- **value** - name of the nature
- **judges** -
- **id** - id of the judge
- **name** - name od the judge
- **legislations** - legislations mentioned in the decre
- **name** - name of the legislation
- **number**
- **letter**
- **paragraph**
- **section**
- **type**
- **value** - legislation full value
- **value_unprocessed** - unprocessed value of legislation
- **defendants** - defendants mentioned in hearings
- **name**
- **opponents** - opponents mentioned in hearings
- **name**
- **proposers** - proposers mentioned in hearing
- **name**
- **updated_at** - date when decree was created in our database
- **created_at** - date when decree was updated in our database
### Sync Decrees [GET]
+ Parameters
+ since (date parsable by Time.parse) ... All decrees since provided date
+ last_id (string, optional) ... ID of last decree you synced
+ Response 200
+ Headers
Content-Type: application/json
Link: "/api/decrees?page=1; rel='next'"
+ Body
{
"decrees":[
{
"id": 1208954,
"case_number": "11Rob/106/2014",
"file_number": "8314209921",
"ecli": "ECLI:SK:OSHE:2014:8314209921.1",
"text": "Súd: Spisová značka: ...",
"date": "2014-10-06",
"pages_urls": [
"http://otvorenesudy.sk/decrees/1208954/pages/1/image"
],
"uri": "http://www.justice.gov.sk/Stranky/Sudne-rozhodnutia/Sudne-rozhodnutie-detail.aspx?PorCis=7DDB0A36-7144-4D1F-A8B6-AD7C952DBD91&PojCislo=330109",
"document_url": "http://otvorenesudy.sk/decrees/1208954/document",
"created_at": "2014-11-09T14:35:24+01:00",
"updated_at": "2014-11-09T14:35:27+01:00",
"court": {
"id": 23,
"name": "Okresný súd Humenné",
"address": "Laborecká č. 17, 066 34 Humenné"
},
"form": {
"code": "N",
"value": "Uznesenie"
},
"legislation_area": {
"value": "Trestné právo"
},
"legislation_subarea": {
"value": "Majetok"
},
"natures": [
{
"value": "Prvostupňové nenapadnuté opravnými prostriedkami"
}
],
"judges": [
{
"id": 1676,
"name": "Mgr. Zdenka Škubalová"
}
],
"legislations": [
{
"name": "o súdnych poplatkoch",
"number": 71,
"letter": null,
"paragraph": "10",
"section": "1",
"type": "Zákon č.",
"year": 1992,
"value": "Zákon č. 71/1992 o súdnych poplatkoch, § 10, Odsek 1",
"value_unprocessed": "Zákon č. 71/1992 o súdnych poplatkoch,§ 10, Odsek 1",
"external_url": "http://www.zakonypreludi.sk/zz/1992-71#p10-1"
}
],
"defendants": [],
"opponents": [],
"proposers": []
}
]
}