Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

Examples calling the API defined below with the Unix utility "curl" can be found here

DuraStore

...

All Applications

Panel
titleSecurity Initialization REST Methods

Initialize

Stores

Security Users

  • Purpose: Allows the initialization of storage provider accountsauthorized users
  • Request: stores
  • Request Body: XML similar to: Request Body: XML similar to:
    Code Block
    xml
    xml
    <storageProviderAccounts>
      <storageAcct ownerId='0' isPrimary='true'>
        <id>1</id><?xml version="1.0" encoding="UTF-8"?>
    <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
      <security-user>
        <storageProviderType>AMAZON_S3</storageProviderType><username>username-0</username>
        <storageProviderCredential><password>password-0</password>
        <enabled>true</enabled>
      <username>username<  <accountNonExpired>true</username>accountNonExpired>
          <password>password<<credentialsNonExpired>true</password>credentialsNonExpired>
        <<accountNonLocked>true</storageProviderCredential>accountNonLocked>
      </storageAcct>
    </storageProviderAccounts>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)
  •   <grantedAuthorities>ROLE_USER</grantedAuthorities>
      </security-user>
      <security-user>
        <username>username-1</username>
        <password>password-1</password>
        <enabled>false</enabled>
        <accountNonExpired>false</accountNonExpired>
        <credentialsNonExpired>false</credentialsNonExpired>
        <accountNonLocked>false</accountNonLocked>
        <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
      </security-user>
    </dur:security-users>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

DuraStore

Purpose: DuraStore is the application through which DuraCloud manages storage. The DuraStore REST API provides access to storage by mediating the underlying storage provider APIs to allow access to multiple cloud storage options through a single API.

Panel
titleInitialization REST Methods

Initialize Stores

  • Purpose: Allows the initialization of storage provider accounts
  • Request: POST https://host:port/durastore/storesImage Added
  • Request Body: XML similar to:
    Code Block
    xml
    xml
    
    <storageProviderAccounts>
      <storageAcct ownerId='0' isPrimary='true'>
        <id>1</id>
        <storageProviderType>AMAZON_S3</storageProviderType>
        <storageProviderCredential>
          <username>username</username>
          <password>password</password>
        </storageProviderCredential>
      </storageAcct>
    </storageProviderAccounts>

Initialize Security Users

  • Purpose: Allows the initialization of authorized users
  • Request: POST https://host:port/durastore/securityImage Removed
  • Request Body: XML similar to:
    Code Block
    xmlxml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
      <security-user>
        <username>username-0</username>
        <password>password-0</password>
        <enabled>true</enabled>
        <accountNonExpired>true</accountNonExpired>
        <credentialsNonExpired>true</credentialsNonExpired>
        <accountNonLocked>true</accountNonLocked>
        <grantedAuthorities>ROLE_USER</grantedAuthorities>
      </security-user>
      <security-user>
        <username>username-1</username>
        <password>password-1</password>
        <enabled>false</enabled>
        <accountNonExpired>false</accountNonExpired>
        <credentialsNonExpired>false</credentialsNonExpired>
        <accountNonLocked>false</accountNonLocked>
        <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
      </security-user>
    </dur:security-users>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)

...

Panel
titleInitialization REST Methods

