Sync Asset

Synchronize assets on the EnOS to the Application Portal.

Prerequisites

  • The associated application has been purchased by the organization.
  • The associated application must have access permissions (authorized by the organization administrator) for the assets.

Request Format

GET https://{apigw-address}/app-portal-service/v2.0/asset/sync

Request Parameters (URI)

Name Location (Path/Query) Mandatory/Optional Data Type Description
orgId Query Mandatory String The organization ID which the asset belongs to. How to get orgId >>

Response Parameters

Name Data Type Description
data Boolean (null)

Samples

Request Sample

url: https://alpha-apim-cn4.eniot.io/app-portal-service/v2.0/asset/sync?orgId=yourOrgId
method: GET

Return Sample

{"code":200,"message":"","data":null}

Java SDK Sample

public class AppPortalSdkTest{
    @Test
    public void syncAssetTest() {
        AssetSynchronizationRequest request=new AssetSynchronizationRequest("your_org_id");
        Response response=Poseidon.config(PConfig.init().appKey("your_access_key").appSecret("your_secret_key").debug())
                .url("https://{apigw-address}").getResponse(request,Response.class);

        assertNotNull("Response should not be null", response);
    }
}