22
33## OpenAPI specification
44
5- The OpenAPI specification is committed to this repo as ` public/api-spec-v1 .yaml `
6- and as ` public/api-spec-v1 .json ` .
5+ The OpenAPI specification is committed to this repo as ` public/api-spec-v2 .yaml `
6+ and as ` public/api-spec-v2 .json ` .
77
88A CI check will compare the current API implementation to the spec. If they
99are different the check will fail.
@@ -18,7 +18,7 @@ If these are _breaking_ changes the API version must be changed accordingly.
1818
1919## Stateless
2020
21- The API is stateless except ` /v1 /authentication ` routes.
21+ The API is stateless except ` /v2 /authentication ` routes.
2222Make sure to set the ` CORS_ALLOW_ORIGIN ` correctly in ` .env.local ` .
2323
2424## Rest API & Relationships
@@ -27,7 +27,7 @@ To avoid embedding all relations in REST representations but still allow the cli
2727they have to make all endpoints that have relations also has a ` relationsModified ` field:
2828
2929``` json
30- "@id" : " /v1 /screens/000XB4RQW418KK14AJ054W1FN2" ,
30+ "@id" : " /v2 /screens/000XB4RQW418KK14AJ054W1FN2" ,
3131 ...
3232 "relationsModified" : {
3333 "campaigns" : " cf9bb7d5fd04743dd21b5e3361db7eed575258e0" ,
@@ -155,11 +155,11 @@ docker compose exec phpfpm bin/console app:user:add
155155```
156156
157157You can now obtain a token by sending a ` POST ` request to the
158- ` /v1 /authentication/token ` endpoint:
158+ ` /v2 /authentication/token ` endpoint:
159159
160160``` curl
161161curl --location --request 'POST' \
162- 'http://displayapiservice.local.itkdev.dk/v1 /authentication/token' \
162+ 'http://displayapiservice.local.itkdev.dk/v2 /authentication/token' \
163163 --header 'accept: application/json' \
164164 --header 'Content-Type: application/json' \
165165 --data '{
@@ -180,7 +180,7 @@ as the api key value. Or by adding an auth header to your requests
180180
181181``` curl
182182curl --location --request 'GET' \
183- 'http://displayapiservice.local.itkdev.dk/v1 /layouts?page=1&itemsPerPage=10' \
183+ 'http://displayapiservice.local.itkdev.dk/v2 /layouts?page=1&itemsPerPage=10' \
184184 --header 'accept: application/ld+json' \
185185 --header 'Authorization: Bearer <token>'
186186```
0 commit comments