EN
Español
English
Português
    CI Edition

    Details of the request:

    • Base URL: {host}/ASMSAPI/
    • URI: api/v9/ci/{id}
    • Type: PUT
    • Required headings:

    • Content-Type: application/json
    • X-Authorization: Bearer {token}

    URL Description

    • {host}: It represents the domain of the environment in which the API is located.
    • ASMSAPI/: Fixed API prefix.
    • URI: Specific endpoint for the request.


    EXAMPLE URL:

    https://{host}/ASMSAPI/api/v9/ci/{id}
    


    URL parameters:

    Code Data type Obligatory Description
    Id Int Yes CI id to edit

    Additionally, it is possible to send the values you want to edit as parameters in the body of the request. These values correspond to the same values available in the creation process.

    Body Parameters:

    Name Data type Obligatory Description
    Type Int Yes Type · Ci = 21 · Packages = 48
    consoleType Int Yes Console Type: · Specialist = 1 · Client = 2, · Administrator = 3
    Name String Yes Name of the Ci
    categoryId Int No Category identifier, only required if the status is not sent
    stateId Int No Status identifier, is only required if the category id is not sent.
    responsibleId Int Yes Category Manager
    assetTag String No CI Inventory Tag ID
    acceptDate Long No Date of company acceptance, Unix time in milliseconds
    authorId Int No Author or CI record identifier
    barCode String No Barcode
    brandId Int No CI Brand Identifier in Database/Catalog
    checkinDate Long No Registration day unix format
    checkOutDate Long No Date Company CI Was Deleted/Terminated
    costCenterId Int No CI Cost Center
    licenseNumber String No CI License Number
    depreciationMethod Int No Depreciation method 1. Indicates that depreciation will be calculated using the straight-line method 2. Indicates that depreciation will be calculated using the method of the sum of the digits of the years.
    Description String No Description
    impactId Int No Identification number of the impact of CI on the organization
    installationDate Long No CI Installation Date
    manufacturerId Int No IC Manufacturer Identifier in Database/Catalog
    modelId Int No IC Model ID Number
    Price Int No price
    providerId Int No CI Provider Identifier in Database/Catalog
    RFID String No Radio frequency identifier for IC
    reasonId Int No Identifier of the reason why it is in the current state
    reponsibleDate Long No Date on which users became responsible for the CI. Unix format
    residualValue Decimal No CI value to save from original price
    riskId Int No Risk Level NoData = 0 Low = 1 Medium = 2 High = 3
    serial String No CI Serial Identifier
    unitSize String No IQ size value, for example: 17
    type Int No CI Type Identifier in an Enumeration: 21: Configuration Item 48: Package
    unit Int No Unit of IQ measurements.
    listAdditionalField Array Yes List of additional fields
    · boolValue Bool No Value if checkbox type
    · catalogId Int No Catalog ID (if it’s a catalog type field)
    · dateValue Long No Value if DateTime
    · Description String No Descriptive Text of the Field
    · enable Bool No True if the field is enabled for the current state (false otherwise)
    · fieldId Int No Unique identifier in the data source
    · fieldType Int No Describe the field type None = 0, ShortText = 1, Datetime = 2, List = 3, LongText = 4, CheckBox = 5, Numeric = 6, Recursive = 7, List2 = 8, Decimal = 9, File = 10, CatalogList = 11, CatalogTree = 12, Date = 13, Time = 14, Currency = 15, Link = 16, Position = 17, MultiSelect = 18
    · floatValue Decimal No Value if it is of decimal type
    · identifier String No Identifier
    · inputStream Stream No  
    · intValue Int No Value if it is integer type
    · itemId Int No Parent Item ID.
    · mandatory Bool No True if the field is required for the current state (false otherwise)
    · Name String No Friendly name of the field
    · order Int No Position in the field list
    · stringValue String No Value if it is of the chain type
    · type Int No Parent Type
    · visible Bool No True if the field is visible for the current state (false otherwise)
    projects Array Yes List of identifiers of projects related to the IC’s

    Body of the petition:

    {
        `"acceptDate": 1631250000000,     "assetTag": "45",
    
        `"barCode": "",
    
        `"brandId": 7326,
    
        `"categoryId": 53,
    
        `"checkinDate": 1632546000000,     "checkOutDate": 1631509200000,     "consoleType": 1,
    
        `"description": "",
    
        `"installationDate": 1632027600000,     "licenseNumber": "",
    
        `"modelId": 7395,
    
        `"name": "Computador HP Des93522",     "price": **null**,
    
        `"projects": [
    
            `{
    
                `"id": 19
    
            `}
    
        `],
    
        `"reasonId": 4829,
    
        `"reponsibleDate": 1631422800000,     "responsibleId": 4883,
    
        `"rfid": "",
    
        `"serial": "13213216513165",
    
        `"stateId": 6505,
    
        `"type": 21,
    
        `"unitSize": "",
    
        `"listAdditionalField": [
    
        `] }
    

    Answer:

    Value boleando indicating the result of the operation.

    {

    ` `“result”: True

    }

    Error messages:

    Code HTTP status Error Message
    400 BadRequest ForIntegrationInterfaceIdIsRequired
    400 BadRequest CategoryIdIsEmpty
    400 BadRequest StateIdIsEmpty
    400 BadRequest InvalidItemType
    400 BadRequest AdditionalFieldIsRequired
    400 BadRequest InvalidAdditionalFieldValue
    400 BadRequest InvalidSubcategoryId
    500 InternalServerError InvalidAdditionalFieldValue
    {
        `"exceptionMessage": "ForIntegrationInterfaceIdIsRequired",
    
        `"message": "FailureAddCi",
    
        `"operation": "AddCi",
    
        `"serviceName": "CI"
    }
    
    {
        `"exceptionMessage": "CategoryIdIsEmpty",
    
        `"message": "FailureUpdateCi",
    
        `"operation": "UpdateCi",
    
        `"serviceName": "CI"
    }
    
    {
    
        `"exceptionMessage": "StateIdIsEmpty",
    
        `"message": "FailureUpdateCi",
    
        `"operation": "UpdateCi",
    
        `"serviceName": "CI"
    }
    
    {
        `"exceptionMessage": "InvalidItemType",
    
        `"message": "FailureUpdateCi",
    
        `"operation": "UpdateCi",
    
        `"serviceName": "CI"
    }
    
    {
        `"exceptionMessage": "InvalidAdditionalFieldValue",
    
        `"message": "FailureAddCi",
    
        `"operation": "AddCi",
    
        `"serviceName": "CI"
    }
    
    {
        `"exceptionMessage": "Is null\r\nNombre del parámetro: request",     "message": "FailureAddCi",
    
        `"operation": "AddCi",
    
        `"serviceName": "CI"
    
    }