# Assign a Fixed Value

In Postman, the API looks like this:

<figure><img src="https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FbzMbYhwGbazwYJEl9zv8%2Fimage.png?alt=media&#x26;token=88d4857b-cd4b-4278-9c4a-fd9da2c91676" alt=""><figcaption><p>API call for assignment rule creation</p></figcaption></figure>

The body of the file for this call will look like this:

&#x20;

```
{
    "context": {
        "user": "id_name",
        "password": "password",
        "project": {
            "name": "imp_payments_demo",
            "version": "1.0"
        },
        "workSet": {
            "name": "api_2_workset",
            "version": "1.1"
        }
    },
    "entity": {
        "step": {
            "name": "imp_enter_details",
            "version": "1.0"
        },
        "attribute": "test_string",    
        "operands": [
            {
                "operator": "ASSIGN",
                "value": "125"
            }      
        ]
    }
}
```

&#x20;

In the entity section, you will need to provide the step name and version (version can be validated in the ‘data blocks’ section of TDO or on the ‘assembled data’ page).

&#x20;

The attribute name is the name from the list in the TDO data assignment page.  In this case, we are working on the third attribute in the list:

<figure><img src="https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FnAzfF31vphTMEQGRaKkd%2Fimage.png?alt=media&#x26;token=6c382ccd-f878-4b40-a135-2d8467e1e569" alt=""><figcaption><p>Assignment rules page in TDO</p></figcaption></figure>

In the final section of the body, we are specifying the method being used (‘ASSIGN’) and the value to be assigned (‘125’).  Since we have not specified a format type, this will be assigned using the default value of STRING.

&#x20;

When the API is successfully run, you will receive the following return message:

<figure><img src="https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FhyONhIMLLMCfYNW7ESAw%2Fimage.png?alt=media&#x26;token=e4906d0a-6c85-4b13-a89c-298213b847a3" alt=""><figcaption><p>Return message for successful execution</p></figcaption></figure>

Note that the return message starts with the Mongo object ID, provides the rule name and properties.&#x20;

&#x20;

Here is that rule in TDO after the API is run.

<figure><img src="https://2948796384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LmzGprckLqwd5v6bs6m%2Fuploads%2FTK5r4KOhKyPA44rxUOfQ%2Fimage.png?alt=media&#x26;token=0385bd17-bd33-4bda-8083-03d2c0c527a3" alt=""><figcaption><p>New rule created in TDO</p></figcaption></figure>

You can see that the rule name on the TDO screen is the same as the rule name returned to Postman after the API was run and the value assigned is the value sent in the API.