Initialize Services

  • Purpose: Initializes the DuraService application
  • Request: POST https://host:port/duraservice/services
  • Request Body: XML similar to:
    Code Block
    xml
    xml
     <servicesConfig>
       <primaryServiceInstance>
          <host>[PRIMARY-SERVICE-INSTANCE-HOST]</host>
          <servicesAdminPort>[PRIMARY-SERVICES-ADMIN-PORT]</servicesAdminPort>
          <servicesAdminContext>[PRIMARY-SERVICES-ADMIN-CONTEXT]</servicesAdminContext>
       </primaryServiceInstance>
       <userStorage>
         <host>[USER-STORAGE-HOST-NAME]</host>
         <port>[USER-STORAGE-PORT]</port>
         <context>[USER-STORAGE-CONTEXT]</context>
         <msgBrokerUrl>[USER-STORAGE-MSG-BROKER-URL]</msgBrokerUrl>
       </userStorage>
       <serviceStorage>
         <host>[SERVICES-STORAGE-HOST-NAME]</host>
         <port>[SERVICES-STORAGE-PORT]</port>
         <context>[SERVICES-STORAGE-CONTEXT]</context>
         <spaceId>[SERVICES-STORAGE-SPACE-ID]</spaceId>
       </serviceStorage>
       <serviceCompute>
         <type>AMAZON_EC2</type>
         <imageId>[MACHINE-IMAGE-ID]</imageId>
         <computeProviderCredential>
           <username>[USERNAME]</username>
           <password>[PASSWORD]</password>
         </computeProviderCredential>
       </serviceCompute>
     </servicesConfig>
    
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)
Initialize Security Users
<?xml version="1.0" encoding="UTF-8"?> <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org"> <security-user> <username>username-0</username> <password>password-0</password> <enabled>true</enabled> <accountNonExpired>true</accountNonExpired> <credentialsNonExpired>true</credentialsNonExpired> <accountNonLocked>true</accountNonLocked> <grantedAuthorities>ROLE_USER</grantedAuthorities> </security-user> <security-user> <username>username-1</username> <password>password-1</password> <enabled>false</enabled> <accountNonExpired>false</accountNonExpired> <credentialsNonExpired>false</credentialsNonExpired> <accountNonLocked>false</accountNonLocked> <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities> </security-user> </dur:security-users>
  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)
  • Panel
    titleService REST Methods

    Get Services

    • Purpose: Allows the initialization of authorized usersRetrieves a listing of services, along with their configuration options
    • Request: POST GET https://host:port/duraservice/securityservicesImage Modified ? (show)
      • Parameter options for show (optional)
        1. available (default) - Includes only services which have not been deployed but are available for deployment
        2. deployed - Includes only services which have been deployed and started
    • Response Code: 200 (on success)
    • Response Body: XML list of services (see service config xsd)

    Get Service

    • Purpose: Retrieves information about a particular service including description, configuration options, and all deployments
    • Request: GET https://host:port/duraservice/serviceIDImage Added
    • Response Code: 200 (on success)
    • Response Body: XML service (see service config xsd)

    Get Deployed Service

    • Purpose: Retrieves information about a deployed service including description, configuration options, and a single deployment indicating the configuration options in use
    • Request: GET https://host:port/duraservice/serviceID/deploymentIDImage Added
    • Response Code: 200 (on success)
    • Response Body: XML service (see service config xsd)

    Get Deployed Service Properties

    Code Block
    xmlxml
    Panel
    titleService REST Methods
    • XML service (simple xml Map serialization)

    Deploy Service

    • Purpose: Deploys and starts an available service
    • Request: PUT

    Get Services

    • Purpose: Retrieves a listing of services, along with their configuration options
    • Request: GET https://host:port/duraservice/servicesserviceIDImage Modified ? (showserviceHost)
      • Parameter options value for show serviceHost (optional)
        1. available (default) - Includes only services which have not been deployed but are available for deployment
        2. deployed - Includes only services which have been deployed and started
        should indicate the services host on which the service should be deployed. Default is the primary customer host.
    • Request Body: XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
    • Response Code: 201 Response Code: 200 (on success)
    • Response Body: XML list of services (see service config xsd)

    Get Service

    • Purpose: Retrieves information about a particular service including description, configuration options, and all deployments
    • Request: GET https://host:port/duraservice/serviceIDImage Removed
    • Response Code: 200 (on success)
    • Response Body: XML service (see service config xsd)

    Get Deployed Service

    • Purpose: Retrieves information about a deployed service including description, configuration options, and a single deployment indicating the configuration options in use
    • Request: GET https://host:port/duraservice/serviceID/deploymentIDImage Removed
    • Response Code: 200 (on success)
    • Response Body: XML service (see service config xsd)

    Get Deployed Service Properties

    Deploy Service

    • Purpose: Deploys and starts an available service
    • Request: PUT https://host:port/duraservice/serviceIDImage Removed ? (serviceHost)
      • Parameter value for serviceHost (optional) should indicate the services host on which the service should be deployed. Default is the primary customer host.
    • Request Body: XML user configuration indicating the config selections for the service (see user config portion of service config xsd)
    • Response Code: 201 (on success)
    • Response Header: Location header indicates the URL at which information about the deployed service can be retrieved (the URL for a get deployed service call) which includes the deploymentID

    Update Service Configuration

    UnDeploy Service

    DurAdmin

    Purpose: DurAdmin is the user-facing application through which DuraCloud exposes DuraStore and DuraService functionality. The DurAdmin REST API provides the means by which DurAdmin is initialized.

  • Response Code: 200 (on success)
  • Response Body: "Initialization Successful" (on success)
  • Initialize Security Users

    <?xml version="1.0" encoding="UTF-8"?> <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org"> <security-user> <username>username-0</username> <password>password-0</password> <enabled>true</enabled> <accountNonExpired>true</accountNonExpired> <credentialsNonExpired>true</credentialsNonExpired> <accountNonLocked>true</accountNonLocked> <grantedAuthorities>ROLE_USER</grantedAuthorities> </security-user> <security-user> <username>username-1</username> <password>password-1</password> <enabled>false</enabled> <accountNonExpired>false</accountNonExpired> <credentialsNonExpired>false</credentialsNonExpired> <accountNonLocked>false</accountNonLocked> <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities> </security-user> </dur:security-users>
  • Response Code: 200 (on success)
  • UnDeploy Service

    • Header: Location header indicates the URL at which information about the deployed service can be retrieved (the URL for a get deployed service call) which includes the deploymentID

    Update Service Configuration

    Panel
    titleInitialization REST Methods

    Initialize Application

  • Purpose: Allows the initialization of duradmin
  • Request: POST https://host:port/duradmin/initImage Removed
  • Request Body: XML similar to:
    Code Block
    xmlxml
    
    <duradminConfig>
      <durastoreHost>[host]</durastoreHost>
      <durastorePort>8080</durastorePort>
      <durastoreContext>durastore</durastoreContext>
      <duraserviceHost>[host]</duraserviceHost>
      <duraservicePort>8080</duraservicePort>
      <duraserviceContext>duraservice</duraserviceContext>
    </duradminConfig>
    
    Code Block
    xmlxml

    ...

    DurAdmin

    Purpose: DuraReport generates reports relating to the status of your DuraCloud instance, and provides a simple interface for accessing those reportsDurAdmin is the user-facing application through which DuraCloud exposes DuraStore and DuraService functionality. The DurAdmin REST API provides the means by which DurAdmin is initialized.

    Panel
    titleInitialization REST Methods

    Initialize Application

    • Purpose: Allows the initialization of durareportduradmin
    • Request: POST https://host:port/durareportduradmin/reportsinitImage Modified
    • Request Body: XML similar to:
      Code Block
      xml
      xml
      <durareportConfig><duradminConfig>
        <durastoreHost>[host]</durastoreHost>
        <durastorePort>8080</durastorePort>
        <durastoreContext>durastore</durastoreContext>
        <duraserviceHost>[host]</duraserviceHost>
        <duraservicePort>8080</duraservicePort>
        <duraserviceContext>duraservice</duraserviceContext>
      </durareportConfig>duradminConfig>
      
    • Response Code: 200 (on success)
    • Response Body: "Initialization Successful" (on success)
    Initialize Security Users

    DuraReport

    Purpose: DuraReport generates reports relating to the status of your DuraCloud instance, and provides a simple interface for accessing those reports.

    Panel
    titleInitialization REST Methods

    Initialize Application

    • Purpose: Allows the initialization of durareport
    • Request: POST https://host:port/durareport/reportsImage Added
    • Request Body: XML similar to:
      Code Block
      xml
      xml
      
      <durareportConfig>
        <durastoreHost>[host]</durastoreHost>
        <durastorePort>8080</durastorePort>
        <durastoreContext>durastore</durastoreContext>
        <duraserviceHost>[host]</duraserviceHost>
        <duraservicePort>8080</duraservicePort>
        <duraserviceContext>duraservice</duraserviceContext>
      </durareportConfig>
    • Allows the initialization of authorized users
    • Request: POST https://host:port/durareport/securityImage Removed
    • Request Body: XML similar to:
      Code Block
      xmlxml
      
      <?xml version="1.0" encoding="UTF-8"?>
      <dur:security-users schemaVersion="0.2" xmlns:dur="duracloud.org">
        <security-user>
          <username>username-0</username>
          <password>password-0</password>
          <enabled>true</enabled>
          <accountNonExpired>true</accountNonExpired>
          <credentialsNonExpired>true</credentialsNonExpired>
          <accountNonLocked>true</accountNonLocked>
          <grantedAuthorities>ROLE_USER</grantedAuthorities>
        </security-user>
        <security-user>
          <username>username-1</username>
          <password>password-1</password>
          <enabled>false</enabled>
          <accountNonExpired>false</accountNonExpired>
          <credentialsNonExpired>false</credentialsNonExpired>
          <accountNonLocked>false</accountNonLocked>
          <grantedAuthorities>ROLE_USER ROLE_ADMIN</grantedAuthorities>
        </security-user>
      </dur:security-users>
      
    • Response Code: 200 (on success)
    • Response Body: "Initialization Successful" (on success)