UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 9.37 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Greenpeace International contact","url":"http://www.greenpeace.org/international/en/about/contactus/","x-twitter":"Greenpeace"},"description":"Greenpeace Greenwire allows you connect with other volunteers, activists and groups working on environmental campaigns all across the world!","license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"termsOfService":"http://www.greenpeace.org/international/en/Help/copyright2/","title":"Greenwire Public API","version":"1.0.0","x-apisguru-categories":["collaboration"],"x-logo":{"url":"https://twitter.com/Greenpeace/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/greenpeace/ggw_api_test/master/swagger.yaml","version":"2.0"}],"x-providerName":"greenpeace.org"},"paths":{"/events":{"get":{"description":"Return the upcoming events (e.g. start date >= today). Gets an array of `Event` object. Mandatory query param of **domain** determines the site / country the event belongs to.","parameters":[{"description":"the site the groups belongs to, example: netherlands","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"the number of desired records","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"body":{"items":{"$ref":"#/components/schemas/Event"},"type":"array"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}}}}},"/events/{UUID}":{"get":{"description":"Get one `Event` object by specifying its UUID in the url path.","parameters":[{"in":"path","name":"UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Event"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}},"400":{"description":"Not found","content":{"application/json":{"schema":{"properties":{"body":{"type":"object"},"header":{"$ref":"#/components/schemas/HeaderError"}}}}}}}}},"/groups":{"get":{"description":"Gets an array of `Group` object. Mandatory query param of **domain** determines the site / country the group belongs to.","parameters":[{"description":"the site the groups belongs to, example: netherlands","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"the number of desired records","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"body":{"items":{"$ref":"#/components/schemas/Group"},"type":"array"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}}}}},"/groups/{UUID}":{"get":{"description":"Get one `Group` object by specifying its UUID in the url path.","parameters":[{"in":"path","name":"UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Group"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}},"400":{"description":"Not found","content":{"application/json":{"schema":{"properties":{"body":{"type":"object"},"header":{"$ref":"#/components/schemas/HeaderError"}}}}}}}}},"/volunteers":{"get":{"description":"Gets an array of `Volunteer` object. Mandatory query param of **domain** determines the site / country the volunteers are from.","parameters":[{"description":"the site the users are registered on, example: netherlands","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"the number of desired records. Default is 5.","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"1 or 0. filter on people that have the default avatar or not.","in":"query","name":"must_have_default_avatar","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"body":{"items":{"$ref":"#/components/schemas/Volunteer"},"type":"array"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}}}}},"/volunteers/{UUID}":{"get":{"description":"Get one specific `Volunteer` object by specifying its UUID in the url path.","parameters":[{"in":"path","name":"UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"body":{"$ref":"#/components/schemas/Volunteer"},"header":{"$ref":"#/components/schemas/HeaderSuccess"}}}}}},"400":{"description":"Not found","content":{"application/json":{"schema":{"properties":{"body":{"type":"object"},"header":{"$ref":"#/components/schemas/HeaderError"}}}}}}}}}},"servers":[{"url":"https://greenwire.greenpeace.org/api/public"}],"components":{"schemas":{"Coordinates":{"properties":{"latitude":{"description":"Signed decimal format, example: 52.1234","type":"string"},"longitude":{"description":"Signed decimal format, example -77.022223","type":"string"}},"type":"object"},"DateTime":{"description":"The date in YYYY-MM-DD HH:MM:SS format, example: 2015-12-31 23:59:59","type":"string"},"Event":{"properties":{"created":{"$ref":"#/components/schemas/DateTime"},"description":{"$ref":"#/components/schemas/HTML"},"end_date":{"$ref":"#/components/schemas/DateTime"},"groups":{"items":{"$ref":"#/components/schemas/GroupLite"},"type":"array"},"location":{"$ref":"#/components/schemas/Location"},"modified":{"$ref":"#/components/schemas/DateTime"},"name":{"type":"string"},"organizers":{"items":{"$ref":"#/components/schemas/VolunteerLite"},"type":"array"},"picture":{"$ref":"#/components/schemas/URL"},"serial":{"$ref":"#/components/schemas/Serial"},"start_date":{"$ref":"#/components/schemas/DateTime"},"uuid":{"$ref":"#/components/schemas/UUID"}},"type":"object"},"Group":{"properties":{"created":{"$ref":"#/components/schemas/DateTime"},"description":{"$ref":"#/components/schemas/HTML"},"group_type":{"$ref":"#/components/schemas/GroupType"},"location":{"$ref":"#/components/schemas/Location"},"mission":{"type":"string"},"modified":{"$ref":"#/components/schemas/DateTime"},"name":{"type":"string"},"picture":{"$ref":"#/components/schemas/URL"},"serial":{"$ref":"#/components/schemas/Serial"},"uuid":{"$ref":"#/components/schemas/UUID"}},"type":"object"},"GroupLite":{"properties":{"name":{"type":"string"},"serial":{"$ref":"#/components/schemas/Serial"},"uuid":{"$ref":"#/components/schemas/UUID"}},"type":"object"},"GroupType":{"enum":["Country group","Campaign Project group","Local group","Discussion group","Interest group","Skills-based group"],"type":"string"},"HTML":{"description":"A string containing sanitized HTML code","type":"string"},"HTTP_Code":{"description":"https://en.wikipedia.org/wiki/List_of_HTTP_status_codes","type":"string"},"HTTP_Status":{"description":"https://en.wikipedia.org/wiki/List_of_HTTP_status_codes","type":"integer"},"HeaderError":{"properties":{"code":{"$ref":"#/components/schemas/HTTP_Code"},"error":{"description":"the error message","type":"string"},"id":{"description":"transaction nonce","type":"integer"},"pagination":{"type":"object"},"resources":{"$ref":"#/components/schemas/ResourceType"},"status":{"$ref":"#/components/schemas/HTTP_Status"}},"type":"object"},"HeaderSuccess":{"properties":{"code":{"$ref":"#/components/schemas/HTTP_Code"},"error":{"nullable":true},"id":{"description":"transaction nonce","type":"integer"},"pagination":{"$ref":"#/components/schemas/Pagination"},"resources":{"$ref":"#/components/schemas/ResourceType"},"status":{"$ref":"#/components/schemas/HTTP_Status"}},"type":"object"},"ISO_3166-1_alpha-2":{"description":"Country code see. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2","type":"string"},"Location":{"properties":{"city":{"type":"string"},"coordinates":{"$ref":"#/components/schemas/Coordinates"},"country":{"type":"string"},"postcode":{"type":"string"},"state":{"type":"string"},"streetname":{"type":"string"}},"type":"object"},"LocationSimple":{"properties":{"country":{"$ref":"#/components/schemas/ISO_3166-1_alpha-2"}},"type":"object"},"Pagination":{"properties":{"limit":{"description":"the nubmer of items per page","type":"integer"},"page":{"description":"the current page","type":"integer"},"total":{"description":"the total number of pages","type":"integer"}},"type":"object"},"ResourceType":{"description":"The name of the requested object/model/resource. Plural if a collection.","enum":["group","groups","event","events","volunteer","volunteers"],"type":"string"},"Serial":{"description":"The primary key in Drupal, e.g the entity/node id","type":"string"},"URL":{"description":"A resource location, example: https://greenwire.greenpeace.org","type":"string"},"UUID":{"description":"Universally unique identifier in canonical format, example: de305d54-75b4-431b-adb2-eb6b9e546014","type":"string"},"Volunteer":{"properties":{"avatar":{"$ref":"#/components/schemas/URL"},"locations":{"items":{"$ref":"#/components/schemas/LocationSimple"},"type":"array"},"uuid":{"$ref":"#/components/schemas/UUID"}},"type":"object"},"VolunteerLite":{"properties":{"serial":{"$ref":"#/components/schemas/Serial"},"uuid":{"$ref":"#/components/schemas/UUID"}},"type":"object"}}}}