1"use strict";(self.webpackChunkdocumentation_v_2=self.webpackChunkdocumentation_v_2||[]).push([[1716],{24709(e,n,s){s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>a,frontMatter:()=>c,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"rest/events","title":"Events","description":"Events allow you to represent what is happening at a Pinpoint.","source":"@site/docs/rest/events.md","sourceDirName":"rest","slug":"/rest/events","permalink":"/docs/rest/events","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"events","title":"Events"},"sidebar":"docs","previous":{"title":"Categories","permalink":"/docs/rest/categories"},"next":{"title":"Lists","permalink":"/docs/rest/lists"}}');var t=s(74848),i=s(28453);const c={id:"events",title:"Events"},l=void 0,d={},o=[{value:"<code>GET</code> /v3.0/events",id:"get-v30events",level:3},{value:"<code>POST</code> /v3.0/events",id:"post-v30events",level:3},{value:"<code>GET</code> /v3.0/events/",id:"get-v30events-1",level:3},{value:"<code>PUT</code> /v3.0/events/",id:"put-v30events",level:3},{value:"<code>DELETE</code> /v3.0/events/",id:"delete-v30events",level:3}];function h(e){const n={a:"a",code:"code",em:"em",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Events allow you to represent what is happening at a Pinpoint."}),"\n",(0,t.jsx)(n.p,{children:"Each event can have multiple occurence dates, as well as rich information\nsuch as an HTML description, media and tags."}),"\n",(0,t.jsxs)(n.h3,{id:"get-v30events",children:[(0,t.jsx)(n.code,{children:"GET"})," /v3.0/events"]}),"\n",(0,t.jsx)(n.p,{children:"List all events."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Query Parameters"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"pinpoint"})," (",(0,t.jsx)(n.em,{children:"integer"}),") \u2013 Only return events belonging to the given pinpoint."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Status Codes"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1",children:"200 OK"})," \u2013 success"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",children:"401 Unauthorized"})," \u2013 you did not provide authentication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",children:"403 Forbidden"})," \u2013 you tried to access a forbidden resource"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.h3,{id:"post-v30events",children:[(0,t.jsx)(n.code,{children:"POST"})," /v3.0/events"]}),"\n",(0,t.jsx)(n.p,{children:"Create a new event."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Example request"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'POST /v3.0/events HTTP/1.1\nAuthorization: Bearer 0a1b2c3d4e5f\nContent-Type: application/json\n\n{\n "dates": [\n {\n "start": "2018-02-16T20:00:00.000Z",\n "end": "2018-02-17T02:00:00.000Z",\n }\n ],\n "description": "Get ready for the best party <b>ever</b>!",\n "media_credits": "John Doe",\n "media_file": {\n "content": "iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAIAAABsjUUPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gIMCwI4sS/JDAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAhUlEQVR42u3QQQ0AAAgEoNP+nfVtBDeIQCUTrlYgRYoUKVKkSJEiRYoUKVKQIkWKFClSpEiRIkWKFClSkCJFihQpUqRIkSJFihQpSJEiRYoUKVKkSJEiRYoUKUiRIkWKFClSpEiRIkWKFKRIkSJFihQpUqRIkSJFihSkSJEiRYoUKVKkfLRXPAG3AGqXuAAAAABJRU5ErkJggg==",\n "name": "test.png",\n "type": "image/png"\n },\n "name": "Fantastic party!",\n "pinpoint": 1,\n "tags": ["party"]\n}\n'})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Example response"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'HTTP/1.1 201 OK\nContent-Type: application/json\n\n{\n "dates": [\n {\n "start": "2018-02-16T20:00:00.000Z",\n "end": "2018-02-17T02:00:00.000Z",\n }\n ],\n "description": "Get ready for the best party <b>ever</b>!",\n "id": 1234,\n "media_credits": "John Doe",\n "media_url": "https://api.getwemap.com/images/pps-events/e8c836b1c71894d1e0d7901d.png",\n "name": "Fantastic party!",\n "tags": ["party"]\n}\n'})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request JSON Object"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"dates"})," (",(0,t.jsx)(n.em,{children:"array"}),") \u2013 List of start/end dates."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"description"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 HTML description."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"media_credits"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 Media credits and copyright."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"media_file"})," (",(0,t.jsx)(n.em,{children:"object"}),") \u2013 Media for the event."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"name"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 Name of the event."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"pinpoint"})," (",(0,t.jsx)(n.em,{children:"integer"}),") \u2013 Pinpoint where the event takes place."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"tags"})," (",(0,t.jsx)(n.em,{children:"array"}),") \u2013 List of tags."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Status Codes"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2",children:"201 Created"})," \u2013 success"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",children:"400 Bad Request"})," \u2013 for instance a required field is missing"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",children:"401 Unauthorized"})," \u2013 you did not provide authentication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",children:"403 Forbidden"})," \u2013 you tried to access a forbidden resource"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.h3,{id:"get-v30events-1",children:[(0,t.jsx)(n.code,{children:"GET"})," /v3.0/events/:id"]}),"\n",(0,t.jsx)(n.p,{children:"Return the given event."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Status Codes"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1",children:"200 OK"})," \u2013 success"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",children:"401 Unauthorized"})," \u2013 you did not provide authentication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",children:"403 Forbidden"})," \u2013 you tried to access a forbidden resource"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",children:"404 Not Found"})," \u2013 the requested resource was not found"]}
1),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.h3,{id:"put-v30events",children:[(0,t.jsx)(n.code,{children:"PUT"})," /v3.0/events/:id"]}),"\n",(0,t.jsx)(n.p,{children:"Update the given event."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Request JSON Object"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"dates"})," (",(0,t.jsx)(n.em,{children:"array"}),") \u2013 List of start/end dates."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"description"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 HTML description."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"media_credits"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 Media credits and copyright."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"media_file"})," (",(0,t.jsx)(n.em,{children:"object"}),") \u2013 Media for the event."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"name"})," (",(0,t.jsx)(n.em,{children:"string"}),") \u2013 Name of the event."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"pinpoint"})," (",(0,t.jsx)(n.em,{children:"integer"}),") \u2013 Pinpoint where the event takes place."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"tags"})," (",(0,t.jsx)(n.em,{children:"array"}),") \u2013 List of tags."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Status Codes"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1",children:"200 OK"})," \u2013 success"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",children:"400 Bad Request"})," \u2013 for instance a required field is missing"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",children:"401 Unauthorized"})," \u2013 you did not provide authentication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",children:"403 Forbidden"})," \u2013 you tried to access a forbidden resource"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",children:"404 Not Found"})," \u2013 the requested resource was not found"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.h3,{id:"delete-v30events",children:[(0,t.jsx)(n.code,{children:"DELETE"})," /v3.0/events/:id"]}),"\n",(0,t.jsx)(n.p,{children:"Delete the given event."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Status Codes"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5",children:"204 No Content"})," \u2013 success"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2",children:"401 Unauthorized"})," \u2013 you did not provide authentication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4",children:"403 Forbidden"})," \u2013 you tried to access a forbidden resource"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",children:"404 Not Found"})," \u2013 the requested resource was not found"]}),"\n"]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},28453(e,n,s){s.d(n,{R:()=>c,x:()=>l});var r=s(96540);const t={},i=r.createContext(t);function c(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.