This documentation is for ArcGIS REST JS 3.x which is no longer maintained. For the latest 4.x documentation see ArcGIS REST JS on the ArcGIS Developer website.
Version 3.4.3

@esri/arcgis-rest-service-admin

Service administration helpers for @esri/arcgis-rest-js

npm install:

npm install @esri/arcgis-rest-service-admin @esri/arcgis-rest-auth@^3.0.0  @esri/arcgis-rest-portal@^3.0.0  @esri/arcgis-rest-request@^3.0.0 

Module Import:

import {
  addToServiceDefinition,
  createFeatureService,
  getServiceAdminInfo,
  getViewSources,
  updateServiceDefinition,
} from "@esri/arcgis-rest-service-admin";

CDN:

<script src="https://unpkg.com/@esri/arcgis-rest-service-admin@3.4.3/dist/umd/service-admin.umd.min.js"></script>

CDN with SRI:

<script src="https://unpkg.com/@esri/arcgis-rest-service-admin@3.4.3/dist/umd/service-admin.umd.min.js" integrity="sha384-N39ctoB6NBQJ9os5nvwy7lmLHLtqzVaR1oyrw3GZ47lTVtZfRGTTVKgha9E3rbpT" crossorigin="anonymous"></script>