Events

DEPRECATED. The Events service enabled developers to create and manage scheduled Metaverse events. It served as a way to promote upcoming events via placeholders on user-facing websites.

Get all events

get

Returns all the events, both public and private, that a user has permission to access. An event will only include the necessary data needed to launch the event, under the 'launchContext' field, if it is live. Accepts an optional projectId header to only fetch events from that project.

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringOptional

The ID of a project

Responses
200
The response for GET /events, an array of all events a user has permission to access
application/json
Responseall of[]

The response for GET /events, an array of all events a user has permission to access

get
GET /api/events/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
Accept: */*
[
  {
    "title": "text",
    "eventId": "text",
    "worldId": "text",
    "schedule": {
      "startTime": 1,
      "endTime": 1
    },
    "videoStream": {
      "millicast": {
        "accountId": "text",
        "streamName": "text"
      },
      "youtubeUrl": "text",
      "activeService": "MILLICAST"
    },
    "pictureUrl": "text",
    "isPublic": true,
    "description": "text",
    "data": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "ubitusEvent": {
      "specId": "text",
      "minCapacity": 1,
      "maxCapacity": 1
    },
    "launchContext": {
      "launchContextId": "text",
      "errorPageUrl": "text",
      "okPageUrl": "text",
      "gdnStreaming": {
        "cmsId": "text",
        "authorizationId": "text",
        "launchMode": "same-tab",
        "useCustomClient": true,
        "useWindowedMode": true
      },
      "ubitusStreaming": {
        "gameLabel": "text",
        "gameChannel": "text"
      },
      "streamManager": {
        "streamContextId": "text",
        "allowForceProvider": true,
        "showProviderOptions": true,
        "useBuildVersion": true
      },
      "enableQueue": true,
      "capacity": 1,
      "isActive": true,
      "buildInfo": {
        "buildChannelId": "text",
        "buildTag": "text",
        "buildType": "client"
      },
      "publicDownload": {
        "enabled": true,
        "enforceAntiCheat": true,
        "allowMac": true,
        "allowIos": true
      },
      "bypassBrowserRestrictions": true,
      "isPublic": true,
      "projectId": "text",
      "organizationId": "text",
      "worldId": "text"
    },
    "canUserWrite": true,
    "projectId": "text"
  }
]

Create an event

post

Creates an event in the project specified in the headers

Authorizations
Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Body

Body of POST /events to create an event

titlestringRequired
worldIdstringOptional

The ID of the world that the user will enter upon launching the event

pictureUrlstringOptional

The URL of the thumbnail for the event

isPublicbooleanOptional

Defines whether the event is publicly visible or not. If true, the event will be visible by all users, but only users with the necessary permissions will be able to launch into the event.

descriptionstringOptional
Responses
201
The response for POST /events, an eventId representing the created event
application/json
post
POST /api/events/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
x-m2-project-id: text
Content-Type: application/json
Accept: */*
Content-Length: 356

{
  "title": "text",
  "worldId": "text",
  "schedule": {
    "startTime": 1,
    "endTime": 1
  },
  "videoStream": {
    "millicast": {
      "accountId": "text",
      "streamName": "text"
    },
    "youtubeUrl": "text",
    "activeService": "MILLICAST"
  },
  "pictureUrl": "text",
  "isPublic": true,
  "description": "text",
  "data": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "ubitusEvent": {
    "specId": "text",
    "minCapacity": 1,
    "maxCapacity": 1
  }
}
{
  "eventId": "text"
}

Get all publicly visible events

get

Returns all publicly visible events for a project without requiring authentication, where a public event is one in which the isPublic field on the event is set to true

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Responses
200
The response for GET /events/public, an array of public events
application/json
get
GET /api/events/public/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-m2-organization-id: text
x-m2-project-id: text
Accept: */*
[
  {
    "title": "text",
    "eventId": "text",
    "worldId": "text",
    "schedule": {
      "startTime": 1,
      "endTime": 1
    },
    "videoStream": {
      "millicast": {
        "accountId": "text",
        "streamName": "text"
      },
      "youtubeUrl": "text",
      "activeService": "MILLICAST"
    },
    "pictureUrl": "text",
    "isPublic": true,
    "description": "text",
    "data": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "ubitusEvent": {
      "specId": "text",
      "minCapacity": 1,
      "maxCapacity": 1
    },
    "projectId": "text",
    "canUserWrite": true
  }
]

Get an event

get

Returns the event with the given ID. This endpoint will only return the necessary data needed to launch the event under the 'launchContext' field if it is live.

Authorizations
Path parameters
eventIdstringRequired

The ID of the event to retrieve

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Responses
200
The response for GET /event/:eventId endpoint
application/json
Responseall of

The response for GET /event/:eventId endpoint

get
GET /api/events/{eventId}/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
x-m2-project-id: text
Accept: */*
{
  "title": "text",
  "eventId": "text",
  "worldId": "text",
  "schedule": {
    "startTime": 1,
    "endTime": 1
  },
  "videoStream": {
    "millicast": {
      "accountId": "text",
      "streamName": "text"
    },
    "youtubeUrl": "text",
    "activeService": "MILLICAST"
  },
  "pictureUrl": "text",
  "isPublic": true,
  "description": "text",
  "data": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "ubitusEvent": {
    "specId": "text",
    "minCapacity": 1,
    "maxCapacity": 1
  },
  "launchContext": {
    "launchContextId": "text",
    "errorPageUrl": "text",
    "okPageUrl": "text",
    "gdnStreaming": {
      "cmsId": "text",
      "authorizationId": "text",
      "launchMode": "same-tab",
      "useCustomClient": true,
      "useWindowedMode": true
    },
    "ubitusStreaming": {
      "gameLabel": "text",
      "gameChannel": "text"
    },
    "streamManager": {
      "streamContextId": "text",
      "allowForceProvider": true,
      "showProviderOptions": true,
      "useBuildVersion": true
    },
    "enableQueue": true,
    "capacity": 1,
    "isActive": true,
    "buildInfo": {
      "buildChannelId": "text",
      "buildTag": "text",
      "buildType": "client"
    },
    "publicDownload": {
      "enabled": true,
      "enforceAntiCheat": true,
      "allowMac": true,
      "allowIos": true
    },
    "bypassBrowserRestrictions": true,
    "isPublic": true,
    "projectId": "text",
    "organizationId": "text",
    "worldId": "text"
  },
  "canUserWrite": true,
  "projectId": "text"
}

