- Legion API
- Event Types
- Get global event types
Get global event types
const url = 'https://legion.picogrid.com/v2/events/types';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://legion.picogrid.com/v2/events/typesGet all global event types, these are defined by Picogrid and available for all organizations.
Responses
Section titled “Responses”Success
object
Examplegenerated
[ { "id": "example", "name": "example" }]Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Request Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Authentication Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Unauthorized Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Resource Not Found Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Timeout Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Gateway Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Version 2 · commit 0771262
