Create an attachment for an award budget

post

/fscmRestApi/resources/11.13.18.05/awardBudgets/{PlanVersionId}/child/Attachments

Request

Path Parameters
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : awardBudgets-Attachments-item-response
Type: object
Show Source
Back to Top

Examples

Example 1

The following example shows how to create an attachment for an award budget for a data type code of FILE by submitting a POST request on the REST resource using cURL. You can attach documents and media using this data type code.

curl --user ppm_cloud_user -X POST -d @example_request_payload.json "https://your_organization.com:port/fscmRestApi/resources/11.13.18.05/awardBudgets/<PlanVersionId>/child/Attachments" -H 'cache-control: no-cache'

Request Body Example

The following shows an example of the request body in JSON format.

{
"CategoryName": "PROJECT_BUDGET",
"DatatypeCode": "FILE",
"FileContents": "VGVzdCBjb250ZW50IHVwZGF0ZWQ=",
"Title" : "Sample File attachment",
"FileName": "File_Attachment.txt"
}

Response Body Example

The following shows an example of the response body in JSON format.

{
    "AttachedDocumentId": 300100544191976,
    "LastUpdateDate": "2021-06-23T03:08:15.268+00:00",
    "LastUpdatedBy": "Charles.Watson",
    "DatatypeCode": "FILE",
    "FileName": "File_Attachment.txt",
    "DmFolderPath": null,
    "DmDocumentId": "UCMFA00087406",
    "DmVersionNumber": "87406",
    "Url": null,
    "CategoryName": "PROJECT_BUDGET",
    "UserName": null,
    "Uri": null,
    "FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a87406?XFND_SCHEME_ID=1&XFND_CERT_FP=01A8AFB3277D68B1E0D8CFC44C59578044ADBAE0&XFND_RANDOM=8828894683116890821&XFND_EXPIRES=1624418295869&XFND_SIGNATURE=WXPO5Dz9rc3c9mh06rTp3n5uUB~MNS1v40SZ3wn4C2V-lvDWPA2LQ5RtRy7jJ8clSOlwTkR37H9Fv61HlfyAAM5tEsFXcBJcsuvyy595vj-6auYg1vaWz-026XyyHSL-rjmg-o9KAW3-egshX1yvihu0npbTqRqlqAdmY8rpdqknYLbeEFJilcicXVs~a~eyTxoOmOMgxiwHU4oHjDENMV~a~WyoK69pbUpXw-1EqXRrUYyssVFGhCVMztMVZ6gueOpEN7PkjY62IMNwe2S-n4fSWrD5pBo66Tu21OOHmMljrMQP9uxIv62gOJa9US9-Jc7sNV0dDHlorg4KhHn8GQ__&Id=87406&download",
    "UploadedText": null,
    "UploadedFileContentType": "text/plain",
    "UploadedFileLength": 20,
    "UploadedFileName": "File_Attachment.txt",
    "ContentRepositoryFileShared": "false",
    "Title": "Sample File attachment",
    "Description": "",
    "ErrorStatusCode": null,
    "ErrorStatusMessage": null,
    "CreatedBy": "Charles.Watson",
    "CreationDate": "2021-06-23T03:08:13+00:00",
    "ExpirationDate": null,
    "LastUpdatedByUserName": "Charles Watson",
    "CreatedByUserName": "Charles Watson",
    "AsyncTrackerId": null,
    "links": [
        {
            "rel": "self",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A555DE80000000EACED00057708000110F09A555DE7",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "canonical",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A555DE80000000EACED00057708000110F09A555DE7",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964",
            "name": "awardBudgets",
            "kind": "item"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A555DE80000000EACED00057708000110F09A555DE7/enclosure/FileContents",
            "name": "FileContents",
            "kind": "other"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A555DE80000000EACED00057708000110F09A555DE7/enclosure/FileWebImage",
            "name": "FileWebImage",
            "kind": "other"
        }
    ]
}

Example 2

The following example shows how to create an attachment for an award budget for a data type code of TEXT by submitting a POST request on the REST resource using cURL. You can attach text only files using this data type code.

curl --user ppm_cloud_user -X POST -d @example_request_payload.json "https://your_organization.com:port/fscmRestApi/resources/11.13.18.05/awardBudgets/<PlanVersionId>/child/Attachments" -H 'cache-control: no-cache'

Request Body Example

The following shows an example of the request body in JSON format.

{
"DatatypeCode" : "TEXT",
"CategoryName" : "PROJECT_BUDGET",
"UploadedText" : "This is a sample text attachment",
"Title" : "REST Attachment Text",
"Description" : "Text Attachment"
}

Response Body Example

The following shows an example of the response body in JSON format.