Update an event

patch
Authorizations
Path parameters
eventIdstringRequired

The ID of the event to update

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Body

Body of PATCH /events to update an event

titlestringOptional
worldIdany ofOptional
stringOptional

The ID of the world that the user will enter upon launching the event

or
nullOptional
scheduleany ofOptional
or
nullOptional
videoStreamany ofOptional
or
nullOptional
pictureUrlstringOptional

The URL of the thumbnail for the event

isPublicbooleanOptional

Defines whether the event is publicly visible or not. If true, the event will be visible by all users, but only users with the necessary permissions will be able to launch into the event.

descriptionany ofOptional
stringOptional
or
nullOptional
dataany ofOptional
or
nullOptional
Responses
204
Default Response
application/json
Responseany
patch
PATCH /api/events/{eventId}/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
x-m2-project-id: text
Content-Type: application/json
Accept: */*
Content-Length: 356

{
  "title": "text",
  "worldId": "text",
  "schedule": {
    "startTime": 1,
    "endTime": 1
  },
  "videoStream": {
    "millicast": {
      "accountId": "text",
      "streamName": "text"
    },
    "youtubeUrl": "text",
    "activeService": "MILLICAST"
  },
  "pictureUrl": "text",
  "isPublic": true,
  "description": "text",
  "data": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "ubitusEvent": {
    "specId": "text",
    "minCapacity": 1,
    "maxCapacity": 1
  }
}

No content

Delete an event

delete
Authorizations
Path parameters
eventIdstringRequired

The ID of the event to delete

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Responses
204
Default Response
application/json
Responseany
delete
DELETE /api/events/{eventId}/ HTTP/1.1
Host: your-organization-id.m2worlds.io
Authorization: Bearer YOUR_SECRET_TOKEN
x-m2-organization-id: text
x-m2-project-id: text
Accept: */*

No content

Updates the thumbnail for an event

patch
Authorizations
Path parameters
eventIdstringRequired

The ID of the event to update

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Responses
200
The picture url of an event
application/json
patch
PATCH /api/events/{eventId}/pictureUrl/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
x-m2-project-id: text
Accept: */*
{
  "pictureUrl": "text"
}

Get the data needed to launch into the world linked to an event

get

Returns the launchContext for an event, which defines all the data needed to launch the event, either by downloading the world or by launching the world in a browser.

Authorizations
Path parameters
eventIdstringRequired

ID of the target event for launch context retrieval

Header parameters
x-m2-organization-idstringRequired

The ID of an organization

x-m2-project-idstringRequired

The ID of a project

Responses
200
The response when retrieving a launch context linked to an event
application/json
Responseall of

The response when retrieving a launch context linked to an event

get
GET /api/events/{eventId}/launchContext/ HTTP/1.1
Host: your-organization-id.m2worlds.io
x-api-key: YOUR_API_KEY
x-m2-organization-id: text
x-m2-project-id: text
Accept: */*
{
  "launchContextId": "text",
  "errorPageUrl": "text",
  "okPageUrl": "text",
  "gdnStreaming": {
    "cmsId": "text",
    "authorizationId": "text",
    "launchMode": "same-tab",
    "useCustomClient": true,
    "useWindowedMode": true
  },
  "ubitusStreaming": {
    "gameLabel": "text",
    "gameChannel": "text"
  },
  "streamManager": {
    "streamContextId": "text",
    "allowForceProvider": true,
    "showProviderOptions": true,
    "useBuildVersion": true
  },
  "enableQueue": true,
  "capacity": 1,
  "isActive": true,
  "buildInfo": {
    "buildChannelId": "text",
    "buildTag": "text",
    "buildType": "client"
  },
  "publicDownload": {
    "enabled": true,
    "enforceAntiCheat": true,
    "allowMac": true,
    "allowIos": true
  },
  "bypassBrowserRestrictions": true,
  "isPublic": true,
  "projectId": "text",
  "organizationId": "text",
  "worldId": "text"
}

Last updated

Was this helpful?