# How to use own defined struct in .api file

**URL:** <https://forum.legato.io/t/how-to-use-own-defined-struct-in-api-file/3430>\
**Category:** Legato Application Framework\
**Created:** [July 11, 2018, 8:54am UTC](https://forum.legato.io/t/how-to-use-own-defined-struct-in-api-file/3430 "2018-07-11T08:54:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 16, 2021, 7:02am UTC](https://forum.legato.io/t/how-to-use-own-defined-struct-in-api-file/3430/6 "2021-09-16T07:02:57Z")

</div>

how about this?

> [@In legato 19.02 api is not supporting more than 2 string](https://forum.legato.io/t/in-legato-19-02-api-is-not-supporting-more-than-2-string/5716/2):
>
> how about making the API file like this? STRUCT ARRAY123 { string Array1[10]; int32 port1; string Array2[10]; int32 port2; string Array3[10]; int32 port3; string Array4[10]; int32 port4; string Array5[10]; int32 port5; }; FUNCTION arraySend ( ARRAY123 asd IN ); It is working on my side with vscode leaf swi-wp76\_4.7.0. You can use my code: [IPC\_step1.rar](https://forum.legato.io/uploads/short-url/dgUwkVXIXDa6sS6CbPxzjqn2x7a.rar) (2.4 KB)

---

_[View the full topic](https://forum.legato.io/t/how-to-use-own-defined-struct-in-api-file/3430)._
