API v2 Dokumentation
Die API ist derzeit ohne Authentifizierung nutzbar.
Die API Base URL lautet /api/v2.
Die folgenden Ressourcen bündeln die Menge der verfügbaren Actions, welche per POST-Request an die API genutzt werden können
NLS.OfferResource
list
NLS.Offer
q
qfield
order
page_size
page
offer_type_id
offer_type_key
actor_id
categories
categories_operator
boundingBox
timespan
accessible
free
child_friendly
climate_protection
title
short_description
description
property_list
costs
requirements
curriculum
free
child_friendly
accessible
climate_protection
event_online
event_canceled
target_group
info_url
video_url
updated_at
created_at
offer_type
locations
contacts
times
categories
logo_url
image_url
actor
{ "resource": NLS.OfferResource, "action": list "fields": { "title": true, "short_description": true, "description": true, "property_list": true, "costs": true, "requirements": true, "curriculum": true, "free": true, "child_friendly": true, "accessible": true, "climate_protection": true, "event_online": true, "event_canceled": true, "target_group": true, "info_url": true, "video_url": true, "updated_at": true, "created_at": true, "offer_type": true|{fields}, // set to true for ID or define list of eager loaded fields "locations": true|{fields}, // set to true for ID or define list of eager loaded fields "contacts": true|{fields}, // set to true for ID or define list of eager loaded fields "times": true, "categories": true|{fields}, // set to true for ID or define list of eager loaded fields "logo_url": true, "image_url": true, "actor": true|{fields}, // set to true for ID or define list of eager loaded fields } }
get
NLS.Offer
id
title
short_description
description
property_list
costs
requirements
curriculum
free
child_friendly
accessible
climate_protection
event_online
event_canceled
target_group
info_url
video_url
updated_at
created_at
offer_type
locations
contacts
times
categories
logo_url
image_url
actor
{ "resource": NLS.OfferResource, "action": get "fields": { "title": true, "short_description": true, "description": true, "property_list": true, "costs": true, "requirements": true, "curriculum": true, "free": true, "child_friendly": true, "accessible": true, "climate_protection": true, "event_online": true, "event_canceled": true, "target_group": true, "info_url": true, "video_url": true, "updated_at": true, "created_at": true, "offer_type": true|{fields}, // set to true for ID or define list of eager loaded fields "locations": true|{fields}, // set to true for ID or define list of eager loaded fields "contacts": true|{fields}, // set to true for ID or define list of eager loaded fields "times": true, "categories": true|{fields}, // set to true for ID or define list of eager loaded fields "logo_url": true, "image_url": true, "actor": true|{fields}, // set to true for ID or define list of eager loaded fields } }
NLS.LocationResource
list
NLS.Location
q
qfield
order
page_size
page
title
street
city
zip
lat
long
owner
{ "resource": NLS.LocationResource, "action": list "fields": { "title": true, "street": true, "city": true, "zip": true, "lat": true, "long": true, "owner": true|{fields}, // set to true for ID or define list of eager loaded fields } }
get
NLS.Location
id
title
street
city
zip
lat
long
owner
{ "resource": NLS.LocationResource, "action": get "fields": { "title": true, "street": true, "city": true, "zip": true, "lat": true, "long": true, "owner": true|{fields}, // set to true for ID or define list of eager loaded fields } }
NLS.ActorResource
list
NLS.Actor
q
qfield
order
page_size
page
categories
categories_operator
boundingBox
hasOffers
title
description
slug
info_url
updated_at
created_at
logo_url
image_url
contacts
offers
categories
locations
{ "resource": NLS.ActorResource, "action": list "fields": { "title": true, "description": true, "slug": true, "info_url": true, "updated_at": true, "created_at": true, "logo_url": true, "image_url": true, "contacts": true|{fields}, // set to true for ID or define list of eager loaded fields "offers": true|{fields}, // set to true for ID or define list of eager loaded fields "categories": true|{fields}, // set to true for ID or define list of eager loaded fields "locations": true|{fields}, // set to true for ID or define list of eager loaded fields } }
get
NLS.Actor
id
title
description
slug
info_url
updated_at
created_at
logo_url
image_url
contacts
offers
categories
locations
{ "resource": NLS.ActorResource, "action": get "fields": { "title": true, "description": true, "slug": true, "info_url": true, "updated_at": true, "created_at": true, "logo_url": true, "image_url": true, "contacts": true|{fields}, // set to true for ID or define list of eager loaded fields "offers": true|{fields}, // set to true for ID or define list of eager loaded fields "categories": true|{fields}, // set to true for ID or define list of eager loaded fields "locations": true|{fields}, // set to true for ID or define list of eager loaded fields } }
NLS.ModelTypeResource
list
NLS.ModelType
q
qfield
order
page_size
page
key
display_name
description
used_attributes
{ "resource": NLS.ModelTypeResource, "action": list "fields": { "key": true, "display_name": true, "description": true, "used_attributes": true, } }
get
NLS.ModelType
id
key
display_name
description
used_attributes
{ "resource": NLS.ModelTypeResource, "action": get "fields": { "key": true, "display_name": true, "description": true, "used_attributes": true, } }
save
NLS.ModelType
id
key
display_name
description
used_attributes
{ "resource": NLS.ModelTypeResource, "action": save "fields": { "key": true, "display_name": true, "description": true, "used_attributes": true, } }
NLS.CategoryResource
list
NLS.Category
category_type_key
q
qfield
order
page_size
page
top_level_categories
title
description
sub_categories
category_type
{ "resource": NLS.CategoryResource, "action": list "fields": { "title": true, "description": true, "sub_categories": true|{fields}, // set to true for ID or define list of eager loaded fields "category_type": true|{fields}, // set to true for ID or define list of eager loaded fields } }
get
NLS.Category
id
title
description
sub_categories
category_type
{ "resource": NLS.CategoryResource, "action": get "fields": { "title": true, "description": true, "sub_categories": true|{fields}, // set to true for ID or define list of eager loaded fields "category_type": true|{fields}, // set to true for ID or define list of eager loaded fields } }
NLS.CategoryTypeResource
list
NLS.CategoryType
q
qfield
order
page_size
page
target_type
key
title
categories
{ "resource": NLS.CategoryTypeResource, "action": list "fields": { "target_type": true, "key": true, "title": true, "categories": true|{fields}, // set to true for ID or define list of eager loaded fields } }
get
NLS.CategoryType
id
target_type
key
title
categories
{ "resource": NLS.CategoryTypeResource, "action": get "fields": { "target_type": true, "key": true, "title": true, "categories": true|{fields}, // set to true for ID or define list of eager loaded fields } }
NLS.Offer
title
of type Afeefa.StringAttribute
short_description
of type Afeefa.StringAttribute
description
of type Afeefa.StringAttribute
property_list
of type Afeefa.StringAttribute
costs
of type Afeefa.StringAttribute
requirements
of type Afeefa.StringAttribute
curriculum
of type Afeefa.StringAttribute
free
of type Afeefa.BooleanAttribute
child_friendly
of type Afeefa.BooleanAttribute
accessible
of type Afeefa.BooleanAttribute
climate_protection
of type Afeefa.BooleanAttribute
event_online
of type Afeefa.BooleanAttribute
event_canceled
of type Afeefa.BooleanAttribute
target_group
of type Afeefa.StringAttribute
info_url
of type Afeefa.StringAttribute
video_url
of type Afeefa.StringAttribute
updated_at
of type Afeefa.DateAttribute
created_at
of type Afeefa.DateAttribute
times
of type Afeefa.StringAttribute
logo_url
of type Afeefa.StringAttribute
image_url
of type Afeefa.StringAttribute
NLS.ModelType
key
of type Afeefa.StringAttribute
display_name
of type Afeefa.StringAttribute
description
of type Afeefa.StringAttribute
used_attributes
of type Afeefa.IntAttribute
NLS.Location
title
of type Afeefa.StringAttribute
street
of type Afeefa.StringAttribute
city
of type Afeefa.StringAttribute
zip
of type Afeefa.StringAttribute
lat
of type Afeefa.NumberAttribute
long
of type Afeefa.NumberAttribute
NLS.Actor
title
of type Afeefa.StringAttribute
description
of type Afeefa.StringAttribute
slug
of type Afeefa.StringAttribute
info_url
of type Afeefa.StringAttribute
updated_at
of type Afeefa.DateAttribute
created_at
of type Afeefa.DateAttribute
logo_url
of type Afeefa.StringAttribute
image_url
of type Afeefa.StringAttribute
NLS.Contact
title
of type Afeefa.StringAttribute
NLS.ContactUrl
title
of type Afeefa.StringAttribute
url
of type Afeefa.StringAttribute
NLS.ContactPerson
name
of type Afeefa.StringAttribute
role
of type Afeefa.StringAttribute
email
of type Afeefa.StringAttribute
phone
of type Afeefa.StringAttribute
NLS.Keyfact
display_name
of type Afeefa.StringAttribute
value
of type Afeefa.StringAttribute
NLS.Category
title
of type Afeefa.StringAttribute
description
of type Afeefa.StringAttribute
NLS.CategoryType
target_type
of type Afeefa.StringAttribute
key
of type Afeefa.StringAttribute
title
of type Afeefa.StringAttribute
Bilddateien
Über eine URL referenzierte Bilddateien können in verschiedenen Größen angefordert werden. Dazu können der Bild-URL folgende GET-Parameter angehängt werden:
width : maximale Breite in Pixeln
height: maximale Höhe in Pixeln
Die Bild-URL in Originalgröße erhält man z.B. über die Attribute image_url_base bei Angeboten oder via organization_logo_url_base bei Organisationen. Diese kann als Basis für die Ergänzung von Parametern für die gewünschte Bildgröße verwendet werden.
Beispiel:
Bild in Originalgröße via Attribut organization_logo_url_base aus users.json
» https://daten.nachhaltiges-sachsen.de/media/2374/duw_logo_farbe_text_no_cutout.png
Dimensioniertes Bild über angehängte GET-Parameter
Breite und Höhe des Bildes sind jeweils auf max. 200 Pixel dimensioniert, d.h. ein Querformat-Bild ist max. 200 Pixel breit bzw. ein Hochformat-Bild ist max. 200 Pixel hoch