# SessionService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/SessionService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/SessionService

## Methods

### AcquireContextFocus

```luau
SessionService:AcquireContextFocus(context: string)
```

- Tags: Roblox script security

### GenerateSessionInfoString

```luau
SessionService:GenerateSessionInfoString(includeArbitrarySessions: boolean, includeTag: boolean, includeTimestamps: boolean, includeMetadata: boolean): string
```

- Tags: Roblox script security

### GetBreadcrumbs

```luau
SessionService:GetBreadcrumbs(): { any }
```

- Tags: Roblox script security

### GetCreatedTimestampUtcMs

```luau
SessionService:GetCreatedTimestampUtcMs(sid: string): number
```

- Tags: Roblox script security

### GetHistory

```luau
SessionService:GetHistory(): { any }
```

- Tags: Roblox script security

### GetMetadata

```luau
SessionService:GetMetadata(sid: string, key: string): any
```

- Tags: Roblox script security

### GetRootSID

```luau
SessionService:GetRootSID(): string
```

- Tags: Roblox script security

### GetSessionID

```luau
SessionService:GetSessionID(structuralId: string): string
```

- Tags: Roblox script security

### GetSessionTag

```luau
SessionService:GetSessionTag(sid: string): string
```

- Tags: Roblox script security

### IsContextFocused

```luau
SessionService:IsContextFocused(context: string): boolean
```

- Tags: Roblox script security

### ReleaseContextFocus

```luau
SessionService:ReleaseContextFocus(context: string)
```

- Tags: Roblox script security

### RemoveMetadata

```luau
SessionService:RemoveMetadata(sid: string, key: string, context: string? = "")
```

- Tags: Roblox script security

### RemoveSession

```luau
SessionService:RemoveSession(sid: string, context: string? = "")
```

- Tags: Roblox script security

### RemoveSessionsWithMetadataKey

```luau
SessionService:RemoveSessionsWithMetadataKey(key: string)
```

- Tags: Roblox script security

### ReplaceSession

```luau
SessionService:ReplaceSession(sid: string, tag: string)
```

- Tags: Roblox script security

### SessionExists

```luau
SessionService:SessionExists(sid: string): boolean
```

- Tags: Roblox script security

### SetMetadata

```luau
SessionService:SetMetadata(sid: string, key: string, value: any, context: string? = "")
```

- Tags: Roblox script security

### SetSession

```luau
SessionService:SetSession(parentSid: string, childSid: string, tag: string, context: string? = "")
```

- Tags: Roblox script security

## Events

### SessionChanged

```luau
SessionService.SessionChanged: RBXScriptSignal<(structuralId: string, currentTag: string, currentSessionId: string, previousTag: string, previousSessionId: string)>
```

- Tags: Roblox script security

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
