@servicenow/sdk - v4.7.0
    Preparing search index...

    Route definition for a REST API endpoint (sys_ws_operation).

    interface Route {
        $id: string | number | ExplicitKey<string>;
        active?: boolean;
        authentication?: boolean;
        authorization?: boolean;
        consumes?: string;
        enforce_acl?: (string | Acl<(keyof Tables), AclType>)[];
        enforceAcl?: (string | Acl<(keyof Tables), AclType>)[];
        headers?: RouteHeader[];
        internalRole?: boolean;
        method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
        name?: string;
        parameters?: RouteParameter[];
        path?: string;
        policy?: "" | "read" | "protected";
        produces?: string;
        protectionPolicy?: "" | "read" | "protected";
        request_example?: string;
        requestExample?: string;
        script: string | ((request: any, response: any) => void);
        short_description?: string;
        shortDescription?: string;
    }
    Index

    Properties

    $id: string | number | ExplicitKey<string>
    active?: boolean

    If true, the endpoint is active and can receive requests.

    authentication?: boolean

    If true, the endpoint requires authentication.

    authorization?: boolean

    If true, the endpoint requires authorization.

    consumes?: string

    MIME type that the endpoint can consume.

    enforce_acl?: (string | Acl<(keyof Tables), AclType>)[]

    List of ACLs that control access to this endpoint.

    enforceAcl?: (string | Acl<(keyof Tables), AclType>)[]

    List of ACLs that control access to this endpoint.

    headers?: RouteHeader[]

    List of headers that the endpoint accepts or requires.

    internalRole?: boolean

    If true, the endpoint is only accessible to users with the internal role.

    method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"

    The HTTP method for the endpoint. Defaults to 'GET' if not specified.

    name?: string

    The name of the endpoint. This is displayed in the API documentation.

    parameters?: RouteParameter[]

    List of parameters that the endpoint accepts.

    path?: string

    The URL path for the endpoint, relative to the API's base URL.

    policy?: "" | "read" | "protected"

    Use protectionPolicy instead.

    produces?: string

    MIME type that the endpoint produces.

    protectionPolicy?: "" | "read" | "protected"

    The policy for how application files are protected when downloaded or installed.

    request_example?: string

    An example request payload for the endpoint.

    requestExample?: string

    An example request payload for the endpoint.

    script: string | ((request: any, response: any) => void)

    The script that processes the request and generates a response. Consider using a Server Module or Now.include() to move the script to a separate js file.

    short_description?: string

    A brief description of the endpoint.

    shortDescription?: string

    A brief description of the endpoint.