Model
    • PDF

    Model

    • PDF

    Article Summary

    Add a model

    URL

    POST https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10

    Request Body

    {
      "modelDescription" : "modelDescription",
      "modelName" : "modelName",
      "modelSchema" : "modelSchema"
    }
    

    Response Code

    • 201

    Response Body

    {
      "modelDescription" : "modelDescription",
      "modelName" : "modelName",
      "modelId" : "modelId",
      "modelSchema" : "modelSchema",
      "apiId" : "apiId"
    }
    

    Delete a model

    URL

    DELETE https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models/{model-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10
    modelIdpathYStringModel Id
    Length(Min/Max): 0/10

    Request Body

    • None

    Response Code

    • 204

    Response Body

    • None

    Get a model

    URL

    GET https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models/{model-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10
    modelIdpathYStringModel Id
    Length(Min/Max): 0/10

    Request Body

    • None

    Response Code

    • 200

    Response Body

    {
      "modelDescription" : "modelDescription",
      "modelName" : "modelName",
      "modelId" : "modelId",
      "modelSchema" : "modelSchema",
      "apiId" : "apiId"
    }
    

    Get Models by Api

    URL

    GET https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10
    offsetquery stringNLongOffset
    Min: 0
    Max: 9,223,372,036,854,775,807
    limitquery stringNLongLimit
    Min: 1
    Max: 9,223,372,036,854,775,807
    modelNamequery stringNStringModel Name
    Length(Min/Max): 0/100

    Request Body

    • None

    Response Code

    • 200

    Response Body

    {
      "productPage" : {
        "total" : 0,
        "content" : [ {
          "modelDescription" : "modelDescription",
          "modelName" : "modelName",
          "modelId" : "modelId",
          "modelSchema" : "modelSchema",
          "apiId" : "apiId"
        } ]
      }
    }
    

    Preview a model

    URL

    POST https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models/preview
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10

    Request Body

    {
      "modelId" : "modelId",
      "modelSchema" : "modelSchema"
    }
    

    Response Code

    • 200

    Response Body

    {
      "modelSchema" : "{}"
    }
    

    Update a model

    URL

    PUT https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/models/{model-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    productIdpathYStringProduct Id
    Length(Min/Max): 0/10
    apiIdpathYStringApi Id
    Length(Min/Max): 0/10
    modelIdpathYStringModel Id
    Length(Min/Max): 0/10

    Request Body

    {
      "modelDescription" : "modelDescription",
      "modelSchema" : "modelSchema"
    }
    

    Response Code

    • 200

    Response Body

    {
      "modelDescription" : "modelDescription",
      "modelName" : "modelName",
      "modelId" : "modelId",
      "modelSchema" : "modelSchema",
      "apiId" : "apiId"
    }
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.