{
    "AttachedDocumentId": 300100544161058,
    "LastUpdateDate": "2021-06-23T03:09:57.208+00:00",
    "LastUpdatedBy": "Charles.Watson",
    "DatatypeCode": "TEXT",
    "FileName": "This is a sample text attachme...",
    "DmFolderPath": null,
    "DmDocumentId": "UCMFA00087414",
    "DmVersionNumber": "87414",
    "Url": null,
    "CategoryName": "PROJECT_BUDGET",
    "UserName": null,
    "Uri": null,
    "FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a87414?XFND_SCHEME_ID=1&XFND_CERT_FP=01A8AFB3277D68B1E0D8CFC44C59578044ADBAE0&XFND_RANDOM=4043996416184598307&XFND_EXPIRES=1624418397638&XFND_SIGNATURE=Bzh5L92CybIB3JXkx29O0brUOO6aNDdV3u1vgi7BsrDnUOFjw1dNN40AGHW5j6Axi7P6CHGLt5-3~nxrIKtWAwEeO5fkwtASMuT8wzmUabchZUE0kb6ZLWeAAiN3MSVm-n7aMJp0cyuzU7DpsK9bi8OzmDR~nX6dNymE~rAmt3I4oLZnk7SHO-4w9onZ~aehiFrr6j-wHSN~EPASG4zJgiEDegzFLx2GCC-nDEZjK6ntViUGBnLJ0ZS6gNOShFocmbUYz9euVYSISHWtzi2BO64E80A4GjAg1zvkuWnJPgcqbuQNOoM0KwtsnLjhncVRyIUbrT6PHD4JktoPUz~NGQ__&Id=87414&download",
    "UploadedText": null,
    "UploadedFileContentType": "text/plain",
    "UploadedFileLength": 35,
    "UploadedFileName": "REST Attachment Text-37f588b2-a4d8-4030-8876-4403fcd77b4e.txt",
    "ContentRepositoryFileShared": "false",
    "Title": "REST Attachment Text",
    "Description": "Text Attachment",
    "ErrorStatusCode": null,
    "ErrorStatusMessage": null,
    "CreatedBy": "Charles.Watson",
    "CreationDate": "2021-06-23T03:09:56+00:00",
    "ExpirationDate": null,
    "LastUpdatedByUserName": "Charles Watson",
    "CreatedByUserName": "Charles Watson",
    "AsyncTrackerId": null,
    "links": [
        {
            "rel": "self",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E5220000000EACED00057708000110F09A54E521",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "canonical",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E5220000000EACED00057708000110F09A54E521",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964",
            "name": "awardBudgets",
            "kind": "item"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E5220000000EACED00057708000110F09A54E521/enclosure/FileContents",
            "name": "FileContents",
            "kind": "other"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E5220000000EACED00057708000110F09A54E521/enclosure/FileWebImage",
            "name": "FileWebImage",
            "kind": "other"
        }
    ]
}

Example 3

The following example shows how to create an attachment for an award budget for a data type code of WEB_PAGE by submitting a POST request on the REST resource using cURL. You can attach URLs and page links using this data type code.

curl --user ppm_cloud_user -X POST -d @example_request_payload.json "https://your_organization.com:port/fscmRestApi/resources/11.13.18.05/awardBudgets/<PlanVersionId>/child/Attachments" -H 'cache-control: no-cache'

Request Body Example

The following shows an example of the request body in JSON format.

{
"DatatypeCode" : "WEB_PAGE",
"CategoryName" : "PROJECT_BUDGET",
"Url" : "http://www.resturlattachmenttest.com",
"ContentRepositoryFileShared" : "false",
"Title" : "Web Page attachment",
"Description" : "Web Page attachment"
}

Response Body Example

The following shows an example of the response body in JSON format.

{
    "AttachedDocumentId": 300100544162059,
    "LastUpdateDate": "2021-06-23T03:09:37.204+00:00",
    "LastUpdatedBy": "Charles.Watson",
    "DatatypeCode": "WEB_PAGE",
    "FileName": null,
    "DmFolderPath": "",
    "DmDocumentId": null,
    "DmVersionNumber": null,
    "Url": "http://www.resturlattachmenttest.com",
    "CategoryName": "PROJECT_BUDGET",
    "UserName": null,
    "Uri": null,
    "FileUrl": null,
    "UploadedText": null,
    "UploadedFileContentType": null,
    "UploadedFileLength": null,
    "UploadedFileName": null,
    "ContentRepositoryFileShared": "false",
    "Title": "Web Page attachment",
    "Description": "Web Page attachment",
    "ErrorStatusCode": null,
    "ErrorStatusMessage": null,
    "CreatedBy": "Charles.Watson",
    "CreationDate": "2021-06-23T03:09:37+00:00",
    "ExpirationDate": null,
    "LastUpdatedByUserName": "Charles Watson",
    "CreatedByUserName": "Charles Watson",
    "AsyncTrackerId": null,
    "links": [
        {
            "rel": "self",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E90B0000000EACED00057708000110F09A54E90A",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "canonical",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E90B0000000EACED00057708000110F09A54E90A",
            "name": "Attachments",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964",
            "name": "awardBudgets",
            "kind": "item"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E90B0000000EACED00057708000110F09A54E90A/enclosure/FileContents",
            "name": "FileContents",
            "kind": "other"
        },
        {
            "rel": "enclosure",
            "href": "https://fphchyb13.fa.dc1.c9dev2.visioncorp.com:443/fscmRestApi/resources/11.13.18.05/awardBudgets/100100053015964/child/Attachments/00020000000EACED00057708000110F09A54E90B0000000EACED00057708000110F09A54E90A/enclosure/FileWebImage",
            "name": "FileWebImage",
            "kind": "other"
        }
    ]
}
Back to Top