Skip to content

Servers

add_remote_server async

add_remote_server(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    body: AddServer,
) -> AddServerResponse

Adds a new remote server based on the input of an admin.

Input:

  • Data containing details of the remote server to be added

  • The current database

Output:

  • Response indicating the result of the server addition operation

add_remote_server_depr async

add_remote_server_depr(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    body: AddServer,
) -> AddServerResponse

Adds a new remote server based on the input of an admin.

Input:

  • Data containing details of the remote server to be added
  • The current database

Output:

  • Response indicating the result of the server addition operation

delete_remote_server async

delete_remote_server(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    server_id: Annotated[str, Path(alias=server_id)],
) -> StandardStatusIdentifiedResponse

Deletes a remote server if the given id is valid.

Input:

  • Identifier of the remote server to be deleted

  • The current database

Output:

  • Response indicating the result of the server deletion operation

get_remote_server_by_id async

get_remote_server_by_id(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    server_Id: Annotated[str, Path(alias=serverId)],
) -> GetRemoteServer

Returns information for a specific remote server chosen by its id.

Input:

  • serverId: the server's ID

  • The current database

Output:

  • server information regarding the chosen server

get_remote_servers async

get_remote_servers(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
) -> list[GetRemoteServer]

Returns a list of all currently active remote servers.

Input:

  • The current database

Output:

  • List of remote servers

get_remote_servers_depr async

get_remote_servers_depr(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
) -> list[GetRemoteServer]

Deprecated Returns a list of all currently active remote servers.

Input:

  • The current database

Output:

  • List of remote servers

get_version async

get_version(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
) -> dict

Gets the Version of the server.

Input:

  • auth: Authentication details

  • db: Database session

Output:

  • Version of the server
  • Permissions for sync, sighting, and galaxy editor
  • Request encoding
  • Filter sightings flag

update_remote_server async

update_remote_server(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    server_id: Annotated[str, Path(alias=server_id)],
    body: EditServer,
) -> AddServerResponse

Edits servers given by org_id.

Input:

  • org_id

  • The current database

  • auth: Authentication details

Output:

  • Updated servers as a list